1.安装oracle 10g r2的软件 2.打oracle 10g最新的补丁,我打的是升级到10.2.0.2的补丁 3.运行Pre-Upgrade Information Tool.它用来分析升级到10g前你要做的一些操作,比如需要增加或减少的参数等. 启动要升级的DB,用SYSDBA运行10g的ORACLE_HOME/rdbms/admin
1.安装oracle 10g r2的软件
2.打oracle 10g最新的补丁,我打的是升级到10.2.0.2的补丁
3.运行Pre-Upgrade Information Tool.它用来分析升级到10g前你要做的一些操作,比如需要增加或减少的参数等.
启动要升级的DB,用SYSDBA运行10g的ORACLE_HOME/rdbms/admin下的utlu102i.sql,查看产生的日志.
SQL> SPOOL info.log
SQL> @utlu102i.sql
SQL> SPOOL OFF
下面是我的info.log.
SQL> @d:utlu102i.sql;
Oracle Database 10.2 Upgrade Information Utility 01-17-2007 13:22:37
.
**********************************************************************
Database:
**********************************************************************
--> name: ZHANGYE
--> version: 9.2.0.6.0
--> compatible: 9.2.0.0.0
--> blocksize: 8192
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 248 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 18 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: --> "shared_pool_size" needs to be increased to at least 177861837
WARNING: --> "java_pool_size" needs to be increased to at least 67108864
WARNING: --> "streams_pool_size" is not currently defined and needs a value of
at least 50331648
WARNING: --> "session_max_open_files" needs to be increased to at least 20
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
--> "hash_join_enabled"
--> "log_archive_start"
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database contains stale optimizer statistics.
.... Refer to the 10g Upgrade Guide for instructions to update
.... statistics prior to upgrading the database.
.... Component Schemas with stale statistics:
.... SYS
.
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 10.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
PL/SQL 过程已成功完成。
SQL> spool off;
copy oracle 9i的pfile(D:oracleora92databaseINITzhangye.ORA)到oracle 10g的pfile(D:oracle10gdatabaseINITzhangye.ORA).
检查info.log,对oracle 10g的pfile修改.
--oracle 10g修改前的pfile
*.aq_tm_processes=1
*.background_dump_dest='D:oracleadminzhangyebdump'
*.compatible='9.2.0.0.0'
*.control_files='D:oracleoradatazhangyecontrol01.ctl','D:oracleoradatazhangyecontrol02.ctl',
'D:oracleoradatazhangyecontrol03.ctl'
*.core_dump_dest='D:oracleadminzhangyecdump'
*.db_block_size=8192
*.db_cache_size=25165824
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='zhangye'
*.fast_start_mttr_target=300
*.hash_join_enabled=TRUE*.instance_name='zhangye'
*.java_pool_size=0
*.job_queue_processes=10
*.large_pool_size=8388608
*.open_cursors=300
*.pga_aggregate_target=25165824
*.processes=150
*.query_rewrite_enabled='FALSE'
*.remote_login_passwordfile='EXCLUSIVE'
*.shared_pool_size=50331648
*.sort_area_size=524288
*.star_transformation_enabled='FALSE'
*.timed_statistics=TRUE
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='D:oracleadminzhangyeudump'
*.log_archive_start=true
*.log_archive_format=%s.arc
*.log_archive_dest=D:oraclearchive
--oracle 10g修改后的pfile *.aq_tm_processes=1
*.background_dump_dest='D:oracleadminzhangyebdump'
*.compatible='9.2.0.0.0'
*.control_files='D:oracleoradatazhangyecontrol01.ctl','D:oracleoradatazhangyecontrol02.ctl',
'D:oracleoradatazhangyecontrol03.ctl'
*.core_dump_dest='D:oracleadminzhangyecdump'
*.db_block_size=8192
*.db_cache_size=25165824
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='zhangye'
*.fast_start_mttr_target=300
#*.hash_join_enabled=TRUE
*.instance_name='zhangye'
*.java_pool_size=67108864
*.job_queue_processes=10
*.large_pool_size=8388608
*.open_cursors=300
*.pga_aggregate_target=25165824
*.processes=150
*.query_rewrite_enabled='FALSE'
*.remote_login_passwordfile='EXCLUSIVE'
*.shared_pool_size=177861837
*.sort_area_size=524288
*.star_transformation_enabled='FALSE'
*.timed_statistics=TRUE
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='D:oracleadminzhangyeudump'
#*.log_archive_start=true
#*.log_archive_format=%s.arc
#*.log_archive_dest=D:oraclearchive
*.streams_pool_size=50331648
*.session_max_open_files=20
4.运行Oracle Net Configuration Assistant,生成10g的listener.ora
5.rman备份DB.
6.stop所有oracle 9i的服务.
删除oracle 9i的服务.
C:> ORADIM -DELETE -SID ZHANGYE
新建oracle 10g的服务
C:> ORADIM -NEW -SID ZHANGYE -MAXUSERS 10 -STARTMODE AUTO -PFILE D:oracle10gdatabaseINITzhangye.ORA
7.UPGRADE选项启动DB.
SQL> STARTUP UPGRADE
8.创建SYSAUX表空间
CREATE TABLESPACE sysaux DATAFILE 'D:oracleoradatazhangyesysaux01.dbf'
SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
9.运行10g的ORACLE_HOME/rdbms/admin/catupgrd.sql,然后运行utlu102s.sql查看升级结果.
SQL> SPOOL upgrade.log
SQL> @catupgrd.sql
SQL> @utlu102s.sql
SQL> SPOOL OFF
检查upgrade.log,如果有错误,处理错误后再次运行catupgrd.sql.
10.重新启动DB,,编译无效对象.
SQL> shutdown immediate
SQL> startup pfile=D:oracle10gdatabaseINITzhangye.ORA
SQL> @D:oracle10gRDBMSADMINutlrp.sql
编译后没有无效对象
SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID';
COUNT(*)
----------
0
升级完成.

