rac2節點->單節點oracle dataguard 搭建

DATAGUARD搭建

1. 二節點RAC+singledg

1.   修改歸檔

2.   準備備庫

[root@localhost~]# su - oracle

[oracle@localhost~]$ ls

database

[oracle@localhost~]$ cd $ORACLE_BASE

[oracle@localhostoracle]$ ls

admin  extapi flash_recovery_area  oradata  oraInventory product

[oracle@localhostoracle]$ pwd

/opt/oracle

[oracle@localhostoracle]$ cd oradata

[oracle@localhostoradata]$ ls

[oracle@localhostoradata]$ mkdir -p wxxrdb/datafile

[oracle@localhostoradata]$ ls

wxxrdb

[oracle@localhostoradata]$ cd wxxrdb

[oracle@localhostwxxrdb]$ ls

datafile

[oracle@localhostwxxrdb]$ pwd

/opt/oracle/oradata/wxxrdb

[oracle@localhostwxxrdb]$ ll

total 4

drwxr-xr-x2 oracle oinstall 4096 May 28 20:34 datafile

[oracle@localhostwxxrdb]$ mkdir tempfile

[oracle@localhostwxxrdb]$ cd ..

[oracle@localhostoradata]$ ls

wxxrdb

[oracle@localhostoradata]$ cd ..

[oracle@localhostoracle]$ ls

admin  extapi flash_recovery_area  oradata  oraInventory product

[oracle@localhostoracle]$ cd admin

[oracle@localhostadmin]$ ls

[oracle@localhostadmin]$ mkdir -p wxxrdb/adump

[oracle@localhostadmin]$ ls

wxxrdb

[oracle@localhostadmin]$ ll

total 4

drwxr-xr-x3 oracle oinstall 4096 May 28 20:35 wxxrdb

[oracle@localhostadmin]$ cd wxxrdb

[oracle@localhostwxxrdb]$ ls

adump

[oracle@localhostwxxrdb]$ mkdir bdump

[oracle@localhostwxxrdb]$ ls

adump  bdump

[oracle@localhostwxxrdb]$ mkdir cdump

[oracle@localhostwxxrdb]$ ll

total 12

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 adump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 bdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 cdump

[oracle@localhostwxxrdb]$ mkdir dpdump

[oracle@localhostwxxrdb]$ ls

adump  bdump cdump  dpdump

[oracle@localhostwxxrdb]$ mkdir hdump

[oracle@localhostwxxrdb]$ ls

adump  bdump cdump  dpdump  hdump

[oracle@localhostwxxrdb]$ mkdir pfile

[oracle@localhostwxxrdb]$ ls

adump  bdump cdump  dpdump  hdump pfile

[oracle@localhostwxxrdb]$ ll

total 24

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 adump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 bdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 cdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 dpdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 hdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 pfile

[oracle@localhostwxxrdb]$ mkdir udump

[oracle@localhostwxxrdb]$ ll

total 28

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 adump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 bdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 cdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 dpdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 hdump

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 pfile

drwxr-xr-x2 oracle oinstall 4096 May 28 20:35 udump

[oracle@localhost wxxrdb]$

3.配置主備庫的監聽,修改tnsnames.ora和 listener.ora  文件

WXXRDB2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbs-vip)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = wxxrdb)

      (INSTANCE_NAME = wxxrdb2)

    )

  )

 

LISTENERS_WXXRDB=

  (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbp-vip)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbs-vip)(PORT = 1521))

  )

 

WXXRDB1 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbp-vip)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = wxxrdb)

      (INSTANCE_NAME = wxxrdb1)

    )

  )

 

WXXRDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbp-vip)(PORT = 1521))

    (ADDRESS = (PROTOCOL = TCP)(HOST =dbs-vip)(PORT = 1521))

    (LOAD_BALANCE = yes)

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = wxxrdb)

    )

  )

 

WXXRDB_ST=

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.106)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = wxxrdb)

    )

  )

 

4.在主庫上創建備庫的密碼文件和控制文件,並將文件傳到備庫的相關位置

