Vous êtes sur la page 1sur 18

10 Postinstallation Tasks Review the information in this section before using the upgraded software.

This section lists required and optional postinstallation tasks, depending on the installation type and the products that you want to use.

Upgrading Earlier Oracle Database to Oracle Database 10g Release 2 (10.2.0.5) Updating Oracle Time Zone Definitions Running changePerm.sh Script on an Oracle Database Server Home Enabling Oracle Database Vault Configuring Oracle Configuration Manager in a Cloned Oracle Home Upgrading Oracle Database 10g Release 10.2.0.x to Oracle Database 10g Release 10.2.0.5 Redeploying Oracle Workflow Server Redeploying Oracle Ultra Search

10.1 Upgrading Earlier Oracle Database to Oracle Database 10 g Release 2 (10.2.0.5) Review the following sections before upgrading an earlier Database to Oracle Database 10g release 2 (10.2.0.5):

Upgrading Earlier Oracle Database Releases to Oracle Database 10g Release 2 (10.2.0.5) Upgrading a Release 9.2 Database Not Using Oracle Label Security Missing Components When Upgrading

10.1.1 Upgrading Earlier Oracle Database Releases to Oracle Database 10 g Release 2 (10.2.0.5) For information about upgrading Oracle Databases from an earlier Oracle Database (Oracle8i, Oracle9i, or Oracle Database 10g), see Oracle Database Upgrade Guide. If you are upgrading an Oracle RAC database, refer to Oracle Real Application Clusters Administration Guide as well. 10.1.2 Upgrading a Release 9.2 Database Not Using Oracle Label Security

To avoid errors when upgrading from release 9.2, Oracle Label Security should be installed. Use one of the following methods to check if Oracle Label Security is installed:

If the catnools.sql script exists on the computer, Oracle Label Security is installed. Check the inventory at the end of the installAction log file for the base version installation (9.2). If Oracle Label Security is installed, Label Security is listed in the inventory section of the log file. Use the following commands to check if Oracle Label Security is installed with the 9.2 database: $ sqlplus SQL> CONNECT SYS AS SYSDBA Enter password:password SELECT * FROM V$OPTION WHERE PARAMETER = 'Oracle Label Security';

To upgrade an Oracle9i release 9.2 preconfigured database, and you are not using Oracle Label Security, complete the following steps to avoid errors during the upgrade: 1. Use Oracle Universal Installer release 9.2 to install Oracle Label Security using the Custom installation type. 2. Run the catnools.sql script, located in the /rdbms/admin directory under the Oracle home, with the SYSDBA privilege to remove Oracle Label Security components from the database. 10.1.3 Missing Components When Upgrading When you upgrade Oracle Database 10g Release 1 (10.1.0.5) to Oracle Database 10g Release 2 (10.2.0.5), the diagnostics of the preupgrade utility script utlu102.sql may indicate that some database components on the 10g Companion CD should be installed. You should install these components from the Oracle Database 10g Release 1 (10.1.0.5) Companion CD before applying this patch set. If the catupgrd.sql script cannot upgrade a SERVER component because it was not installed from the Companion CD, then the status of the SERVER component in the patch.log file is reported as NO SCRIPT. Note:

If the preupgrade script indicates the Server JAVA Virtual Machine's JAccelerator (NCOMP) or Oracle interMedia Image Accelerator should be installed, but they are not installed before applying the patch set, then the patch.log file contains the status of their parent components as successfully upgraded to Oracle Database 10g Release 2 (10.2.0.5) even though these components are still missing. If you find any component, which was identified as missing by the preupgrade utility script, was not installed before running the catupgrd.sql script, then install the missing component from the Companion CD and run the catupgrd.sql script again. 10.2 Updating Oracle Time Zone Definitions Based on the result you had in Section 8.5, "Update Oracle Time Zone Definitions" regarding the DST (Oracle time zone definitions):

If the DST version in 8.5 was 4, no action is required. If f the DST version in 8.5 was higher than 4, reapply the version of DST patches as described in My Oracle Support (formerly OracleMetaLink) document 1086400.1 Actions for the DSTv4 update in the 10.2.0.5 patchset. If the DST version in 8.5 was lower then 4, restore TSTZ data from backup (if any). For more information, see My Oracle Support document 1086400.1 Actions for the DSTv4 update in the 10.2.0.5 patchset. If you are upgrading from Release 8.1.7 directly to Release 10.2.0.5, no action is required.

