ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Upgrade the Database

Upgrade the Database

原创 Linux操作系统 作者:victor1010 时间:2008-09-08 17:07:42 0 删除 编辑

Upgrade the Database

After you install the patch set, you must perform. the following steps on every database associated with the upgraded Oracle home:

  1. Log in as the Oracle software owner (typically oracle).

  2. For RAC installations, start the Global Services Daemon (GSD) on each node of the cluster as follows:

    $ gsdctl start
    
    
  3. Start the Oracle Net listener as follows:

    $ lsnrctl start
    
    

    Note:

    For RAC installations, start the listener on each node of the cluster.

    If you are using the Oracle OLAP option, make sure that the listener is running.


  4. For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:

    $ sqlplus /nolog
    SQL> CONNECT / AS SYSDBA
    
    
  5. For RAC installations:

    1. Start the database as follows, where db_name is the database name:

      $ srvctl start database -d db_name
      
      
    2. Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:

      $ sqlplus /nolog
      SQL> CONNECT / AS SYSDBA
      
      
    3. Set the CLUSTER_DATABASE initialization parameter to FALSE:

       SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile;
      
      

      Note:

      If the system uses an initialization parameter file, change the value of the CLUSTER_DATABASE initialization parameter to FALSE in the initialization parameter file (initsid.ora).

    4. Exit SQL*Plus and shut down the database:

      SQL> EXIT
      $ srvctl stop database -d db_name
      
      
    5. Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:

      $ sqlplus /nolog
      SQL> CONNECT / AS SYSDBA
      
      
  6. Enter the following SQL*Plus commands:

    SQL> STARTUP MIGRATE
    SQL> SPOOL patch.log
    SQL> @?/rdbms/admin/catpatch.sql
    SQL> SPOOL OFF
    
    
  7. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catpatch.sql script.

    This list provides the version and status of each SERVER component in the database.

  8. If necessary, rerun the catpatch.sql script. after correcting any problems.

  9. Restart the database:

    SQL> SHUTDOWN
    SQL> STARTUP
    
    
  10. 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
    
    
  11. For RAC installations:

    1. Set the CLUSTER_DATABASE initialization parameter to TRUE:

       SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile;
      

      Note:

      If the system uses an initialization parameter file, change the value of the CLUSTER_DATABASE initialization parameters to TRUE in the initialization parameter file (initsid.ora).

    2. Restart the database:

      SQL> SHUTDOWN
      SQL> STARTUP
      
      
  12. If you are using the Oracle Recovery Manager catalog, enter the following command:

    $ rman catalog username/password@alias
    RMAN> UPGRADE CATALOG;
    
    
  13. If Oracle Internet Directory release 9.2.0 is installed in the Oracle home, run the following shell script.


    Note:

    Make sure that the database and database listener are running, and all parameters for the oidpatchca.sh script. are specified before running the script.

    $ORACLE_HOME/bin/oidpatchca.sh
    -connect Connect_String
    -lsnrport Listener_Port
    -systempwd SYSTEM_Password
    -odspwd ODS_Password
    -sudn Super-User_DN
    -supwd Super-User_Password
    -dippwd Password_to_register_DIP_Server
    
    

    In the preceding example, Password_to_register_DIP_Server must conform. to the password policy in the Oracle Internet Directory server.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8102208/viewspace-442396/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: flush buffer cache
请登录后发表评论 登录
全部评论

注册时间:2008-04-29

  • 博文量
    296
  • 访问量
    626158