Data Guard 快照备用

最实用的两个命令

convert database 备库名子to snapshot standby;           

convert database 备库名子to physical standby;

select status,instance_name,database_role,open_mode from v$database,v$instance;

select status,instance_name,database_role,open_mode from v$database,v$instance;

 

select process,status,client_process,sequence#,block# from v$managed_standby;

 

 

 

 select flashback_on from v$database;

alter database recover managed standby database cancel;

 

select process,status,client_process,sequence#,block# from v$managed_standby; 

alter database convert to snapshot standby;

select status,instance_name,database_role,open_mode from v$database,v$instance;

select name from v$restore_point;

 

select open_mode from v$database;

alter database open;

 

alter database open;

alter session set container=PDB1;

create table test (id number,name varchar2(100));

insert into test  values(1,'LIHAO');

commit;

select * from test;

 

 

 

alter database convert to physical standby;

 

alter session set container=CDB$ROOT;

alter database convert to physical standby;

SHUTDOWN IMMEDIATE

startup mount

alter database convert to physical standby;

select status,instance_name,database_role,open_mode from v$database,v$instance;

alter database recover managed standby database disconnect;

select process,status,client_process,sequence#,block# from v$managed_standby;

 

 

 

convert database 'cdb1_stby' to snapshot standby;

 

 

select status,instance_name,database_role,open_mode from v$database,v$instance;

 

SHOW DATABASE cdb1_stby;

 

convert database 'cdb1_stby' to physical standby;

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值