熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

oracle 9206升級到10.2.0.2簡要步驟

2022-06-13   來源: Oracle 

  安裝oracle g r的軟件
打oracle g最新的補丁我打的是升級到的補丁
運行PreUpgrade Information Tool它用來分析升級到g前你要做的一些操作比如需要增加或減少的參數等
啟動要升級的DB用SYSDBA運行g的ORACLE_HOME/rdbms/admin下的utluisql查看產生的日志
SQL> SPOOL infolog
SQL> @utluisql
SQL> SPOOL OFF
下面是我的infolog

SQL> @d:utluisql;
Oracle Database Upgrade Information Utility ::

**********************************************************************
Database:
**********************************************************************
> name: ZHANGYE
> version:
> compatible:
> blocksize:

**********************************************************************
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: MB
> TEMP tablespace is adequate for the upgrade
minimum required size: MB
AUTOEXTEND additional space required: MB

**********************************************************************
Update Parameters: [Update Oracle Database initora or spfile]
**********************************************************************
WARNING: > "shared_pool_size" needs to be increased to at least
WARNING: > "java_pool_size" needs to be increased to at least
WARNING: > "streams_pool_size" is not currently defined and needs a value of
at least
WARNING: > "session_max_open_files" needs to be increased to at least

**********************************************************************
Renamed Parameters: [Update Oracle Database initora or spfile]
**********************************************************************
No renamed parameters found No changes are required

**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database initora 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 g 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 environment]
**********************************************************************
> New "SYSAUX" tablespace
minimum required size for database upgrade: MB


PL/SQL 過程已成功完成

SQL> spool off;

copy oracle i的pfile(D:oracleoradatabaseINITzhangyeORA)到oracle g的pfile(D:oraclegdatabaseINITzhangyeORA)
檢查infolog對oracle g的pfile修改

oracle g修改前的pfile

*aq_tm_processes=
*background_dump_dest=D:oracleadminzhangyebdump
*compatible=
*control_files=D:oracleoradatazhangyecontrolctlD:oracleoradatazhangyecontrolctl
D:oracleoradatazhangyecontrolctl
*core_dump_dest=D:oracleadminzhangyecdump
*db_block_size=
*db_cache_size=
*db_domain=
*db_file_multiblock_read_count=
*db_name=zhangye
*fast_start_mttr_target=
*hash_join_enabled=TRUE*instance_name=zhangye
*java_pool_size=
*job_queue_processes=
*large_pool_size=
*open_cursors=
*pga_aggregate_target=
*processes=
*query_rewrite_enabled=FALSE
*remote_login_passwordfile=EXCLUSIVE
*shared_pool_size=
*sort_area_size=
*star_transformation_enabled=FALSE
*timed_statistics=TRUE
*undo_management=AUTO
*undo_retention=
*undo_tablespace=UNDOTBS
*user_dump_dest=D:oracleadminzhangyeudump
*log_archive_start=true
*log_archive_format=%sarc
*log_archive_dest=D:oraclearchive
oracle g修改後的pfile *aq_tm_processes=
*background_dump_dest=D:oracleadminzhangyebdump
*compatible=
*control_files=D:oracleoradatazhangyecontrolctlD:oracleoradatazhangyecontrolctl
D:oracleoradatazhangyecontrolctl
*core_dump_dest=D:oracleadminzhangyecdump
*db_block_size=
*db_cache_size=
*db_domain=
*db_file_multiblock_read_count=
*db_name=zhangye
*fast_start_mttr_target=
#*hash_join_enabled=TRUE
*instance_name=zhangye
*java_pool_size=
*job_queue_processes=
*large_pool_size=
*open_cursors=
*pga_aggregate_target=
*processes=
*query_rewrite_enabled=FALSE
*remote_login_passwordfile=EXCLUSIVE
*shared_pool_size=
*sort_area_size=
*star_transformation_enabled=FALSE
*timed_statistics=TRUE
*undo_management=AUTO
*undo_retention=
*undo_tablespace=UNDOTBS
*user_dump_dest=D:oracleadminzhangyeudump
#*log_archive_start=true
#*log_archive_format=%sarc
#*log_archive_dest=D:oraclearchive
*streams_pool_size=
*session_max_open_files=

運行Oracle Net Configuration Assistant生成g的listenerora
rman備份DB
stop所有oracle i的服務
刪除oracle i的服務
C:> ORADIM DELETE SID ZHANGYE
新建oracle g的服務
C:> ORADIM NEW SID ZHANGYE MAXUSERS STARTMODE AUTO PFILE D:oraclegdatabaseINITzhangyeORA
UPGRADE選項啟動DB
SQL> STARTUP UPGRADE
創建SYSAUX表空間
CREATE TABLESPACE sysaux DATAFILE D:oracleoradatazhangyesysauxdbf
SIZE M REUSE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
ONLINE;
運行g的ORACLE_HOME/rdbms/admin/catupgrdsql然後運行utlussql查看升級結果
SQL> SPOOL upgradelog
SQL> @catupgrdsql
SQL> @utlussql
SQL> SPOOL OFF
檢查upgradelog如果有錯誤處理錯誤後再次運行catupgrdsql
重新啟動DB編譯無效對象
SQL> shutdown immediate
SQL> startup pfile=D:oraclegdatabaseINITzhangyeORA
SQL> @D:oraclegRDBMSADMINutlrpsql
編譯後沒有無效對象
SQL> SELECT count(*) FROM dba_objects WHERE status=INVALID;

COUNT(*)


升級完成


From:http://tw.wingwit.com/Article/program/Oracle/201311/19018.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.