• Nenhum resultado encontrado

Restoring Oracle Enterprise Manager

No documento 1 Introduction to the Database Upgrade Process (páginas 124-128)

Perform Post-Downgrade Tasks

Oracle Real Application Clusters (Oracle RAC) database or an Automatic Storage Management (ASM) database, as follows:

Single-Instance Oracle Database Without ASM 111Home/bin/emca -restore db

You are prompted to enter the following information:

Oracle home for the database to be restored

Database SID

Listener port number

Oracle RAC Database Without ASM 111Home/bin/emca -restore db -cluster

You are prompted to enter the following information:

Oracle home for the database to be restored

Database unique name

Listener port number

Single-Instance Oracle ASM Instance 111Home/bin/emca -restore asm

You are prompted to enter the following information:

Oracle home for the database to be restored

ASM port

ASM SID

Oracle RAC ASM Instance

111Home/bin/emca -restore asm -cluster

You are prompted to enter the following information:

Oracle home for the database to be restored

ASM port

Single-Instance Oracle Database With ASM 111Home/bin/emca -restore db_asm

You are prompted to enter the following information:

Oracle home for the database to be restored

Database SID

Listener port number

ASM port

Note: Use the Oracle Database 11g Release 2 (11.2) version of emca for this procedure.

ASM Oracle home

ASM SID [+ASM]

Oracle RAC Database and ASM Instance 111Home/bin/emca -restore db_asm -cluster

You are prompted to enter the following information:

Oracle home for the database to be restored

Database unique name

Listener port number

ASM port

ASM Oracle home

ASM SID [+ASM]

The output of emca will vary with the options you specify and the values you enter at the prompts; but it will look something like this:

> emca -restore db

STARTED EMCA at Mar 23, 2007 2:44:17 PM

EM Configuration Assistant, Version 11.1.0.3.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:

Mar 23, 2007 2:44:17 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine SEVERE: No SID specified

ORACLE_HOME for the database to be restored: /scratch/oracle/10.2.0/product/db_1 Database SID: DB102

Listener port number: 1521 Password for SYS user: oracle

Do you wish to continue? [yes(Y)/no(N)]: Y

Mar 23, 2007 2:47:29 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at

/scratch/oracle/cfgtoollogs/emca/DB102/emca_2007_03_23_14_44_17.log.

Mar 23, 2007 2:47:30 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ...

Mar 23, 2007 2:47:41 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ...

Mar 23, 2007 2:48:06 PM oracle.sysman.emcp.EMDBPostConfig performRestore INFO: Database Control started successfully

Mar 23, 2007 2:48:06 PM oracle.sysman.emcp.EMDBPostConfig performRestore

INFO: >>>> The Database Control URL is http://stadd17.us.oracle.com:1158/em <<<<<<

Enterprise Manager configuration completed successfully FINISHED EMCA at Mar 23, 2007 2:48:06 PM

For an inplace patchset upgrade, the original home backup you saved before applying the patchset must be restored. This step must be repeated on all the nodes in RAC environments. Running the emca -restore command is not required for an inplace patchset upgrade.

After completing the emca -restore procedure you are ready to restore the Oracle Enterprise Manager Database files and data with the emdwgrd utility. You must run the emdwgrd utility from the Oracle Database 11g Release 2 (11.2) home. But ORACLE_

HOME and other environment variables must be set to point to the Oracle home from which the upgrade originally took place.

Perform Post-Downgrade Tasks

The following procedure is for Linux and UNIX. To run it on Windows, simply substitute emdwgrd.bat for emdwgrd.

Follow these steps to restore your Database Control files and data:

1. Set ORACLE_HOME to the Oracle home from which the database upgrade originally took place.

For an inplace patchset upgrade, restore the backup of the original home (with one-off patch of Bug 7131048 if upgrading from 11.1.0.6), and set ORACLE_HOME to the current Oracle home.

2. Set ORACLE_SID to the SID of the database that was upgraded and then downgraded.

3. Set PATH, LD_LIBRARY_PATH and SHLIB_PATH to point to the Oracle home from which the database upgrade originally took place.

4. Go to the Oracle Database 11g Release 2 (11.2) home:

cd ORACLE_HOME/bin

5. Execute one of the following:

a. For a single-instance database, run the following command, where SID is the SID of the database that was upgraded and then downgraded and save_

directory is the path to the storage location you chose when saving your Database Control files and data:

emdwgrd -restore -sid SID -path save_sirectory -tempTablespace TEMP

b. For an Oracle RAC database, remote copy is required across the cluster nodes.

Define an environment variable to indicate which remote copy is configured.

For example:

setenv EM_REMCP /usr/bin/scp

Then, execute the following restore command:

emdwgrd -restore -tempTablespace TEMP -cluster -sid SID10g -path save_

directory

If 10g Oracle home is on a shared device, add -shared to the previous command line.

6. Enter the SYS and SYSMAN passwords when prompted by emdwgrd.

7. On a single-instance database, the emdwgrd utility produces output similar to the following:

Sat Apr 28 09:27:09 2007 - Verify EM DB Control files ... pass Sat Apr 28 09:27:09 2007 - Validating DB Connection to DB102 ... pass Sat Apr 28 09:27:19 2007 - Validating TEMP tablespace in DB102 ... pass Sat Apr 28 09:27:20 2007 - creating directory ... created

Sat Apr 28 09:27:20 2007 - Stopping DB Control ... stopped Sat Apr 28 09:27:21 2007 - dropping sysman schema ... dropped Sat Apr 28 09:27:22 2007 - recreating sysman user ... recreated Sat Apr 28 09:27:23 2007 - Restoring DB Control files ... restored Sat Apr 28 09:27:23 2007 - Importing sysman schema ... imported Sat Apr 28 09:30:42 2007 - recompiling invalid objects ... recompiled Sat Apr 28 09:30:54 2007 - Starting DB Control ... started

Sat Apr 28 09:32:37 2007 - DB Control was restored successfully.

When emdwgrd finishes, Oracle Enterprise Manager Database Control has been downgraded to the old Oracle home.

On an Oracle RAC database, the emdwgrd utility produces output similar to the following:

$ /scratch/oracle/product/11.1.0/db_1/bin/emdwgrd -srcOracleHome $ORACLE_HOME -sid DB102 -path /scratch/rpattabh/ravi/tmp/dbcdir5 -restore –cluster

-tempTablespace TEMP

Enter sys password for database DB102?

*****

Enter sysman password for database DB102?

*****

Sat Apr 28 09:27:09 2007 - Verify EM DB Control files ... pass Sat Apr 28 09:27:09 2007 - Validating DB Connection to DB102 ... pass Sat Apr 28 09:27:19 2007 - Validating TEMP tablespace in DB102 ... pass Sat Apr 28 09:27:20 2007 - creating directory ... created

Sat Apr 28 09:27:20 2007 - Stopping DB Control on all Nodes stbdq04, r101b1, /oradbnas/sangeeta/10.1.0/db, stop, 0 stbdq05, r101b2, /oradbnas/sangeeta/10.1.0/db, stop, 1 Please Execute '/tmp/racdwgrd_dbctl.sh' on Node1, Node2.

Press yes to continue when the operations are successful.

Continue (yes/no) ? y

... stopped

Sat Apr 28 09:27:21 2007 - dropping sysman schema ... dropped Sat Apr 28 09:27:22 2007 - recreating sysman user ... recreated Sat Apr 28 09:27:23 2007 - Restoring DB Control files

Executing Restore directories to node Node1 Executing Restore directories to node Node2 ... restored

Sat Apr 28 09:27:23 2007 - Importing sysman schema ... imported Sat Apr 28 09:30:42 2007 - recompiling invalid objects ... recompiled Sat Apr 28 09:32:37 2007 - DB Control was restored successfully.

Sat Apr 28 09:33:54 2007 - Starting DB Control On All nodes Please Execute '/tmp/racdwgrd_dbctl.sh' on Node1, Node2.

Press yes to continue when the operations are successful.

Continue (yes/no) ? y

... started

Sat Apr 28 09:38:57 2007 - Dump directory was dropped successfully.

No documento 1 Introduction to the Database Upgrade Process (páginas 124-128)