[oracle@dbp admin]$ orapwdfile=$ORACLE_HOME/dbs/orapwwxxrdb password=s123456

[oracle@dbp admin]$ cd $ORACLE_HOME/dbs

[oracle@dbp dbs]$ ls

ab_+ASM1.dat  hc_+ASM1.dat hc_wxxrdb1.dat  init+ASM1.ora  initdw.ora init.ora  initwxxrdb1.ora  orapw+ASM1 orapwwxxrdb  orapwwxxrdb1

[oracle@dbp dbs]$ scp orapwwxxrdb192.168.1.106:/opt/oracle/product/10.2.0/db_1/dbs

The authenticity of host '192.168.1.106(192.168.1.106)' can't be established.

RSA key fingerprint is f7:8e:20:1b:bc:ad:53:83:bb:11:1e:67:bd:ef:cf:84.

Are you sure you want to continueconnecting (yes/no)? yes

Warning: Permanently added '192.168.1.106'(RSA) to the list of known hosts.

Address 192.168.1.106 maps to localhost,but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

[email protected]'s password:

orapwwxxrdb                                 

 

--控制文件

 

SQL> alter database create standbycontrolfile as '/home/oracle/control01.ctl';

 

Database altered.

[oracle@dbp ~]$ scp control01.ctl192.168.1.106:/opt/oracle/oradata/wxxrdb/datafile

Address 192.168.1.106 maps to localhost,but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

[email protected]'s password:

control01.ctl                                                                                                                        100%   15MB 14.6MB/s   00:00   

[oracle@dbp ~]$

5.修改參數文件

1.修改rac參數文件,修改後如下

wxxrdb2.__db_cache_size=411041792

wxxrdb1.__db_cache_size=402653184

wxxrdb1.__java_pool_size=4194304

wxxrdb2.__java_pool_size=4194304

wxxrdb1.__large_pool_size=4194304

wxxrdb2.__large_pool_size=4194304

wxxrdb2.__shared_pool_size=184549376

wxxrdb1.__shared_pool_size=192937984

wxxrdb1.__streams_pool_size=0

wxxrdb2.__streams_pool_size=0

*.audit_file_dest='/opt/oracle/admin/wxxrdb/adump'

*.background_dump_dest='/opt/oracle/admin/wxxrdb/bdump'

*.cluster_database_instances=2

*.cluster_database=true

*.compatible='10.2.0.1.0'

*.control_files='+DATA/wxxrdb/controlfile/current.260.816201703'

*.core_dump_dest='/opt/oracle/admin/wxxrdb/cdump'

*.db_block_size=8192

*.db_create_file_dest='+DATA'

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='wxxrdb'

*.dispatchers='(PROTOCOL=TCP)(SERVICE=wxxrdbXDB)'

wxxrdb2.instance_number=2

wxxrdb1.instance_number=1

*.job_queue_processes=10

wxxrdb1.log_archive_dest_1='location=/arch/dbp_arch'

wxxrdb2.log_archive_dest_1='location=/arch/dbs_arch'

wxxrdb2.log_archive_dest_2='service=wxxrdb1  db_unique_name=wxxrdb'

wxxrdb1.log_archive_dest_2='service=wxxrdb2  db_unique_name=wxxrdb'

*.open_cursors=300

*.pga_aggregate_target=201326592

*.processes=150

*.remote_listener='LISTENERS_WXXRDB'

*.remote_login_passwordfile='exclusive'

*.sga_target=605028352

wxxrdb1.standby_archive_dest='/arch/dbs_arch'

wxxrdb2.standby_archive_dest='/arch/dbp_arch'

wxxrdb2.thread=2

wxxrdb1.thread=1

*.undo_management='AUTO'

wxxrdb1.undo_tablespace='UNDOTBS1'

wxxrdb2.undo_tablespace='UNDOTBS2'

*.user_dump_dest='/opt/oracle/admin/wxxrdb/udump'

 

 

 

*.log_archive_config='dg_config=(wxxrdb,wxxrdb_st)'

*.log_archive_dest_3='service=wxxrdb_stVALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=wxxrdb_st'

