Oracle 資料庫升級
Oracle 資料庫升級
升級
一 目的: 11.2.0.1.0-------->11.2.0.3.0
二 原庫基本資訊
1 檢視資料庫版本
SQL> select * from v$version where rownum<=2;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
2 檢視失效的物件
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
0
3 檢視引數
SQL> show parameter shared
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
hi_shared_memory_address integer 0
max_shared_servers integer
shared_memory_address integer 0
shared_pool_reserved_size big integer 3774873
shared_pool_size big integer 0
shared_server_sessions integer
shared_servers integer 1
4 檢視 SGA
SQL> show sga
Total System Global Area 409194496 bytes
Fixed Size 2213856 bytes
Variable Size 289409056 bytes
Database Buffers 113246208 bytes
Redo Buffers 4325376 bytes
5 檢視審計表
SQL> select * from aud$;
6 檢視各個元件版本
SQL> col comp_name for a40
SQL> col status for a10
SQL> col version for a20
SQL> select comp_name,status,version from dba_server_registry;
COMP_NAME STATUS VERSION
---------------------------------------- ---------- --------------------
OWB VALID 11.2.0.1.0
Oracle Application Express VALID 3.2.1.00.10
Oracle Enterprise Manager VALID 11.2.0.1.0
OLAP Catalog VALID 11.2.0.1.0
Spatial VALID 11.2.0.1.0
Oracle Multimedia VALID 11.2.0.1.0
Oracle XML Database VALID 11.2.0.1.0
Oracle Text VALID 11.2.0.1.0
Oracle Expression Filter VALID 11.2.0.1.0
Oracle Rules Manager VALID 11.2.0.1.0
Oracle Workspace Manager VALID 11.2.0.1.0
COMP_NAME STATUS VERSION
---------------------------------------- ---------- --------------------
Oracle Database Catalog Views VALID 11.2.0.1.0
Oracle Database Packages and Types VALID 11.2.0.1.0
JServer JAVA Virtual Machine VALID 11.2.0.1.0
Oracle XDK VALID 11.2.0.1.0
Oracle Database Java Packages VALID 11.2.0.1.0
OLAP Analytic Workspace VALID 11.2.0.1.0
Oracle OLAP API VALID 11.2.0.1.0
18 rows selected.
二 備份資料庫
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;
[oracle@chen ~]$ mkdir backup
[oracle@chen ~]$ rman target / nocatalog
RMAN> backup database plus archivelog delete input format '/home/oracle/backup/chen_%U.bak';
[oracle@chen ~]$ sqlplus / as sysdba
三 停止資料庫,備份資料庫軟體目錄和產品目錄
SQL> shutdown immediate
[oracle@chen ~]$ lsnrctl stop
[oracle@chen ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/chen_chen/sysman/log
[oracle@chen ~]$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
Stopping Oracle Enterprise Manager 11g Database Control ...
all attemps to stop oc4j failed... now trying to kill 9
--- Failed to shutdown DBConsole Gracefully ---
... Stopped.
[oracle@chen ~]$ tar -zcvf prou.tar /u01/app/oracle/
四 解壓 11.2.0.3.0 安裝介質
[root@chen u01]# mkdir database-1
[root@chen u01]# mv /root/p10404530_112030_Linux-x86-64_* database-1/
[root@chen database-1]# ll -rth
total 2.4G
-rw-r--r-- 1 root root 1.3G Jun 12 10:39 p10404530_112030_Linux-x86-64_1of7.zip
-rw-r--r-- 1 root root 1.1G Jun 12 11:07 p10404530_112030_Linux-x86-64_2of7.zip
[root@chen database-1]# unzip p10404530_112030_Linux-x86-64_1of7.zip
[root@chen database-1]# unzip p10404530_112030_Linux-x86-64_2of7.zip
[root@chen u01]# chown -R oracle.oinstall /u01/
五 升級資料軟體
1 ./runInstaller
[root@chen database-1]# xhost +
xhost: unable to open display ""
[root@chen database-1]# su - oracle
[oracle@chen database]$ pwd
/u01/database-1/database
[oracle@chen database]$ ./runInstaller
[root@chen database-1]# cd /u01/app/oracle/product/11.2.4/
[root@chen 11.2.4]# ./root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.4
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
3 配置環境變數
[oracle@chen ~]$ vim .bash_profile
......
export ORACLE_HOME=$ORACLE_BASE/product/11.2.4
......
[oracle@chen ~]$ source .bash_profile
[oracle@chen ~]$ vim /etc/oratab
chen:/u01/app/oracle/product/11.2.4:N
4 複製引數檔案
[oracle@chen ~]$ cd $ORACLE_HOME/dbs
[oracle@chen dbs]$ pwd
/u01/app/oracle/product/11.2.4/dbs
[oracle@chen dbs]$ ls
init.ora
[oracle@chen dbs]$ cp /u01/app/oracle/product/11.2.0/dbs/* .
[oracle@chen dbs]$ ls
hc_chen.dat init.ora lkCHEN orapwchen snapcf_chen.f spfilechen.ora
5 複製網路檔案
[oracle@chen 11.2.4]$ cd $ORACLE_HOME/network/admin
[oracle@chen admin]$ ls
samples shrept.lst
[oracle@chen admin]$ pwd
/u01/app/oracle/product/11.2.4/network/admin
[oracle@chen admin]$ cp -r /u01/app/oracle/product/11.2.0/network/admin/* .
[oracle@chen admin]$ ls
listener.ora samples shrept.lst sqlnet.ora tnsnames.ora
三 執行預升級指令碼檢測
1 升級模式啟動資料庫
[oracle@chen admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 4 13:54:34 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 409194496 bytes
Fixed Size 2228864 bytes
Variable Size 281021824 bytes
Database Buffers 121634816 bytes
Redo Buffers 4308992 bytes
Database mounted.
Database opened.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
-------------------------------- ------------------------
chen OPEN MIGRATE
2 執行檢測指令碼 ( 檢測是否有不符合升級的選項 )
SQL> spool /home/oracle/c_utl01.txt
SQL> @$ORACLE_HOME/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 08-04-2015 13:58:22
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: CHEN
--> version: 11.2.0.1.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V11
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 679 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 463 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: OFF
**********************************************************************
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
WARNING: --> "memory_target" needs to be increased to at least 436 MB
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "memory_target" needs to be increased to at least 620 MB
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.2.0.1.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Database contains INVALID objects prior to upgrade.
.... The list of invalid SYS/SYSTEM objects was written to
.... registry$sys_inv_objs.
.... The list of non-SYS/SYSTEM objects was written to
.... registry$nonsys_inv_objs.
.... Use utluiobj.sql after the upgrade to identify any new invalid
.... objects due to the upgrade.
.... USER PUBLIC has 8 INVALID objects.
.... USER CTXSYS has 1 INVALID objects.
.... USER SYS has 11 INVALID objects.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
**********************************************************************
Oracle recommends removing all hidden parameters prior to upgrading.
To view existing hidden parameters execute the following command
while connected AS SYSDBA:
SELECT name,description from SYS.V$PARAMETER WHERE name
LIKE '\_%' ESCAPE '\'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
SQL> spool off
3 檢視並修改不滿足項
SQL> show parameter shared
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
hi_shared_memory_address integer 0
max_shared_servers integer
shared_memory_address integer 0
shared_pool_reserved_size big integer 6501171
shared_pool_size big integer 0
shared_server_sessions integer
shared_servers integer 1
4 啟動資料庫閃回,建立回滾點
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------------------------
NO
SQL> shutdown immediate
SQL> startup mount
SQL> alter database flashback on;
SQL> create restore point chen_rollback guarantee flashback database;
Restore point created.
SQL> col name for a15
SQL> select scn,name,storage_size from v$restore_point;
SCN NAME STORAGE_SIZE
---------- --------------- ------------
968263 CHEN_ROLLBACK 52428800
5 再次進行檢查
SQL> @$ORACLE_HOME/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 08-04-2015 14:14:24
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: CHEN
--> version: 11.2.0.3.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> timezone file: V14
.
WARNING: --> Database not in OPEN state.
Database must be in OPEN state for script to execute correctly.
Current Status: MOUNTED.
SQL> shutdown immediate
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 409194496 bytes
Fixed Size 2228864 bytes
Variable Size 281021824 bytes
Database Buffers 121634816 bytes
Redo Buffers 4308992 bytes
Database mounted.
Database opened.
SQL> @$ORACLE_HOME/rdbms/admin/utlu112i.sql
Oracle Database 11.2 Pre-Upgrade Information Tool 08-04-2015 14:17:12
Script Version: 11.2.0.3.0 Build: 001
.
**********************************************************************
Database:
**********************************************************************
--> name: CHEN
--> version: 11.2.0.1.0
--> compatible: 11.2.0.0.0
--> blocksize: 8192
--> platform: Linux x86 64-bit
--> timezone file: V11
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 679 MB
--> SYSAUX tablespace is adequate for the upgrade.
.... minimum required size: 463 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
.... minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 60 MB
.
**********************************************************************
Flashback: ON
**********************************************************************
FlashbackInfo:
--> name: /u01/app/oracle/flash_recovery_area
--> limit: 3882 MB
--> used: 1090 MB
--> size: 3882 MB
--> reclaim: 0 MB
--> files: 5
WARNING: --> Flashback Recovery Area Set. Please ensure adequate disk space in recover
y areas before performing an upgrade.
.
**********************************************************************
Update Parameters: [Update Oracle Database 11.2 init.ora or spfile]
Note: Pre-upgrade tool was run on a lower version 64-bit database.
**********************************************************************
--> If Target Oracle is 32-Bit, refer here for Update Parameters:
WARNING: --> "memory_target" needs to be increased to at least 436 MB
.
--> If Target Oracle is 64-Bit, refer here for Update Parameters:
WARNING: --> "memory_target" needs to be increased to at least 620 MB
.
**********************************************************************
Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No renamed parameters found. No changes are required.
.
**********************************************************************
Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile]
**********************************************************************
-- No obsolete parameters found. No changes are required
.
**********************************************************************
Components: [The following database components will be upgraded or installed]
**********************************************************************
--> Oracle Catalog Views [upgrade] VALID
--> Oracle Packages and Types [upgrade] VALID
--> JServer JAVA Virtual Machine [upgrade] VALID
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] VALID
--> OLAP Catalog [upgrade] VALID
--> EM Repository [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle interMedia [upgrade] VALID
--> Spatial [upgrade] VALID
--> Expression Filter [upgrade] VALID
--> Rule Manager [upgrade] VALID
--> Oracle Application Express [upgrade] VALID
... APEX will only be upgraded if the version of APEX in
... the target Oracle home is higher than the current one.
--> Oracle OLAP API [upgrade] VALID
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Database is using a timezone file older than version 14.
.... After the release migration, it is recommended that DBMS_DST package
.... be used to upgrade the 11.2.0.1.0 database timezone version
.... to the latest version which comes with the new release.
WARNING: --> Database contains INVALID objects prior to upgrade.
.... The list of invalid SYS/SYSTEM objects was written to
.... registry$sys_inv_objs.
.... The list of non-SYS/SYSTEM objects was written to
.... registry$nonsys_inv_objs.
.... Use utluiobj.sql after the upgrade to identify any new invalid
.... objects due to the upgrade.
.... USER PUBLIC has 8 INVALID objects.
.... USER CTXSYS has 1 INVALID objects.
.... USER SYS has 11 INVALID objects.
WARNING: --> Your recycle bin is turned on and currently contains no objects.
.... Because it is REQUIRED that the recycle bin be empty prior to upgrading
.... and your recycle bin is turned on, you may need to execute the command:
PURGE DBA_RECYCLEBIN
.... prior to executing your upgrade to confirm the recycle bin is empty.
WARNING: --> Database contains schemas with objects dependent on DBMS_LDAP package.
.... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs.
.... USER APEX_030200 has dependent objects.
.
**********************************************************************
Recommendations
**********************************************************************
Oracle recommends gathering dictionary statistics prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
EXECUTE dbms_stats.gather_dictionary_stats;
**********************************************************************
Oracle recommends removing all hidden parameters prior to upgrading.
To view existing hidden parameters execute the following command
while connected AS SYSDBA:
SELECT name,description from SYS.V$PARAMETER WHERE name
LIKE '\_%' ESCAPE '\'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
Oracle recommends reviewing any defined events prior to upgrading.
To view existing non-default events execute the following commands
while connected AS SYSDBA:
Events:
SELECT (translate(value,chr(13)||chr(10),' ')) FROM sys.v$parameter2
WHERE UPPER(name) ='EVENT' AND isdefault='FALSE'
Trace Events:
SELECT (translate(value,chr(13)||chr(10),' ')) from sys.v$parameter2
WHERE UPPER(name) = '_TRACE_EVENTS' AND isdefault='FALSE'
Changes will need to be made in the init.ora or spfile.
**********************************************************************
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
172
四 執行升級指令碼
1 資料庫以升級模式啟動
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade;
ORACLE instance started.
Total System Global Area 409194496 bytes
Fixed Size 2228864 bytes
Variable Size 281021824 bytes
Database Buffers 121634816 bytes
Redo Buffers 4308992 bytes
Database mounted.
Database opened.
2 執行升級指令碼
SQL> set echo on
SQL> spool /home/oracle/upgrade.log
SQL> set time on
14:30:37 SQL> @$ORACLE_HOME/rdbms/admin/catupgrd.sql
。。。。。。
15:24:47 SQL> Rem check instance version and status; set session attributes
15:24:47 SQL> EXECUTE dbms_registry.check_server_instance;
ERROR:
ORA-03114: not connected to ORACLE
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
五 升級完成後,編譯失效物件
1 啟動資料庫 open
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 409194496 bytes
Fixed Size 2228864 bytes
Variable Size 394268032 bytes
Database Buffers 8388608 bytes
Redo Buffers 4308992 bytes
Database mounted.
Database opened.
2 檢視失效物件個數
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
2407
3 執行 utlrp.sql 指令碼,編譯失效物件
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2015-08-04 15:29:53
DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC> objects in the database. Recompilation time is proportional to the
DOC> number of invalid objects in the database, so this command may take
DOC> a long time to execute on a database with a large number of invalid
DOC> objects.
DOC>
DOC> Use the following queries to track recompilation progress:
DOC>
DOC> 1. Query returning the number of invalid objects remaining. This
DOC> number should decrease with time.
DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC> 2. Query returning the number of objects compiled so far. This number
DOC> should increase with time.
DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC> This script automatically chooses serial or parallel recompilation
DOC> based on the number of CPUs available (parameter cpu_count) multiplied
DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC> On RAC, this number is added across all RAC nodes.
DOC>
DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC> recompilation. Jobs are created without instance affinity so that they
DOC> can migrate across RAC nodes. Use the following queries to verify
DOC> whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC> 1. Query showing jobs created by UTL_RECOMP
DOC> SELECT job_name FROM dba_scheduler_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC> 2. Query showing UTL_RECOMP jobs that are running
DOC> SELECT job_name FROM dba_scheduler_running_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
PL/SQL procedure successfully completed.
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END 2015-08-04 15:34:04
DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#
OBJECTS WITH ERRORS
-------------------
4
DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#
ERRORS DURING RECOMPILATION
---------------------------
0
Function created.
PL/SQL procedure successfully completed.
Function dropped.
PL/SQL procedure successfully completed.
4 再次檢視失效物件個數
SQL> select count(*) from dba_objects where status='INVALID';
COUNT(*)
----------
78
六 檢視升級後資料庫版本等資訊
1 檢視資料庫個元件版本
SQL> col comp_name for a40
SQL> col status for a10
SQL> col version for a20
SQL> select comp_name,status,version from dba_server_registry;
COMP_NAME STATUS VERSION
---------------------------------------- ---------- --------------------
OWB VALID 11.2.0.1.0
Oracle Application Express VALID 3.2.1.00.10
Oracle Enterprise Manager VALID 11.2.0.3.0
OLAP Catalog VALID 11.2.0.3.0
Spatial INVALID 11.2.0.1.0
Oracle Multimedia VALID 11.2.0.3.0
Oracle XML Database VALID 11.2.0.3.0
Oracle Text VALID 11.2.0.3.0
Oracle Expression Filter VALID 11.2.0.1.0
Oracle Rules Manager VALID 11.2.0.1.0
Oracle Workspace Manager VALID 11.2.0.1.0
COMP_NAME STATUS VERSION
---------------------------------------- ---------- --------------------
Oracle Database Catalog Views VALID 11.2.0.3.0
Oracle Database Packages and Types VALID 11.2.0.3.0
JServer JAVA Virtual Machine VALID 11.2.0.3.0
Oracle XDK VALID 11.2.0.3.0
Oracle Database Java Packages VALID 11.2.0.3.0
OLAP Analytic Workspace VALID 11.2.0.3.0
Oracle OLAP API VALID 11.2.0.1.0
18 rows selected.
2 檢視資料庫版本號
SQL> select * from v$version where rownum<=2;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
[oracle@chen ~]$ emctl status dbconsole
Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
[oracle@chen ~]$ export ORACLE_UNQNAME=$ORACLE_SID
[oracle@chen ~]$ emctl status dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.2.4/oc4j/j2ee/OC4J_DBConsole_chen_chen not found.
歡迎關注我的微信公眾號"IT小Chen",共同學習,共同成長!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-1761824/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle資料庫11.2.0.3升級到11.2.0.4Oracle資料庫
- 靜默方式安裝、升級oracle(三): 升級資料庫軟體及資料庫Oracle資料庫
- Oracle資料庫升級或資料遷移的方法探討Oracle資料庫
- oracle資料庫升級的時候oracle universal installer has detected........Oracle資料庫
- 【資料庫升級】Oracle指令碼升級12c CDB to 19c CDB資料庫Oracle指令碼
- 靜默方式安裝、升級oracle(二): 建立資料庫Oracle資料庫
- 資料庫升級之-Dataguard滾動升級資料庫
- 資料庫升級之-資料泵資料庫
- 資料庫升級之-XTTS資料庫TTS
- 資料庫升級和工具資料庫
- android資料庫如何進行版本升級?架構之資料庫框架升級Android資料庫架構框架
- 13 使用SQL Apply 升級資料庫SQLAPP資料庫
- 資料庫升級-物理重新整理資料字典資料庫
- iOS 資料庫升級資料遷移解決方案iOS資料庫
- 自定義開發資料庫升級程式資料庫
- Oracle 12c系列(九) | 通過unplug與plug方式升級pdb資料庫Oracle資料庫
- 故障分析 | MySQL 資料庫升級後,資料庫怎麼卡住了MySql資料庫
- phpStudy2018 升級資料庫 MySQL5.7PHP資料庫MySql
- IvorySQL3.0:基於PG16.0最新核心,實現相容Oracle資料庫再升級SQLOracle資料庫
- Android 資料庫綜述(一) 資料庫片的升級與資料的遷移操作Android資料庫
- oracle 10 rac 升級 10.2.0.1升級到10.2.0.5Oracle
- 如何理解騰訊雲資料庫戰略升級?資料庫
- 【資料庫】mysql5.6升級至5.7(物理方式)資料庫MySql
- iOS CoreData (二) 版本升級和資料庫遷移iOS資料庫
- Android 中的升級資料庫最佳方法實踐Android資料庫
- 成為MySQL DBA 部落格系列-資料庫升級MySql資料庫
- oracle升級後資料檔案路徑變為大寫Oracle
- Oracle 9i 11g歷史庫升級遷移資料至19c CDBOracle
- 「Oracle」Oracle 資料庫安裝Oracle資料庫
- 不起介面,用response file的方式升級資料庫資料庫
- Oracle資料庫配置Oracle資料庫
- Oracle 10.2.0.5升級至11.2.0.4Oracle
- Oracle 12.2新特性: PDB級閃回資料庫(Flashback PDB)Oracle資料庫
- 【Oracle升級】Oracle指令碼升級11g to 19c non-CDBOracle指令碼
- oracle資料庫與oracle例項Oracle資料庫
- 「Oracle」Oracle 資料庫基本概念Oracle資料庫
- 「Oracle」Oracle資料庫基本概念Oracle資料庫
- Oracle資料庫-----資料庫的基本概念Oracle資料庫
- oracle 備份資料庫,匯出資料庫Oracle資料庫