| SQL> SQL*Plus: Release 9.2.0.8.0 - Production on 星期二 4月 1 17:51:14 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> connect / as sysdba |
| SQL> create pfile from spfile; |
|
*.INSTANCE_NAME='primary' *.LOG_ARCHIVE_DEST_1='LOCATION=/opt/ora9/oradata/archive_log mandatory' *.FAL_SERVER=standby |
|
$ scp $ORACLE_HOME/dbs/initprimary.ora oracle@192.168.217.23:$ORACLE_HOME/dbs/initstandby.ora |
|
*.INSTANCE_NAME='standby' *.FAL_SERVER=primary |
|
#su - oracle $ mkdir -p $ORACLE_BASE/backup -->用於 Rman備份 |
|
LISTENER = SID_LIST_LISTENER = |
|
LISTENER = SID_LIST_LISTENER = |
|
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) |
|
MASTER = STANDBY = |
|
MASTER = STANDBY = |
|
#su - oracle |
|
[oracle@standby dbs]$ sqlplus /nolog SQL*Plus: Release 9.2.0.8.0 - Production on 星期二 4月 1 23:41:33 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> connect / as sysdba File created. SQL> startup nomount; Total System Global Area 235999648 bytes |
|
[oracle@primary ora9]$ rman target / nocatalog Recovery Manager: Release 9.2.0.8.0 - Production Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved. connected to target database: MASTER (DBID=2710930473) RMAN> backup filesperset 5 database format '/opt/ora9/backup/%d_t%t_s%s_p%p' include current controlfile for standby; Starting backup at 02-4月 -08 RMAN> sql 'alter system archive log current'; sql statement: alter system archive log current RMAN> backup archivelog all ; Starting backup at 02-4月 -08 |
|
$ scp $ORACLE_BASE/backup/* oracle@192.168.217.23:/$ORACLE_BASE/backup |
|
RMAN> connect auxiliary sys@standby; auxiliary database Password: RMAN> duplicate target database for standby nofilenamecheck dorecover; Starting Duplicate Db at 02-4月 -08 printing stored script. Memory Script Starting restore at 02-4月 -08 using channel ORA_AUX_DISK_1 |
|
[oracle@baksrv dbs]$ sqlplus /nolog SQL*Plus: Release 9.2.0.8.0 - Production on 星期三 4月 2 11:41:05 2008 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> connect / as sysdba File created. SQL> startup; Total System Global Area 235999648 bytes GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME |
|
SQL> select sequence#,applied from v$archived_log; SEQUENCE# APP SQL> alter database recover managed standby database disconnect from session; -->開始做自動 standby recover Database altered. SQL> select sequence#,applied from v$archived_log; SEQUENCE# APP |
|
SQL> alter database recover managed standby database cancel; SQL> Alter database add standby logfile '/opt/ora9/oradata/primary/stdby_redo01.log' size 100M; SQL> alter database recover managed standby database disconnect from session; |
|
SQL> select process,status,client_process,sequence#,block# from v$managed_standby; SQL> select * from v$standby_log; -->檢查Standby Redo log是否啟用。目前log sequence為150 GROUP# THREAD# SEQUENCE# BYTES USED ARC STATUS FIRST_CHANGE# FIRST_TIME LAST_CHANGE# LAST_TIME SQL> |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-561364/ ,如需转载,请注明出处,否则将追究法律责任。