*.db_file_name_convert='/opt/oracle/oradata/wxxrdb/datafile','+DATA/wxxrdb/datafile','/opt/oracle/oradata/wxxrdb/tempfile','+DATA/wxxrdb/tempfile'

*.log_file_name_convert='/opt/oracle/oradata/wxxrdb/datafile','+DATA/WXXRDB/ONLINELOG'

*.standby_file_management=auto

*.fal_server='wxxrdb_st'

wxxrdb1.fal_client='wxxrdb1'

wxxrdb2.fal_client='wxxrdb2'

2.修改standby數劇庫參數文件

audit_file_dest='/opt/oracle/admin/wxxrdb/adump'

*.background_dump_dest='/opt/oracle/admin/wxxrdb/bdump'

*.compatible='10.2.0.1.0'

*.control_files='/opt/oracle/oradata/wxxrdb/datafile/control01.ctl','/opt/oracle/oradata/wxxrdb/datafile/control02.ctl','/opt/oracle/oradata/wxxrdb/datafile/control03.ctl'

*.core_dump_dest='/opt/oracle/admin/wxxrdb/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='wxxrdb'

*.dispatchers='(PROTOCOL=TCP)(SERVICE=wxxrdbXDB)'

*.job_queue_processes=10

*.log_archive_dest_1='location=/arch/local_arch'

*.open_cursors=300

*.pga_aggregate_target=94371840

*.processes=150

*.remote_login_passwordfile='exclusive'

*.sga_target=285212672

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/opt/oracle/admin/wxxrdb/udump'

 

*.db_unique_name=wxxrdb_st

*.log_archive_config='dg_config=(wxxrdb,wxxrdb_st)'

#*.log_archive_dest_2='service=wxxrdb1VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=wxxrdb_st'

*.db_file_name_convert='+DATA/wxxrdb/datafile','/opt/oracle/oradata/wxxrdb/datafile','+DATA/wxxrdb/tempfile','/opt/oracle/oradata/wxxrdb/tempfile'

*.log_file_name_convert='+DATA/WXXRDB/ONLINELOG','/opt/oracle/oradata/wxxrdb/datafile'

*.standby_file_management=auto

*.fal_server='wxxrdb1','wxxrdb2'

*.fal_client='wxxrdb2'

~

6.備份主庫

RMAN> run{

2> allocate channel c1 type disk;

3> allocate channel c2 type disk;

4> sql 'alter system archive logcurrent';

5> backup current controlfile for standby format='/home/oracle/control_%U';

6> backup format '/home/oracle/wxxrdb_%U_%T' skip inaccessible filesperset5 DATABASE;

7> sql 'alter system archive logcurrent';

8> backup format'/home/oracle/arch_%U_%T' skip inaccessible filesperset 5 ARCHIVELOG all deleteinput;

9> release channel c2;

10> release channel c1;

11> }

 

allocated channel: c1

channel c1: sid=140 instance=wxxrdb1devtype=DISK

 

allocated channel: c2

channel c2: sid=148 instance=wxxrdb1devtype=DISK

 

sql statement: alter system archive logcurrent

 

Starting backup at 27-MAY-13

channel c1: starting full datafilebackupset

channel c1: specifying datafile(s) inbackupset

including standby control file in backupset

channel c1: starting piece 1 at 27-MAY-13

channel c1: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/control_01oam91i_1_1 tag=TAG20130527T114450 comment=NONE

channel c1: backup set complete, elapsedtime: 00:00:04

Finished backup at 27-MAY-13

 

Starting backup at 27-MAY-13

channel c1: starting full datafilebackupset

channel c1: specifying datafile(s) inbackupset

input datafile fno=00001name=+DATA/wxxrdb/datafile/system.256.816201625

input datafile fno=00004name=+DATA/wxxrdb/datafile/users.259.816201625

channel c1: starting piece 1 at 27-MAY-13

channel c2: starting full datafilebackupset

channel c2: specifying datafile(s) inbackupset

input datafile fno=00003name=+DATA/wxxrdb/datafile/sysaux.257.816201625

input datafile fno=00002name=+DATA/wxxrdb/datafile/undotbs1.258.816201625