10.3 Running changePerm.sh Script on an Oracle Database Server Home Important: Oracle recommends using the most restrictive file permissions possible for the given implementation. Perform these optional steps only after considering all security ramifications and only if you need to share this installation. During patch set installation, all new files and directories are created with restricted access, by default. Users or third party applications with a different group identifier from that of the database, which try to access client-side utilities or libraries in the database home, will see permission errors when trying to access these files or directories. Perform the following steps to change the permissions: 1. Change to the install directory by using the following command: 2. $ cd $ORACLE_HOME/install

3. Run changePerm.sh and specify the patched server Oracle home location, before accessing client-side utilities or libraries in the
database home. Note: If you are applying patch to Oracle RAC home, then you will need to run this script on all the nodes. 10.4 Enabling Oracle Database Vault For installations with Oracle Database Vault, complete the following steps: 1. Restart the database: For a single-instance database, use the following commands: sqlplus SYS "AS SYSDBA" Enter password: SQL> SHUTDOWN IMMEDIATE SQL> STARTUP For an Oracle Real Application Clusters (Oracle RAC) database, use the following commands: $ORACLE_HOME/bin/srvctl stop database -d db_name $ORACLE_HOME/bin/srvctl start database -d db_name

2. Connect AS SYSDBA and run the following SQL statements:


3. SQL> DECLARE 4. 5. CURSOR stmt IS SELECT u.name, o.name, r.pname FROM user$ u, obj$ o, rls$ r WHERE u.user# = o.owner#

6. 7.

8. AND r.obj# = o.obj# 9. AND bitand(r.stmt_type,65536) > 0; 10. 11. object_schema VARCHAR2(32) := NULL; 12. object_name VARCHAR2(32) := NULL; 13. policy_name VARCHAR2(32) := NULL; 14. 15. BEGIN 16. OPEN stmt; 17. LOOP 18. FETCH stmt INTO object_schema, 19. object_name, 20. policy_name; 21. EXIT WHEN stmt%NOTFOUND; 22. DBMS_RLS.DROP_POLICY( 23. '"'||object_schema||'"', 24. '"'||object_name||'"', 25. '"'||policy_name||'"'); 26. END LOOP; 27. CLOSE stmt; 28. END; 29. / 30. Run DVCA to reconfigure Database Vault. Use the following syntax: 31. $ORACLE_HOME/bin/dvca -action option 32. -oh oracle_home 33. -jdbc_str jdbc_connection_string 34. -owner_account DV_owner_account_name 35. [-acctmgr_account DV_account_manager_account_name] 36. [-logfile ./dvca.log] [-nodecrypt] Where:

- action: The action to perform. option creates the Database Vault schema objects, creates the DV_OWNER account and the optional DV_ACCTMGR account, and deploys the Database Vault Administrator application. - oh: The absolute path of the Oracle home for the database - jdbc_str: The JDBC connection string used to connect to the database. For example, jdbc:oracle:oci:@orcl1, where orcl1 is the net service name in the tnsnames.ora file ($ORACLE_HOME\network\admin\tnsnames.ora). - owner_account: Oracle Database Vault Owner account name - acctmgr_account: (Optional) Oracle Database Vault Account Manager user - logfile: Optionally, specify a log file name and location. You can enter an absolute path or a path that is relative to the location of the ORACLE_BASE\ORACLE_HOME\bin directory - nodecrypt: Reads plaintext passwords as passed on the command line. You must use this option if you are passing plaintext passwords to the command. Note: You are prompted to enter the SYS, Database Vault Owner, and Database Vault Account Manager passwords. See Also:

Oracle Database Vault Installation Guide, Appendix C "Running DVCA After Creating a Database Vault Database" for more options available with the dvca -action command

37. Run Oracle Database Vault Configuration Assistant (DVCA) by using the dvca -action enable option. This enables the Database
Vault triggers. Use the following syntax: 38. dvca -action enable

39. 40.
41. 42. 43.

-service service_name -owner_account DV_owner_account_name [-logfile ./dvca.log] [-nodecrypt]

44. 45.

