ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10gR2--DATAGUARD实施步骤

10gR2--DATAGUARD实施步骤

原创 Linux操作系统 作者:vongates 时间:2019-07-13 12:57:07 0 删除 编辑
简单记录一个10G DATAGUARD的配置过程。


1. Preparing the Primary Database for Standby Database Creation
A ALTER DATABASE FORCE LOGGING;
This statement can take a considerable amount of time to complete, because it waits for all unlogged direct write I/O to finish.
B Create a Password File
C Configure a Standby Redo Log
Ensure log file sizes are identical on the primary and standby databases
Determine the appropriate number of standby redo log file groups
ALTER DATABASE ADD STANDBY LOGFILE THREAD 5
‘/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 10
'/oracle/dbs/log1c.rdo','/oracle/dbs/log2c.rdo') SIZE 500M;
SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
select * from V$LOGFILE;
D Set Primary Database Initialization Parameters
DB_NAME=ora10gp
DB_UNIQUE_NAME=ora10gp
LOG_ARCHIVE_CONFIG='DG_CONFIG=(ora10gp,ora10gs)'
CONTROL_FILES='/arch1/ora10gp/control1.ctl', '/arch2/ora10gp/control2.ctl'
LOG_ARCHIVE_DEST_1='LOCATION=/arch1/ora10gp/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ora10gp'
LOG_ARCHIVE_DEST_2='SERVICE=ora10gs LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ora10gs'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
FAL_SERVER=ora10gs
FAL_CLIENT=ora10gp
DB_FILE_NAME_CONVERT='ora10gs','ora10gp'
LOG_FILE_NAME_CONVERT='/arch1/ora10gs/','/arch1/ora10gp/','/arch2/ora10gs/','/arch2/ora10gp/'
STANDBY_FILE_MANAGEMENT=AUTO

E Enable Archiving
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;

2. Creating a Physical Standby Database
A backup database
B create control file
ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/ora10gs.ctl';
C prepare an initialize parameter file
CREATE PFILE='/tmp/initora10gs.ora' FROM SPFILE;
DB_NAME=ora10gp
DB_UNIQUE_NAME=ora10gs
LOG_ARCHIVE_CONFIG='DG_CONFIG=(ora10gp,ora10gs)'
CONTROL_FILES='/arch1/ora10gs/control1.ctl', '/arch2/ora10gs/control2.ctl'
DB_FILE_NAME_CONVERT='ora10gp','ora10gs'
LOG_FILE_NAME_CONVERT='/arch1/ora10gp/','/arch1/ora10gs/','/arch2/ora10gp/','/arch2/ora10gs/'
LOG_ARCHIVE_FORMAT=log%t_%s_%r.arc
LOG_ARCHIVE_DEST_1='LOCATION=/arch1/ora10gs/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ora10gs'
LOG_ARCHIVE_DEST_2='SERVICE=ora10gp LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ora10gp'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=ora10gp
FAL_CLIENT=ora10gs

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51974/,如需转载,请注明出处,否则将追究法律责任。

下一篇: RAC-SRVCTL实例
请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    291652