*.log_archive_format='%T%S%r.ARC'
*.DB_UNIQUE_NAME='primary'
*.log_archive_config='DG_CONFIG=(primary,standby)'
*.log_archive_dest_1='location=C:/Oracle/product/10.2.0/oradata/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'
*.log_archive_dest_2='SERVICE=standby arch ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'
*.STANDBY_FILE_MANAGEMENT=AUTO
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE
*.FAL_SERVER='standby'
*.FAL_CLIENT='primary'
*.log_archive_format='%T%S%r.ARC'
*.DB_UNIQUE_NAME='standby'
*.log_archive_config='DG_CONFIG=(primary,standby)'
*.log_archive_dest_1='location=C:/oracle/product/10.2.0/oradata/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'
*.log_archive_dest_2='SERVICE=primary arch ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=primary'
*.STANDBY_FILE_MANAGEMENT=AUTO
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE
*.FAL_SERVER='primary'
*.FAL_CLIENT='standby'
配置好TNS 监听能互相TNSPING通
修改LOGFILE大小为100M,添加4组备用联机日志
SQL> alter database add logfile group 4 'c:oracleproduct10.2.0oradataorclr
edolog04.log' size 50M;
SQL> alter database add logfile group 5 'c:oracleproduct10.2.0oradataorclr
edolog05.log' size 50M;
SQL> alter system switch logfile;
SQL> alter database drop logfile group 1;
SQL> alter database drop logfile group 2;
SQL> alter database drop logfile group 3;
SQL> alter database add logfile group 2 'c:oracleproduct10.2.0oradataorclr
edolog02.log' size 100M;
SQL> alter database add logfile group 3 'c:oracleproduct10.2.0oradataorclr
edolog03.log' size 100M;
SQL> alter database drop logfile group 4;
SQL> select group#,sequence#,status from v$log;
GROUP# SEQUENCE# STATUS
---------- ---------- --------------------------------
1 15 CURRENT
2 0 UNUSED
3 0 UNUSED
5 14 ACTIVE
SQL> alter system switch logfile;
SQL> select group#,sequence#,status from v$log;
GROUP# SEQUENCE# STATUS
---------- ---------- --------------------------------
1 19 INACTIVE
2 20 ACTIVE
3 21 CURRENT
5 18 INACTIVE
SQL> alter database drop logfile group 5;
数据库已更改。
SQL> select group#,sequence#,status from v$log;
GROUP# SEQUENCE# STATUS
---------- ---------- --------------------------------
1 19 INACTIVE
2 20 ACTIVE
3 21 CURRENT
SQL> alter database add standby logfile group 4 'c:oracleproduct10.2.0oradat
aorclstandbylog04.log' size 50M;
数据库已更改。
SQL> alter database add standby logfile group 5 'c:oracleproduct10.2.0oradat
aorclstandbylog05.log' size 50M;
数据库已更改。
SQL> alter database add standby logfile group 6 'c:oracleproduct10.2.0oradat
aorclstandbylog06.log' size 50M;
数据库已更改。
SQL> alter database add standby logfile group 7 'c:oracleproduct10.2.0oradat
aorclstandbylog07.log' size 50M;
数据库已更改。
SQL> alter database add logfile member 'c:oracleproduct10.2.0oradataorclre
dolog012.log' to group 1;
数据库已更改。
SQL> alter database drop logfile member 'c:oracleproduct10.2.0oradataorcl
redolog012.log';
数据库已更改。
RMAN> backup full format 'c:backupfullbackup_%d_%T_%s.bak' database include cu
rrent controlfile for standby;
RMAN> sql 'alter system archive log current';
sql 语句: alter system archive log current
RMAN> backup archivelog all format 'c:backuparchive_%d_%T_%s';
更多详情见请继续阅读下一页的精彩内容:
推荐阅读:
Oracle基础教程之通过RMAN复制数据库
RMAN备份策略制定参考内容
RMAN备份学习笔记
Oracle数据库备份加密 RMAN加密