input datafile fno=00005name=+DATA/wxxrdb/datafile/undotbs2.264.816201735

channel c2: starting piece 1 at 27-MAY-13

channel c1: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/wxxrdb_02oam91n_1_1_20130527 tag=TAG20130527T114454comment=NONE

channel c1: backup set complete, elapsedtime: 00:00:51

channel c1: starting full datafilebackupset

channel c1: specifying datafile(s) inbackupset

including current control file in backupset

channel c1: starting piece 1 at 27-MAY-13

channel c2: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/wxxrdb_03oam91n_1_1_20130527 tag=TAG20130527T114454 comment=NONE

channel c2: backup set complete, elapsedtime: 00:00:55

channel c2: starting full datafilebackupset

channel c2: specifying datafile(s) inbackupset

channel c1: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/wxxrdb_04oam93c_1_1_20130527 tag=TAG20130527T114454comment=NONE

channel c1: backup set complete, elapsedtime: 00:00:03

including current SPFILE in backupset

channel c2: starting piece 1 at 27-MAY-13

channel c2: finished piece 1 at 27-MAY-13

piece handle=/home/oracle/wxxrdb_05oam93e_1_1_20130527tag=TAG20130527T114454 comment=NONE

channel c2: backup set complete, elapsedtime: 00:00:02

Finished backup at 27-MAY-13

 

sql statement: alter system archive logcurrent

 

Starting backup at 27-MAY-13

current log archived

channel c1: starting archive log backupset

channel c1: specifying archive log(s) inbackup set

input archive log thread=2 sequence=2recid=6 stamp=816517490

channel c1: starting piece 1 at 27-MAY-13

channel c2: starting archive log backupset

channel c2: specifying archive log(s) inbackup set

input archive log thread=1 sequence=4recid=1 stamp=816517406

input archive log thread=1 sequence=5recid=3 stamp=816517443

input archive log thread=1 sequence=6recid=11 stamp=816522282

input archive log thread=1 sequence=7recid=13 stamp=816522353

input archive log thread=1 sequence=8recid=18 stamp=816522361

channel c2: starting piece 1 at 27-MAY-13

channel c1: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/arch_06oam93s_1_1_20130527 tag=TAG20130527T114604comment=NONE

channel c1: backup set complete, elapsedtime: 00:00:02

channel c1: deleting archive log(s)

archive logfilename=/arch/dbs_arch/2_2_816201705.dbf recid=6 stamp=816517490

channel c2: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/arch_07oam93s_1_1_20130527 tag=TAG20130527T114604comment=NONE

channel c2: backup set complete, elapsedtime: 00:00:02

channel c2: deleting archive log(s)

archive logfilename=/arch/dbp_arch/1_4_816201705.dbf recid=1 stamp=816517406

archive logfilename=/arch/dbp_arch/1_5_816201705.dbf recid=3 stamp=816517443

archive logfilename=/arch/dbp_arch/1_6_816201705.dbf recid=11 stamp=816522282

archive logfilename=/arch/dbp_arch/1_7_816201705.dbf recid=13 stamp=816522353

archive logfilename=/arch/dbp_arch/1_8_816201705.dbf recid=18 stamp=816522361

channel c1: starting archive log backupset

channel c1: specifying archive log(s) inbackup set

input archive log thread=2 sequence=3recid=8 stamp=816517513

input archive log thread=2 sequence=4recid=10 stamp=816522281

input archive log thread=2 sequence=5recid=15 stamp=816522353

input archive log thread=2 sequence=6recid=17 stamp=816522359

channel c1: starting piece 1 at 27-MAY-13

channel c1: finished piece 1 at 27-MAY-13

piecehandle=/home/oracle/arch_08oam93u_1_1_20130527 tag=TAG20130527T114604comment=NONE

channel c1: backup set complete, elapsedtime: 00:00:01

channel c1: deleting archive log(s)

archive logfilename=/arch/dbs_arch/2_3_816201705.dbf recid=8 stamp=816517513

archive logfilename=/arch/dbs_arch/2_4_816201705.dbf recid=10 stamp=816522281

