创建物理备库后,最好创建各自的spfile
物理备库上停止redo应用:
主库上生成logminer会发生几次切换日志报错忽略
物理备库上转化为逻辑备用库:
orclshutdown immediate
startup mount
SELECT db_unique_name,open_mode, database_role,switchover_status,guard_status,protection_mode FROM V$DATABASE;
备库上重建逻辑standby的密码文件:
备库上修改参数:
备库上创建备用日志:
alter database add standby logfile group 4 ('/u01/oradata/stby/standbylj01.log') size 20M reuse;
alter database add standby logfile group 5 ('/u01/oradata/stby/standbylj02.log') size 20M reuse;
alter database add standby logfile group 6 ('/u01/oradata/stby/standbylj03.log') size 20M reuse;
select member from v$logfile;
备库上打开逻辑standby:
alter database open resetlogs;
alter database start logical standby apply immediate;
备库上检查:
select instance_name,status from v$instance;
SELECT db_unique_name,open_mode, database_role,switchover_status,guard_status,protection_mode FROM V$DATABASE;
select group#,sequence#,used,status from v$standby_log;
在主库上创建:
create table scott.t4 (id int);
insert into scott.t4 values(4);
commit;
alter system switch logfile;
过一会儿 在逻辑备用库上查询:
select * from scott.t4;