Oracle 10.2.0.1 升級到 10.2.0.4--轉載

rongshiyuan發表於2012-09-03

Oracle 10.2.0.1 升級到 10.2.0.4

分類: Oracle 安裝解除安裝2230人閱讀評論(0)收藏舉報

--*********************************

-- Oracle 10.2.0.1 10.2.0.4

--*********************************

級並,只要遵循其步,一般問題不大。但是升的情也是屢見,尤其是生產數的升不定的候甚至要SR

下面描述基於Linux(Oracle Linux 5.4/2.6.18-164.el5PAE)平臺下Oracle 10.2.0.1 10.2.0.4的步

Oracle包的下請鏈接:Oracle 丁全集 (Oracle 9i 10g 11g Path)

注:

9i以前,無/都是startup migrate

10g後增加了upgrade引數,升可直接用startup upgrade,降仍是startup migrate

一、單實例升決條件:

1.表空需求

確保system表空至少有10M可用,下面查詢語

col "tablespace_name" for a20

col "Usage_Percent" for a10

SELECT upper(f.tablespace_name) "tablespace_name"

,d.tot_grootte_mb "tablespace_size(M)"

,d.tot_grootte_mb - f.total_bytes "used_size(M)"

,to_char(round((d.tot_grootte_mb - f.total_bytes) / d.tot_grootte_mb * 100,

2),

'990.99') "Usage_Percent"

,f.total_bytes "free_size(M)"

FROM (SELECT tablespace_name

,round(SUM(bytes) / 1024 / 1024) total_bytes

,round(MAX(bytes) / (1024 * 1024), 2) max_bytes

FROM sys.dba_free_space

GROUP BY tablespace_name) f

,(SELECT dd.tablespace_name

,round(SUM(bytes) / 1024 / 1024) tot_grootte_mb

FROM sys.dba_data_files dd

GROUP BY dd.tablespace_name) d

WHERE d.tablespace_name = f.tablespace_name

ORDER BY 2 DESC;

2.統引數

確保引數SHARED_POOL_SIZE JAVA_POOL_SIZE大於150MB以上,加快升速度,在系統內存可用的情下,可臨時調個引數

SQL> SHOW PARAMETER SHARED_POOL_SIZE

SQL> SHOW PARAMETER JAVA_POOL_SIZE

SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='200M' SCOPE=spfile;

SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='200M' SCOPE=spfile;

二、施升

1.關閉需要升

停止

SQL> shutdown immediate

停止與該實例相的所有後臺

lsnrctl emctl

2.備份Oracle Home

tar -cvf $ORACLE_BASE /orabak/ --確保Oracle的所有配置都位於$ORACLE_BASE,如聽等

cp *.dbf con*.ora redo*.log /orabak/ --對數庫實施冷

3.級軟

./runIstanller --&gtoracle 賬戶

root.sh --&gtroot 賬戶

4.更新據字典

SQL> startup upgrade

SQL> spool patch.log

SQL> @?/rdbms/admin/catupgrd.sql --9i 使用catpatch.sql

SQL> spool off

5.編譯失效象:

sql>shutdown immediate

sql>startup

SQL>@?/rdbms/admin/utlrp.sql

6.後的檢測

SQL>select comp_name,version,status from sys.dba_registry;

檢查組件的升

SQL>select * from utl_recomp_errors;

7.修改相容性引數

SQL> alter system set compatible='10.2.0.4.0' scope=spfile;

8.重新啟動數:

SQL> SHUTDOWN

SQL> STARTUP

9.如果使用了恢則執行下面的命令

$ rman catalog username/password@alias

RMAN> UPGRADE CATALOG;

10.回退:

SQL> STARTUP DOWNGRADE

SQL> SPOOL downgrade.log

SQL> @catdwgrd.sql10.2.10行的是這個,而10.1用的是d92000.sql,即dold_release.sql

Sql>spool off

Sql>shutdown immediate

12.檢查後的情

SQL> select comp_name,version,status from sys.dba_registry;

COMP_NAME VERSION STATUS

---------------------------------------- ------------------------------ -----------

Oracle Database Catalog Views 10.2.0.4.0 VALID

Oracle Database Packages and Types 10.2.0.4.0 VALID

Oracle Workspace Manager 10.2.0.4.3 VALID

JServer JAVA Virtual Machine 10.2.0.4.0 VALID

Oracle XDK 10.2.0.4.0 VALID

Oracle Database Java Packages 10.2.0.4.0 VALID

Oracle Expression Filter 10.2.0.4.0 VALID

Oracle Data Mining 10.2.0.4.0 VALID

Oracle Text 10.2.0.4.0 VALID

Oracle XML Database 10.2.0.4.0 VALID

Oracle Rule Manager 10.2.0.4.0 VALID

COMP_NAME VERSION STATUS

---------------------------------------- ------------------------------ -----------

Oracle interMedia 10.2.0.4.0 VALID

OLAP Analytic Workspace 10.2.0.4.0 VALID

Oracle OLAP API 10.2.0.4.0 VALID

OLAP Catalog 10.2.0.4.0 VALID

Spatial 10.2.0.4.0 VALID

Oracle Enterprise Manager 10.2.0.4.0 VALID

17 rows selected.

SQL> select * from utl_recomp_errors;

no rows selected

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-742590/,如需轉載,請註明出處,否則將追究法律責任。

相關文章