dataguard offline

简介: dataguard offline

alter database recover managed standby database cancel;

alter session set container=appdb;

alter database datafile 11 offline drop;

select status,FILE# from v$datafile where file#=11;


alter database recover managed standby database using current logfile disconnect;


#############

oneline 报错:

alter database recover managed standby database cancel;

alter session set container=appdb;

alter database datafile 11 online;


*

ERROR at line 1:

ORA-01113: file 11 needs media recovery

ORA-01110: data file 11:

'+ARCH/SPDB19C/ED068853EA9868D3E0530B39A8C0E59F/DATAFILE/undotbs1.623.1156154065

'



##############


shu immediate

startup mount

#如果归档丢失需要先对文件进行recover from service;

#recover datafile 11 from service xxxx;

alter session set container=appdb;

alter database datafile 11 online;

exit

sqlplus / as sysdba

alter database open;

<<<< 在启动过程对文件进行recover,本地没有归档,自动通过gap处理。

alter database open

PR00 (PID:110018): Media Recovery Waiting for T-1.S-91

PR00 (PID:110018): Fetching gap from T-1.S-91 to T-1.S-93



#########

模拟归档日志丢失:

delete force noprompt archivelog all;



SQL> alter database open

*

ERROR at line 1:

ORA-10458: standby database requires recovery

ORA-01152: file 11 was not restored from a sufficiently old backup

ORA-01110: data file 11:

'+ARCH/SPDB19C/ED068853EA9868D3E0530B39A8C0E59F/DATAFILE/undotbs1.623.1156154065

'


RMAN> recover database from service pdb19c;

SQL> alter database open;

Database altered.










相关文章
|
SQL
DATAGUARD(11.2.0.4) ORA-04021
DATAGUARD(11.2.0.4) ORA-04021
243 0
|
数据库 Go 测试技术
[20151109]使用dgmgrl管理dataguard(15)
[20151109]使用dgmgrl管理dataguard(15).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.
1070 0
|
SQL Oracle 关系型数据库
一步一步搭建11gR2 rac+dg之DG SWITCHOVER功能(九)
本文文档结构图: 本篇发布的有些晚,之前的8篇文章见 http://blog.itpub.net/26736162/viewspace-1290405/ 1.1   测试DATAGUARDSWITCHOVER功能 1.1.1    RAC主库、ActiveDataguard角色切换 即rac主库切换为物理备库,物理备库切换为rac主库。
1055 0
|
Oracle 关系型数据库 数据库
配置DATAGUARD时报ORA-12528
说明:在dataguard的搭建中,运行rman恢复的时候报错ORA-12528的错误; 脚本如下:RMAN>  connect auxiliary sys/oracle@SCMPRD02     解决...
951 0
|
SQL Oracle 关系型数据库
[20140422]使用dgmgrl管理dataguard(13)
[20140422]使用dgmgrl管理dataguard(13).txt 参考链接: http://blog.itpub.net/267265/viewspace-1142649/ http://blog.
995 0