Dg主要进程介绍
Ensure Disk / file system space issue is addressed and then follow this on the standby
sql>alter system set standby_file_management=manual scope=both sid=*;
sql>alter database create datafile
/oracle/app/oracle/product/10.2.0.1/db_1/dbs/UNNAMED00038 as new;
Note:- It assumes that database files are using Oracle Managed File (OMF),
else keyword "new" has to be replaced by actual file name
sql>alter system set standby_file_management=auto scope=both sid=*;
sql>alter database recover managed standby database disconnect from session;
Ensure Disk / file system space issue is addressed and then follow this on the standby
dgmgrl /
edit database standby db unique name here set property StandbyFileManagement=MANUAL;
exit
sql>alter database create datafile
/oracle/app/oracle/product/10.2.0.1/db_1/dbs/UNNAMED00038 as new;
Note:- It assumes that database files are using Oracle Managed File (OMF),
else keyword "new"has to be replaced by actual file name
dgmgrl /
edit database standby db unique name here set property StandbyFileManagement=AUTO;
edit database standby db unique name here set state=ONLINE;
exit
sql>alter system set standby_file_management=manual scope=both sid=*;
sql>alter database create datafile
/oracle/app/oracle/product/10.2.0.1/db_1/dbs/UNNAMED00038 as new;
Note:- It assumes that database files are using Oracle Managed File (OMF),
else keyword "new" has to be replaced by actual file name
sql>alter system set standby_file_management=auto scope=both sid=*;
sql>alter database recover managed standby database disconnect from session;
SQL> select * from v$recover_file where error like %FILE%;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- -------------------
5 ONLINE ONLINE FILE MISSING 0
6 ONLINE ONLINE FILE MISSING 0
SQL> select file#,name from v$datafile where file# in (5,6);
FILE# NAME
---------- ------------------------------------------------------------------
5 /oradata/lmis/LMIS01.dbf
6 /oradata/lmis/LMIS02.dbf
SQL> select file#,name from v$datafile where file# in (5,6);
FILE# NAME
---------- ------------------------------------------------------------------
5 /app/oracle/product/11.2.4/db_1/dbs/UNNAMED00005
6 /app/oracle/product/11.2.4/db_1/dbs/UNNAMED00006
STANDBY_FILE_MANAGEMENT
SQL> alter system set standby_file_management=manual scope=both;
System altered.
SQL> alter database create datafile/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00005 as /oradata/lmisdbdg/LMIS01.dbf;
Database altered.
SQL> alter database create datafile/app/oracle/product/11.2.4/db_1/dbs/UNNAMED00006 as /oradata/lmisdbdg/LMIS02.dbf;
Database altered.
SQL> select * from v$recover_file where error like %FILE%;
no rows selected
SQL> show parameter standby_file_management
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_file_management string MANUAL
SQL> alter system set standby_file_management=AUTO scope=both;
System altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
Database altered.
set linesize 200
set pagesize 999
col status for a10
SELECT DEST_ID,
SEQUENCE#,
APPLIED
FROM v$archived_log
WHERE first_time>sysdate-35
ORDER BY SEQUENCE#,DEST_ID;
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME, APPLIED FROM
V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME, APPLIED FROM
V$ARCHIVED_LOG ORDER BY SEQUENCE#;
oracle关闭mrp进程卡死
ORA-600[2619] During Physical Standby Recovery [1138913.1]
ORA-600[2619] is raised due to an invalid next_change# detected in archive log.
In this case, it is caused by the archive log disk space ran out on standby site, causing that archive log not fully written on disk. This lead to ORA-600[2619] when the archive log was applied.
1). Clear the disk space where archive log stored on standby site
2). Copy the problem archive log (eg: 4_77799_650412287.dbf) from the primary site and replace the one on the standby,
then restart Managed Recovery.
Archive log should be applied properly now.
DataGuard 归档无法同步
SQL> SELECT THREAD#,LOW_SEQUENCE#,HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
no rows selected
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSIONAttempt to start background Managed Standby Recovery process (sss)
Thu Oct 09 11:38:58 2021
MRP0 started with pid=30, OS id=102010
MRP0: Background Managed Standby Recovery process started (sss)
started logmerger process
Thu Oct 09 11:39:03 2021
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Errors in file /dba/oracle/diag/rdbms/sss/sss/trace/sss_pr00_102070.trc:
ORA-01111: name for data file 12 is unknown - rename to correct file
ORA-01110: data file 12: /u01/oracle/product/11.2.0.3.0/dbs/UNNAMED00012
ORA-01157: cannot identify/lock data file 12 - see DBWR trace file
ORA-01111: name for data file 12 is unknown - rename to correct file
ORA-01110: data file 12: /u01/oracle/product/11.2.0.3.0/dbs/UNNAMED00012
Slave exiting with ORA-1111 exception
Errors in file /dba/oracle/diag/rdbms/sss/sss/trace/sss_pr00_102070.trc:
ORA-01111: name for data file 12 is unknown - rename to correct file
ORA-01110: data file 12: /u01/oracle/product/11.2.0.3.0/dbs/UNNAMED00012
ORA-01157: cannot identify/lock data file 12 - see DBWR trace file
ORA-01111: name for data file 12 is unknown - rename to correct file
ORA-01110: data file 12: /u01/oracle/product/11.2.0.3.0/dbs/UNNAMED00012
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (sss)
find /u01/oracle/product/11.2.0.3.0/dbs/ -name UNNAMED00012
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL SCOPE=MEMEORY;
SQL> ALTER DATABASE CREATE DATAFILE /u01/oracle/product/11.2.0.3.0/dbs/UNNAMED00012 as /u01/oradata/sss/sys07.dbf
SQL> ALTER SYSTEM SET standby_file_management=AUTO SCOPE=MEMORY;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Attempt to start background Managed Standby Recovery process (sss)
Thu Oct 09 11:41:08 2021
MRP0 started with pid=30, OS id=102513
MRP0: Background Managed Standby Recovery process started (sss)
started logmerger process
Thu Oct 09 11:41:14 2021
Managed Standby Recovery not using Real Time Apply
Parallel Media Recovery started with 24 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Thu Oct 09 11:41:14 2021
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
Media Recovery Log /u01/sss/SSS/archivelog/2021_10_03/o1_mf_1_13523_b2wzmf1b_.arc
Thu Oct 09 11:41:36 2021
主备不同步
主备不同步,备库归档丢失
SQL> SELECT * FROM V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 6434 6435
SQL>select name ,sequence# from v$archived_log;
NAME SEQUENCE#
-------------------------------------------------------------------------- ------
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6414_1000748999.dbf 6414
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6417_1000748999.dbf 6417
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6420_1000748999.dbf 6420
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6421_1000748999.dbf 6421
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6419_1000748999.dbf 6419
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6418_1000748999.dbf 6418
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6425_1000748999.dbf 6425
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6426_1000748999.dbf 6426
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6423_1000748999.dbf 6423
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6422_1000748999.dbf 6422
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6424_1000748999.dbf 6424
NAME SEQUENCE#
-------------------------------------------------------------------------- ------
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6366_1000748999.dbf 6366
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6427_1000748999.dbf 6427
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6428_1000748999.dbf 6428
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6429_1000748999.dbf 6429
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6509_1000748999.dbf 6509
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6431_1000748999.dbf 6431
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6432_1000748999.dbf 6432
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6430_1000748999.dbf 6430
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6433_1000748999.dbf 6433
/u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_6436_1000748999.dbf 6436
select to_char(current_scn) from v$database;
select min(checkpoint_change#) from v$datafile;
select min(checkpoint_change#) from v$datafile_header;
backup as compressed backupset incremental from scn $MIN
database format /backup/inc_%d_%T_%s_%p;
backup current controlfile for standby format /backup/inc.ctl;
shutdown abort;
startup nomount;
restore standby controlfile from "/backup/inc.ctl";
alter database mount;
catalog start with "/backup/" NOPROMPT;
shutdown immediate;
startup mount;
recover database;
alter database recover managed standby database disconnect from session using current logfile;
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129653.html
DG备库读写测试方案 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%; margin:0...
摘要:新晋技术专家下面是墨天轮部分新晋的技术专家。大家可以点击往期阅读墨天轮技术专家邀请函了解详情,申请成为我们的技术专家,加入专家团队,与我们一起创建一个开放互助的数据库技术社区。新关联公众号墨天轮是一个开放互助的数据库技术社区。 引言 近期我们在DBASK小程序增加了数据库 MongoDB、Redis、 Elasticsearch、DB2、Weblogic 等新的的专题栏目和一些新的技术...
阅读 1247·2023-01-11 13:20
阅读 1555·2023-01-11 13:20
阅读 1008·2023-01-11 13:20
阅读 1675·2023-01-11 13:20
阅读 3968·2023-01-11 13:20
阅读 2510·2023-01-11 13:20
阅读 1305·2023-01-11 13:20
阅读 3474·2023-01-11 13:20