Thursday 07 August, 2008 - 11:01
Success (Almost)
I have managed to duplicate the example database onto the botany cluster using RMAN. The standby database has been registered to Grid Control.
However, I am having difficulty in getting Grid Control to manage the Standby configuration because of mismatched service names - the standby database has BOTANY.yaocm.id.au whereas Grid Control is expecting example2.yaocm.id.au.
The rough procedure is:
- Replicate the directory structure for $ORACLE_BASE/admin/example/[abcu]dump on both nodes
- Create the directory structure in ASM via ASMCMD mkdir command for:
- +DATA/example
- +DATA/BOTANY
- +FRA/example
- +FRA/BOTANY
- Create a directory called /u00/backup on padstow2 and botany2 (these nodes have more disk space because the installation software was not loaded there)
- Fiddle around with the listener configurations (need to clarify this in my next attempt)
- Using RMAN on padstow2 ,
rman target / catalog rman@rmancat backup validate database; /* checks integrity of database */ blockrecover corruption list; /* repairs any damaged blocks */ backup format="/u00/backup/%U.dbf" database; backup format="/u00/backup/%U.dbf" current controlfile for standby; sql "alter system switch logfile"; /* also done on padstow1 */ backup format="/u00/backup/%U.dbf" archivelog all; /* wrong order, but it works? */ sql "create pfile='/u00/backup/initexample2.ora' from spfile"; restore validate database; /* checks the integrity of the backup */ exit
scp /u00/backup/* botany2:/u00/backup/
example2:/u00/app/oracle/product/10.2.0/db_1:N
export ORACLE_HOME=/u00/app/oracle/product/10.2.0/db_1 export ORACLE_SID=example2 export PATH=$ORACLE_HOME/bin:$PATH # or I could use . oraenv
/u00/backup/initexample2.ora
to:
-
change the
DB_UNIQUE_NAME
toBOTANY
- add:
spfile='+DATA/example/spfileexample'
sqlplus / as sysdba startup nomount pfile='/u00/backup/initexample2.ora' create spfile='+DATA/example/spfileexample' from pfile='/u00/backup/initexample2.ora' shutdown immediate exit rman target sys@padstow2 catalog rman@rmancat auxiliary / startup clone nomount duplicate target database for standby dorecover;
At this point, the standby database appears to be up and running.
To get Grid Control to recognise the new database, I had to open the database as read-only:
sqlplus / as sysdba shutdown immediate startup mount alter database open read only;
Now the Grid Control is able to connect to the database and is thus able to be registered.