方法:1、利用“select*from user_indexes where table_name=表名”语句查询表中索引;2、利用“select*from all_indexes where table_name=表名”语句查询所有索引。

oracle asm指的是“自动存储管理”,是一种卷管理器,可自动管理磁盘组并提供有效的数据冗余功能;它是做为单独的Oracle实例实施和部署。asm的优势:1、配置简单、可最大化推动数据库合并的存储资源利用;2、支持BIGFILE文件等。

在oracle中,可以利用“TO_SINGLE_BYTE(String)”将全角转换为半角;“TO_SINGLE_BYTE”函数可以将参数中所有多字节字符都替换为等价的单字节字符,只有当数据库字符集同时包含多字节和单字节字符的时候有效。

在Oracle中,可利用lsnrctl命令查询端口号,该命令是Oracle的监听命令;在启动、关闭或重启oracle监听器之前可使用该命令检查oracle监听器的状态,语法为“lsnrctl status”,结果PORT后的内容就是端口号。

在oracle中,可以利用“drop sequence sequence名”来删除sequence;sequence是自动增加数字序列的意思,也就是序列号,序列号自动增加不能重置,因此需要利用drop sequence语句来删除序列。

在oracle中,可以利用“select ... From all_tab_columns where table_name=upper('表名') AND owner=upper('数据库登录用户名');”语句查询数据库表的数据类型。

方法:1、利用“LOWER(字段值)”将字段转为小写,或者利用“UPPER(字段值)”将字段转为大写;2、利用“REGEXP_LIKE(字符串,正则表达式,'i')”,当参数设置为“i”时,说明进行匹配不区分大小写。

方法:1、利用“alter system set sessions=修改后的数值 scope=spfile”语句修改session参数;2、修改参数之后利用“shutdown immediate – startup”语句重启服务器即可生效。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
