標籤:open listener 資訊 ref 技術分享 edit nbsp sum .com
***********************************************聲明***********************************************************************
原創作品,出自 “深藍的blog” 部落格,歡迎轉載,轉載時請務必註明出處,否則追究著作權法律責任。
表述有錯誤之處。請您留言或郵件([email protected])指明,不勝感激。
本文轉載必須保留此處:http://blog.csdn.net/huangyanlong/article/details/39677103
深藍的blog:http://blog.csdn.net/huangyanlong
****************************************************************************************************************************
前提:安裝oracle軟體後,完畢了dbca建庫
目標:完畢oracle軟體由10.2.0.1.0升級為10.2.0.5.0
1.查看資料庫狀態、版本號碼
[[email protected] ~]$ sqlplus ‘/as sysdba‘
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 17 18:27:42 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- --------------------
hyldb OPEN
SQL> select comp_name,version,status from dba_registry;
2. 解壓安裝包
找到oracle10g的升級安裝包,例如以下所看到的:
解壓壓縮包
[[email protected] soft]# unzip p8202632_10205_Linux-x86-64.zip
3. 關閉資料庫
[[email protected] ~]$ sqlplus ‘/as sysdba‘
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 29 10:23:51 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate;
--關庫
Database closed.
Database dismounted.
ORACLE instance shut down.
[[email protected] ~]$ lsnrctl statuse
--核實監聽已經停止
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-SEP-2014 10:30:51
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-SEP-2014 09:54:36
Uptime 0 days 0 hr. 36 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hyl)(PORT=1521)))
The listener supports no services
The command completed successfully
4. 資料備份
生產環境時此處須要做一次備份。以免升級失敗時造成資料丟失,此文省略。
5. 升級oracle軟體
遠程調用圖形化介面。例如以例:
這裡跳過需求包檢查就可以,點擊yes繼續。例如以:
[[email protected] ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh
--按提示運行指令碼
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it?
(y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it?
(y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
運行指令碼後,點擊介面ok。進入到結束介面,例如以下:
6. 升級資料庫
[[email protected] ~]$ sqlplus ‘/as sysdba‘
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Sep 29 11:05:28 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to an idle instance.
啟動到upgrade狀態
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 2094800 bytes
Variable Size 75499824 bytes
Database Buffers 83886080 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
升級資料字典
SQL> spool /u01/app/oracle/update_log/cpu_up.log//把指令碼資訊錄入到一個記錄檔裡
SQL> @?/rdbms/admin/catupgrd.sql //開始跑指令碼。升級資料字典。約10分鐘
SQL> spool off; --結束記錄檔
SQL> shutdown immediate; --關庫
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup --正常啟庫
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 2094800 bytes
Variable Size 150997296 bytes
Database Buffers 8388608 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
SQL> @?/rdbms/admin/utlrp.sql --運行該指令碼
SQL> select * from utl_recomp_errors;
SQL> col comp_name for a30
SQL> col status for a20
SQL> col VERSION for a10
SQL> set linesize 200
SQL> select comp_name,version,status from dba_registry;
SQL> show parameter comp
改動相容性
SQL> alter system set compatible=‘10.2.0.5.0‘ scope=spfile;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
至此。資料庫完畢由10.2.0.1.0升級到10.2.0.5.0版本號碼。
7. 完畢
[[email protected] ~]$ sqlplus ‘/as sysdba‘
--登陸資料庫
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Sep 29 11:57:49 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
小結
對照dbca建庫前後進行cpu升級的過程,會發現明顯的差別:
1、未進行dbca建庫,僅僅需進行軟體升級,升級後建庫就可以;
2、dbca建庫後(即存在資料庫的情況下),升級軟體後。須要升級資料字典,改動相容性。
簡而記之
cpu升級(10.2.0.1.0-10.2.0.5.0) |
條件 |
操作 |
興許 |
不存在庫 |
升級軟體 |
興許建庫 |
存在庫 |
升級軟體+資料字典+相容性 |
完畢升級後直接訪問庫 |
***********************************************聲明***********************************************************************
原創作品,出自 “深藍的blog” 部落格。歡迎轉載,轉載時請務必註明出處,否則追究著作權法律責任。
表述有錯誤之處,請您留言或郵件([email protected])指明,不勝感激。
本文轉載必須保留此處:http://blog.csdn.net/huangyanlong/article/details/39677103
深藍的blog:http://blog.csdn.net/huangyanlong
****************************************************************************************************************************
升級_開闊視野之Oracle圖形化升級(dbca建庫後升級)—10.2.0.1.0升為10.2.0.5.0