Enter SYS password: SYS_password Enter owner password: owner_password 46. Lock the DVSYS account. Use the following SQL statements: 47. SQL> CONNECT SYS "AS SYSDBA" 48. Enter password: 49. SQL> ALTER USER DVSYS ACCOUNT LOCK; 50. Shut down the database. To stop a single-instance database, use the following commands: sqlplus SYS "AS SYSDBA" Enter password: SQL> SHUTDOWN IMMEDIATE For an Oracle RAC database, use the following command: $ORACLE_HOME/bin/srvctl stop database -d db_name 51. Relink the Oracle executable to turn on the Oracle Database Vault option. Use the following commands: Turn on Database Vault. cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk dv_on cd $ORACLE_HOME/bin relink all Note:

For an Oracle RAC database, you must repeat the preceding commands on all nodes. 52. Start the database. For a single-instance database, use the following commands: sqlplus SYS "AS SYSDBA" Enter password: SQL> startup For an Oracle RAC database, use the following command: $ORACLE_HOME/bin/srvctl start database -d db_name

53. If you wish to disable connections with SYSDBA privileges, then re-create the password file with the nosysdba=y and force=y flags.
Use the following syntax: 54. orapwd file=$ORACLE_HOME/dbs/orapwSID password=password force=y nosysdba=y Here SID is the Oracle system identifier (SID) of the database, and password is the password for the SYS account. 10.5 Configuring Oracle Configuration Manager in a Cloned Oracle Home If you have installed and configured Oracle Configuration Manager in the original Oracle home directory, then complete the following procedure:

1. In the cloned Oracle home, remove all the subdirectories of the $ORACLE_HOME/ccr/hosts directory to remove the previously
configured hosts. 2. In the cloned Oracle home, run the following command: 3. $ configCCR -a

If you have installed Oracle Configuration Manager in the original Oracle home but have not configured it, then run the following command to configure it in the cloned Oracle home: $ setupCCR 10.6 Upgrading Oracle Database 10 g Release 10.2.0. x to Oracle Database 10 g Release 10.2.0.5 See one of the following sections for upgrading an Oracle Database 10g release 10.2.0.x to Oracle Database 10g release 10.2.0.5:

Upgrading a Release 10.2 Database using Oracle Database Upgrade Assistant Manually Upgrading a Release 10.2 Database

10.6.1 Upgrading a Release 10.2 Database using Oracle Database Upgrade Assistant 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 Oracle Database Upgrade Assistant as described in this section, the following errors are displayed on attempting to start the database: ORA-01092: ORACLE instance terminated. ORA-39700: database must be opened with UPGRADE option. 1. Log in as the Oracle software owner user. 2. Set the values for the environment variables $ORACLE_HOME, $ORACLE_SID and $PATH. 3. For single-instance installations, if you are using Automatic Storage Management, start the Automatic Storage Management instance. 4. For Oracle single-instance installations, start the listener as follows: 5. $ lsnrctl start listenername 6. Run Oracle Database Upgrade Assistant either in the interactive or noninteractive mode:

Interactive mode: Enter the following command from the command prompt: $ dbua Note: DBUA may edit initialization parameters in the init.ora file or net services in the tnsnames.ora file of the current database. Back up init.ora file and tnsnames.ora file when upgrading to 10.2.0.5 with DBUA. Complete the following steps displayed in the Oracle Database Upgrade Assistant screen:

a. On the Welcome screen, click Next. b. On the Databases screen, select the name of the Oracle Database that you want to update, then click Next.
Note: For Oracle RAC, enter the SYS password to do the upgrade.

c. On the Recompile Invalid Objects screen, select the Recompile the invalid objects at the end of upgrade option, then
click Next. d. If you have not taken the back up of the database earlier, on the Backup screen, select the I would like to take this tool to backup the database option, stipulate the Path, then click Next. e. On the Summary screen, check the summary, then click Finish. f. On the End of Database Upgrade Assistant's Upgrade Results screen, click Close to exit from Oracle Database Upgrade Assistant. Note: If you are upgrading a database having Database Control configured in non-secure mode, after upgrade Database Control will run in secure mode.

7. If you are using the Oracle Recovery Manager catalog, enter the following command: 8. $ rman catalog username/password@alias 9. RMAN> UPGRADE CATALOG; 10. For Oracle RAC installations, start any database services that you want to use by entering the following command: 11. $ srvctl start service -d db_name -s service_name Noninteractive mode: Enter the following command to upgrade Oracle Database using Oracle Database Upgrade Assistant in noninteractive mode: $ dbua -silent -dbname $ORACLE_SID -oracleHome $ORACLE_HOME -sysDBAUserName UserName -sysDBAPassword SYS_password -recompile_invalid_objects true 10.6.2 Manually Upgrading a Release 10.2 Database Complete the following sections to upgrade an Oracle Database 10g release 10.2.0.x to Oracle Database 10g release 10.2.0.5:

1. Run the Pre-Upgrade Information Tool 2. Upgrading a Release 10.2 Database


10.6.2.1 Run the Pre-Upgrade Information Tool If you are upgrading database manually, then you should analyze it by running the Pre-Upgrade Information Tool. Running pre-upgrade utility tools (utlu102i.sql) is required for release upgrade (e.g 9.2.0.x to 10.2.0.x or 10.1.0.x to 10.2.0.x) and your database would open in NORMAL mode for running the utlu102i.sql script for release upgrade. It is not required to run utlu102i.sql for patch set/version upgrade (for example, 10.2.0.x to 10.2.0.5) but it is recommended to run it. If you have installed 10.2.0.5 patch set on the top of the existing 10.2.0.x Oracle Home then the database must be open in UPGRADE Mode only for running utlu102i.sql. The PreUpgrade Information Tool is a SQL script that ships with Oracle Database 10.2. Complete the following procedure to run the Pre-Upgrade Information Tool:

1. Start the database in the UPGRADE mode:


2. 3. 4. 5. 6. 7. 8.

SQL> STARTUP UPGRADE Set the system to spool results to a log file for later analysis: SQL> SPOOL upgrade_info.log Run the Pre-Upgrade Information Tool: SQL> @/rdbms/admin/utlu102i.sql Turn off the spooling of script results to the log file: SQL> SPOOL OFF

Check the output of the Pre-Upgrade Information Tool in the upgrade_info.log file. The following is an example of the output generated by the Pre-Upgrade Information Tool: Oracle Database 10.2 Upgrade Information Utility 02-04-2008 11:48:11 . ********************************************************************** Database: ********************************************************************** --> name: X102050 --> version: 10.2.0.1.0 --> compatible: 10.2.0.1 --> blocksize: 8192 . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade. .... minimum required size: 505 MB .... AUTOEXTEND additional space required: 15 MB --> UNDOTBS1 tablespace is adequate for the upgrade. .... minimum required size: 401 MB .... AUTOEXTEND additional space required: 376 MB --> SYSAUX tablespace is adequate for the upgrade. .... minimum required size: 265 MB

