Dataguard配置Step by Step
- 作者:zhaozj
- 发表时间:2020-12-23 10:39
- 来源:未知
link: http://www.eygle.com/ha/dataguard-step-by-step.htm 1.主节点备份并生成备用数据库控制文件
设置主节点为force Logging模式(为了双向切换,建议备用节点也设置为force logging模式)ALTER DATABASE FORCE LOGGING;
设置主节点为归档模式
登陆主节点,进行数据库备份,并生成备用数据库控制文件
Last login: Mon Aug 9 16:46:47 2004 from 172.16.32.65 [root@standby root]# su - oracle [oracle@standby oracle]$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 10:16:18 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes Database mounted. Database opened. SQL> select name from v$datafile; NAME ------------------------------------------------------------ /opt/oracle/oradata/primary/system01.dbf /opt/oracle/oradata/primary/undotbs01.dbf /opt/oracle/oradata/primary/users01.dbf SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> exit Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning option JServer Release 9.2.0.4.0 - Production [oracle@standby oracle]$ ls admin dictionary.ora jre oradata oraInventory oui product soft [oracle@standby oracle]$ tar -cvf oradata.tar oradata oradata/ oradata/primary/ oradata/primary/archive/ oradata/primary/control01.ctl oradata/primary/control02.ctl oradata/primary/control03.ctl oradata/primary/redo01.log oradata/primary/redo02.log oradata/primary/redo03.log oradata/primary/system01.dbf oradata/primary/undotbs01.dbf oradata/primary/temp01.dbf oradata/primary/users01.dbf [oracle@standby oracle]$ ls -l *.tar -rw-r--r-- 1 oracle dba 576512000 Aug 16 10:22 oradata.tar [oracle@standby oracle]$ id uid=800(oracle) gid=800(dba) groups=800(dba) [oracle@standby oracle]$ hostname standby [oracle@standby oracle]$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 10:27:54 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes Database mounted. Database opened. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination /opt/oracle/oradata/primary/archive Oldest online log sequence 88 Next log sequence to archive 90 Current log sequence 90 SQL> alter database create standby controlfile as '/opt/oracle/stdcotrl.ctl'; Database altered. SQL> ! ls[oracle@standby oracle]$ ls admin dictionary.ora jre oradata oradata.tar oraInventory oui product soft stdcotrl.ctl |