SNAPSHOT STANDBY DATABASE 11g (Demonstration)
First Create Physical Standby then convert to snapshot database through SQL.
==============
Linux:
. oraenv
ps -eaf|grep mrp
==============
-----Primary
select * from abc;
create table abc as select * from scott.emp where deptno=20;
select * from abc;
-----standby
select open_mode ,database_role,switchover_status from v$database;
recover managed standby database cancel;
exit
==============
Linux:
ps -eaf|grep mrp
==============
sqlplus sys@delhi as sysdba
alter database convert to snapshot standby;
select open_mode ,database_role,switchover_status from v$database;
select sequence#,applied from v$database order by 1;
alter database open;
select open_mode ,database_role,switchover_status from v$database;
select sequence#,applied from v$database order by 1;
update abc set sal=sal+10000;
commit;
alter system switch logfile;
select sequence#,applied from v$database order by 1;
==========================================
Note:
* see both location Archive log Primay & Standby
* archive properly shipped primary to standby but not apply
* Check Alert Log File
==========================================
-----Primary database
update abc set sal=sal-10000;
commit;
update abc set sal=sal+200;
commit;
alter system switch logfile;
alter system switch logfile;
select sequence#,applied from v$database order by 1;
-----Standby Database
select open_mode ,database_role,switchover_status from v$database;
alter database convert to physical standby;
shu immediate
startup mount
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
select sequence#,applied from v$database order by 1;
recover managed standby database cancel;
alter database open read only;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
select sequence#,applied from v$database order by 1;
select * from abc;
.........?
No comments:
Post a Comment