archive logfilename=/arch/dbs_arch/2_5_816201705.dbf recid=15 stamp=816522353

archive logfilename=/arch/dbs_arch/2_6_816201705.dbf recid=17 stamp=816522359

Finished backup at 27-MAY-13

 

released channel: c2

 

released channel: c1

 

-- SCP 拷貝到 standby上:

7.用之前創建的初始化參數文件將備庫啓動到nomount狀態:

8rman還原數據庫:

[oracle@dbp ~]$ rman target / auxiliarysys/s123456@wxxrdb_st;

 

Recovery Manager: Release 10.2.0.1.0 -Production on Mon May 27 12:07:16 2013

 

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

 

connected to target database: WXXRDB(DBID=648309094)

connected to auxiliary database: WXXRDB(not mounted)

 

RMAN> duplicate target database forstandby;

 

Starting Duplicate Db at 27-MAY-13

using target database control file insteadof recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=155devtype=DISK

 

contents of Memory Script:

{

  restore clone standby controlfile;

  sql clone 'alter database mount standby database';

}

executing Memory Script

 

Starting restore at 27-MAY-13

using channel ORA_AUX_DISK_1

 

channel ORA_AUX_DISK_1: starting datafilebackupset restore

channel ORA_AUX_DISK_1: restoring controlfile

channel ORA_AUX_DISK_1: reading from backuppiece /home/oracle/control_01oam91i_1_1

channel ORA_AUX_DISK_1: restored backuppiece 1

piecehandle=/home/oracle/control_01oam91i_1_1 tag=TAG20130527T114450

channel ORA_AUX_DISK_1: restore complete,elapsed time: 00:00:03

outputfilename=/opt/oracle/oradata/wxxrdb/datafile/control01.ctl

output filename=/opt/oracle/oradata/wxxrdb/datafile/control02.ctl

outputfilename=/opt/oracle/oradata/wxxrdb/datafile/control03.ctl

Finished restore at 27-MAY-13

 

sql statement: alter database mount standbydatabase

released channel: ORA_AUX_DISK_1

 

contents of Memory Script:

{

  set newname for tempfile  1 to

 "/opt/oracle/oradata/wxxrdb/tempfile/temp.263.816201719";

  switch clone tempfile all;

  set newname for datafile  1 to

 "/opt/oracle/oradata/wxxrdb/datafile/system.256.816201625";

  set newname for datafile  2 to

 "/opt/oracle/oradata/wxxrdb/datafile/undotbs1.258.816201625";

  set newname for datafile  3 to

 "/opt/oracle/oradata/wxxrdb/datafile/sysaux.257.816201625";

  set newname for datafile  4 to

 "/opt/oracle/oradata/wxxrdb/datafile/users.259.816201625";

  set newname for datafile  5 to

 "/opt/oracle/oradata/wxxrdb/datafile/undotbs2.264.816201735";

  restore

  check readonly

  clone database

   ;

}

executing Memory Script

 

executing command: SET NEWNAME

 

renamed temporary file 1 to/opt/oracle/oradata/wxxrdb/tempfile/temp.263.816201719 in control file

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

Starting restore at 27-MAY-13

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: sid=155devtype=DISK

 

channel ORA_AUX_DISK_1: starting datafilebackupset restore

channel ORA_AUX_DISK_1: specifyingdatafile(s) to restore from backup set

restoring datafile 00001 to /opt/oracle/oradata/wxxrdb/datafile/system.256.816201625

restoring datafile 00004 to/opt/oracle/oradata/wxxrdb/datafile/users.259.816201625

channel ORA_AUX_DISK_1: reading from backuppiece /home/oracle/wxxrdb_02oam91n_1_1_20130527

channel ORA_AUX_DISK_1: restored backuppiece 1

piecehandle=/home/oracle/wxxrdb_02oam91n_1_1_20130527 tag=TAG20130527T114454

channel ORA_AUX_DISK_1: restore complete,elapsed time: 00:00:34

channel ORA_AUX_DISK_1: starting datafilebackupset restore

channel ORA_AUX_DISK_1: specifyingdatafile(s) to restore from backup set

