日期:2014-05-17  浏览次数:20731 次

Oracle 10G windows 平台 DataGuard 实例(一)

?

server A: 10.85.10.44??SID=orcl -

target server B: 10.85.10.43 -

oracle version:10.2.0.1 -

OS platform : windows XP -

?

?

Primary设置:?-

?

1. 设置主数据库为force logging 模式?-

SQL>sqlplus "/as sysdba" -

SQL>alter database force logging; -

2. 设置主数据库为归档模式?-

SQL> archive log list -

SQL> shutdown immediate -

SQL> startup mount -

SQL> alter database archivelog; -

SQL> archive log list -

3. 添加"备用联机日志文件"?-

先查看日志文件位置: -

SQL>select * from v$logfile; -

在添加: -

SQL> alter database add standby logfile group 4 ('D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/redo04.log') size 50m; -

SQL> alter database add standby logfile group 5 ('D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/redo05.log') size 50m; -

SQL> alter database add standby logfile group 6 ('D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/redo06.log') size 50m; -

SQL> alter database add standby logfile group 7 ('D:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/redo07.log') size 50m; -

?

4. 创建主库的初始化参数给备库用?-

SQL>Create pfile from spfile; -

产生的文件名为initorcl.ora 存放目录默认放在$ORACLE_HOME/database下 -

?