.... AUTOEXTEND additional space required: 15 MB --> TEMP tablespace is adequate for the upgrade. .... minimum required size: 58 MB .... AUTOEXTEND additional space required: 38 MB --> EXAMPLE tablespace is adequate for the upgrade. .... minimum required size: 69 MB . ********************************************************************** Update Parameters: [Update Oracle Database 10.2 init.ora or spfile] ********************************************************************** WARNING: --> "shared_pool_size" needs to be increased to at least 167772160 WARNING: --> "java_pool_size" needs to be increased to at least 67108864 . ********************************************************************** 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 Java Packages [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [upgrade] VALID --> Oracle Workspace Manager [upgrade] VALID --> Oracle Data Mining [upgrade] VALID --> Messaging Gateway [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> Oracle OLAP API [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID --> Oracle Ultra Search [upgrade] VALID --> Oracle Label Security [upgrade] VALID --> Expression Filter [upgrade] VALID

--> EM Repository [upgrade] --> Rule Manager [upgrade] PL/SQL procedure successfully completed.

VALID VALID

The following sections describe the output of the Pre-Upgrade Information Tool. Database This section displays global database information about the current database, such as the database name and release number before the database is upgraded. Tablespaces This section displays a list of tablespaces in the current database. For each tablespace, the tablespace name and minimum required size is displayed. In addition, a message is displayed if the tablespace is adequate for the upgrade. If the tablespace does not have enough free space, then space must be added to the tablespace in the current database. Tablespace adjustments must be made before the database is upgraded. Update/Obsolete/Deprecated Parameters These sections display a list of initialization parameters in the parameter file of the current database that should be adjusted before the database is upgraded. The adjustments must be made to the Oracle Database 10.2 init.ora or spfile. Components This section displays a list of database components that are upgraded or installed when the current database is upgraded. 10.6.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: 3. $ srvctl start listener -n node 4. If you are using Automatic Storage Management, start the Automatic Storage Management instance. 5. For single-instance installations, start the listener as follows: 6. $ lsnrctl start 7. For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges: 8. $ sqlplus /nolog 9. SQL> CONNECT SYS AS SYSDBA 10. Enter password:SYS_password Users of single-instance implementations should now bypass steps that apply to Oracle RAC installations. 11. For Oracle RAC installations: a. Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges: b. $ sqlplus /nolog c. SQL> CONNECT SYS AS SYSDBA d. Enter password: SYS_password e. SQL> STARTUP NOMOUNT f. Set the CLUSTER_DATABASE initialization parameter to FALSE: g. SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile; h. Shut down the database: i. SQL> SHUTDOWN 12. Enter the following SQL*Plus commands: 13. SQL> STARTUP UPGRADE 14. SQL> SPOOL patch.log

15. SQL> @?/rdbms/admin/catupgrd.sql 16. SQL> SPOOL OFF 17. 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.

18. If necessary, rerun the catupgrd.sql script after correcting any problems.
19. Restart the database: 20. SQL> SHUTDOWN IMMEDIATE 21. SQL> STARTUP 22. 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. 23. SQL> @?/rdbms/admin/utlrp.sql Note: When the 10.2.0.5 patch set is applied to an Oracle10g Standard Edition database, there may be 54 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 24. Run the following command to check the status of all the components after the upgrade: 25. SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY; In the output of the preceding command, the status of all the components should be VALID for a successful upgrade. 26. If you are using the Oracle Recovery Manager catalog, enter the following command: 27. $ rman catalog username/password@alias 28. RMAN> UPGRADE CATALOG; 29. For Oracle RAC installations:

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile; Restart the database: SQL> SHUTDOWN IMMEDIATE SQL> STARTUP Start any database services that you want to use: g. $ srvctl start service -d db_name -s service_name 30. To configure and secure Enterprise Manager follow these steps: Ensure the database and Listener are operational. o o o o Note: In the emca In the emca case of a single instance, execute -upgrade db case of Oracle RAC, execute -upgrade db -cluster

a. Set the CLUSTER_DATABASE initialization parameter to TRUE:


b. c. d. e. f.

If you are upgrading a database having Oracle Database Control configured in non-secure mode, after upgrade Oracle Database Control will run in secure mode. 10.7 Redeploying Oracle Workflow Server If you have deployed Oracle Workflow Server, then you need to redeploy it after installing the 10.2.0.5 patch set. To redeploy the Oracle Workflow Server: 1. Stop the Workflow Manager. Use the following command: 2. $ORACLE_HOME/wf/admin/wfmgrstop.sh 3. Back up the existing deploy_db_wf.ini file. You can find this file at the following location: 4. $ORACLE_HOME/oc4j/j2ee/deploy_db_wf.ini 5. Modify the deploy_db_wf.ini file to add the DEPLOYED=TRUE keyword to the Listener and Mailer sections:

6. [application] 7. CMP_NAME=OC4J_Workflow_Component_Container 8. APP_DEPLOYMENT_NAME=WFALSNRSVCApp 9. DEPLOYED=true 10. .... 11. [application] 12. CMP_NAME=OC4J_Workflow_Component_Container 13. APP_DEPLOYMENT_NAME=WFMLRSVCApp 14. DEPLOYED=true 15. Deploy the new Workflow Manager ear file: 16. $ORACLE_HOME/jdk/bin/java -classpath \ 17. $ORACLE_HOME/oc4j/j2ee/home/oc4j.jar:$ORACLE_HOME/jlib/srvm.jar:\ 18. $ORACLE_HOME/oc4j/j2ee/home/db_oc4j_deploy.jar \ 19. oracle.j2ee.tools.deploy.DbOc4jDeploy -oraclehome \ 20. $ORACLE_HOME -inifile $ORACLE_HOME/oc4j/j2ee/deploy_db_wf.ini 21. Start the Workflow Manager: 22. $ORACLE_HOME/wf/admin/wfmgrstart.sh 10.8 Redeploying Oracle Ultra Search If you are running Oracle Ultra Search from the upgraded ORACLE_HOME, then you need to redeploy the ultrasearch_admin.ear file to your oc4j instance. To redeploy ultrasearch_admin.ear file, copy the $ORACLE_HOME/ultrasearch/webapp/ultrasearch_admin.ear file to the $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications directory.

Vous aimerez peut-être aussi