1. application scenarios:
Environment:
Host Name ip vip sid DiskGroup
Db1 1.1.1.1 1.1.1.11 bkjia DATA1
Db2 1.1.1.2 1.1.1.12 bkjiadb DATA2
Expected results:
Db1 and db2 can be backed up to each other. Here db1 is used as the master database, and db2 is used as the slave database to explain how to mount the disk groups DATA1, DATA2, and, all running instances bkjia and bkjiadb use virtual IP addresses as client access;
2 steps:
I. Backup
1. Create the parameter files and pwd files of the DB1 database (bkjia) on the DB2 server in advance, and create the adump, dpdump, and pfile directories under the $ Oracle_BASE/admin/$ SID directory.
Use oracle user operations in DB1 (1.1:
# Scp $ ORACLE_HOME/dbs/init $ SID. ora 1.1.1.2: $ ORACLE_HOME/dbs/
# Scp $ ORACLE_HOME/dbs/orapw $ SID. 1.1.1.2: $ ORACLE_HOME/dbs/
# Scp $ ORACLE_HOME/dbs/spfile $ SID. ora 1.1.1.2: $ ORACLE_HOME/dbs/
# Ssh 1.1.1.2 mkdir-p $ ORACLE_BASE/admin/$ SID/adump
# Ssh 1.1.1.2 mkdir-p $ ORACLE_BASE/admin/$ SID/dpdump
# Ssh 1.1.1.2mkdir-p $ ORACLE_BASE/admin/$ SID/hdump
# Ssh 1.1.1.2 mkdir-p $ ORACLE_BASE/admin/$ SID/pfile
2. mount the disk group on DB2;
# Sqlplus/as sysasm
SQL> alter diskgroup data1 mount;
3. Added Network listening in DB2;
Linux: add the second address: ifconfig eth0: 1 1.1.11/24 up
HP: add the second address: ifconfig lan0: 1 inet 1.1.1.11 netmask 255.255.255.0 up
AIX: add the second address: ifconfig en9 1.1.1.1 netmask 255.255.0 alias
Ifconfig en9 1.1.1.1 netmask limit 255.0 delete # delete address
# Add to/etc/rc.net Automatic startup;
4. parameter file for adding a disk group to asm in DB2 (optional)
Alter system set asm_diskgroups = 'data1' scope = spfile;
5. Add DB2 to the Current GRID group;
Oracle users:
# Srvctl add db-d bkjia-o $ ORACLE_HOME
6. Start the database in DB2:
Method 1
# Srvctl start db-d bkjia
Method 2
1) Change ORACLE_SID to the sid of the faulty Database
2) sqlplus/as sysdba
> Startup
Ii. Recovery:
1) Stop on DB2
# Stop db-d bkjia
2) Remove the Grid group from DB2
# Srvctl remove db-d bkjia
3) umount data disk group on DB2
# Sqlplus as sysasm
> Alter diskgroup data1 dismount
4) Remove a disk group from DB2
# Srvctl remove diskgroup-g data1
5) mount the database again in DB1.
# Alter diskgroup data1 mount
# Sqlplus/as sysdba
> Startup
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12