dataguard重新恢复某个pdb

环境:
DB:12.2.0.1

1.关闭pdb
alter pluggable database pdb3 close;


2.恢复
SQL>alter session set container=cdb$root;
SQL>alter system set standby_file_management=auto;
SQL>alter database recover managed standby database cancel;
SQL>alter session set container=pdb3;
SQL>alter pluggable database disable recovery;

 

rman进行恢复
##tnsslnngk2 是连接到主库的tns
run{
restore pluggable database pdb3 from service tnsslnngk ;
}

 

3.恢复使用enable recovery
SQL> alter session set container=cdb$root;
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter session set container=pdb3;
SQL> alter pluggable database enable recovery;
SQL> alter session set container=cdb$root;
SQL> alter database recover managed standby database using current logfile disconnect from session;

4.打开pdb
alter database recover managed standby database cancel;
alter database open;
alter database recover managed standby database using current logfile disconnect from session;

5.打开pdb
alter pluggable database pdb3 open;

 

posted @ 2023-04-17 17:53  slnngk  阅读(34)  评论(0编辑  收藏  举报