打Oracle 10.2.0.3.0補丁前安裝了資料庫,需要執行以下步驟Upgrade資料庫

ljm0211發表於2012-06-20
如果在打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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章