检查
select name,open_mode,database_role,cdb from v$database;
select name,open_mode,con_id,dbid from v$containers;
!ps -ef | grep mrp
show con_name
show parameters db_unique_name;
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
alter system switch logfile;
select max(sequence#) from v$archived_log where archived='YES';
select * from v$logfile;
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
(一)Active DataGuard启动顺序
(1)启动监听,先启从库再起主库
lsnrctl start
(2)启动数据库,先启动备库在启主库
--先启备库
sql>startup
alter database recover managed standby database disconnect from session;
--再启主库
sql>startup
(二)DataGuard关闭顺序
(1)先关主库数据库:
sql>shutdown immediate;
(2)再关备用库:
sql>alter database recover managed standby database cancel;
sql>shutdown immediate;