如果在打Oracle 10.2.0.3.0补丁前安装了数据库,数据库打开时会报错,需要执行以下步骤Upgrade数据库。
7.2.2.2 Upgrading a Release 10.2 Database
After you install the patch set, you must perform. the following steps on every database associated with the upgraded Oracle home:
Note:
If you do not run the catupgrd.sql script. as described in this section and you start up a database for normal operation, then ORA-01092:ORACLE instance terminated. Disconnection forced errors will occur and the error ORA-39700:database must be opened with UPGRADE option will be in the alert log.
1.
Log in as the Oracle software owner user.
2.
For Oracle RAC installations, start listener on each node of the cluster as follows:
$ srvctl start listener -n node
3.
If you are using Automatic Storage Management, start the Automatic Storage Management instance.
4.
For single-instance installations, start the listener as follows:
$ lsnrctl start
5.
For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
$ sqlplus /nolog
SQL> CONNECT SYS/SYS_password AS SYSDBA
6.
For Oracle RAC installations:
1.
Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:
$ sqlplus /nolog
SQL> CONNECT SYS/SYS_password AS SYSDBA
SQL> STARTUP NOMOUNT
2.
Set the CLUSTER_DATABASE initialization parameter to FALSE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
3.
Shut down the database:
SQL> SHUTDOWN
7.
Enter the following SQL*Plus commands:
SQL> STARTUP UPGRADE
SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF
8.
Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.
This list provides the version and status of each SERVER component in the database.
9.
If necessary, rerun the catupgrd.sql script. after correcting any problems.
10.
Restart the database:
SQL> SHUTDOWN
SQL> STARTUP
11.
Run the utlrp.sql script. to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
SQL> @?/rdbms/admin/utlrp.sql
Note:
When the 10.2.0.3 patch set is applied to an Oracle Database 10g Standard Edition database, there may be 42 invalid objects after the utlrp.sql script. runs. These objects belong to the unsupported components and do not affect the database operation.
Ignore any messages indicating that the database contains invalid recycle bin objects similar to the following:
BIN$4lzljWIt9gfgMFeM2hVSoA==$0
12.
If you are using the Oracle Recovery Manager catalog, enter the following command:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
13.
For Oracle RAC installations:
1.
Set the CLUSTER_DATABASE initialization parameter to TRUE:
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
2.
Restart the database:
SQL> SHUTDOWN
SQL> STARTUP
3.
Start any processes that you want to use:
$ srvctl start service -d db_name -s service_name
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11411056/viewspace-733376/,如需转载,请注明出处,否则将追究法律责任。