restoring datafile 00002 to/opt/oracle/oradata/wxxrdb/datafile/undotbs1.258.816201625

restoring datafile 00003 to/opt/oracle/oradata/wxxrdb/datafile/sysaux.257.816201625

restoring datafile 00005 to /opt/oracle/oradata/wxxrdb/datafile/undotbs2.264.816201735

channel ORA_AUX_DISK_1: reading from backuppiece /home/oracle/wxxrdb_03oam91n_1_1_20130527

channel ORA_AUX_DISK_1: restored backuppiece 1

piecehandle=/home/oracle/wxxrdb_03oam91n_1_1_20130527 tag=TAG20130527T114454

channel ORA_AUX_DISK_1: restore complete,elapsed time: 00:00:16

Finished restore at 27-MAY-13

 

contents of Memory Script:

{

  switch clone datafile all;

}

executing Memory Script

 

datafile 1 switched to datafile copy

input datafile copy recid=7 stamp=816646191filename=/opt/oracle/oradata/wxxrdb/datafile/system.256.816201625

datafile 2 switched to datafile copy

input datafile copy recid=8 stamp=816646191filename=/opt/oracle/oradata/wxxrdb/datafile/undotbs1.258.816201625

datafile 3 switched to datafile copy

input datafile copy recid=9 stamp=816646191filename=/opt/oracle/oradata/wxxrdb/datafile/sysaux.257.816201625

datafile 4 switched to datafile copy

input datafile copy recid=10stamp=816646191 filename=/opt/oracle/oradata/wxxrdb/datafile/users.259.816201625

datafile 5 switched to datafile copy

input datafile copy recid=11stamp=816646191filename=/opt/oracle/oradata/wxxrdb/datafile/undotbs2.264.816201735

Finished Duplicate Db at 27-MAY-13

9. 將備庫啓動到mount standby狀態,並啓動MRP 進程

SQL> shutdown immediate;

ORA-01109: database not open

 

 

Database dismounted.

ORACLE instance shut down.

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area  285212672 bytes

Fixed Size                  1218992 bytes

Variable Size              92276304 bytes

Database Buffers          188743680 bytes

Redo Buffers                2973696 bytes

SQL> alter database mount standbydatabase;

 

Database altered.

 

SQL> recover managed standby databasedisconnect from session;

Media recovery complete.

10.添加standby redo log日誌

 

alter database add standby logfile thread 1group 5 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_05.log') size 50m;

alter database add standby logfile thread 1group 6 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_06.log') size 50m;

alter database add standby logfile thread 1group 7 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_07.log') size 50m;

alter database add standby logfile thread 2group 8 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_08.log') size 50m;

alter database add standby logfile thread 2group 9 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_09.log') size 50m;

alter database add standby logfile thread 2group 10 ('/opt/oracle/oradata/wxxrdb/datafile/redo_st_10.log') size 50m;

SQL> select * from v$logfile;

 

   GROUP# STATUS         TYPE           MEMBER                                            IS_REC

---------- -------------- ---------------------------------------------------------------- ------

        2                ONLINE         +DATA/wxxrdb/onlinelog/group_2.262.816201709       NO

        1                ONLINE        +DATA/wxxrdb/onlinelog/group_1.261.816201705       NO

        3                ONLINE        +DATA/wxxrdb/onlinelog/group_3.265.816201753       NO

        4                ONLINE         +DATA/wxxrdb/onlinelog/group_4.266.816201757       NO

        5                STANDBY       /opt/oracle/oradata/wxxrdb/datafile/redo_st_01.log NO

        6                STANDBY       /opt/oracle/oradata/wxxrdb/datafile/redo_st_02.log NO

        7                STANDBY       /opt/oracle/oradata/wxxrdb/datafile/redo_st_03.log NO

        8                STANDBY       /opt/oracle/oradata/wxxrdb/datafile/redo_st_04.log NO

        9                STANDBY        /opt/oracle/oradata/wxxrdb/datafile/redo_st_05.logNO

       10                STANDBY       /opt/oracle/oradata/wxxrdb/datafile/redo_st_06.log NO

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章