文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

12c adg添加数据文件报错处理ORA-01111

2024-04-02 19:55

关注
一、描述
12c ADG
rhel 7.0
二、现象、处理过程
1.主库添加数据文件,备库报错。
Beginning Standby Crash Recovery.
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Standby Crash Recovery aborted due to error 1111.
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcldg/trace/orcldg_ora_2067.trc:
ORA-01111: name for data file 7 is unknown - rename to correct file
ORA-01110: data file 7: '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/UNNAMED00007'
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01111: name for data file 7 is unknown - rename to correct file
ORA-01110: data file 7: '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/UNNAMED00007'
Completed Standby Crash Recovery.
Errors in file /u01/app/oracle/diag/rdbms/orcldg/orcldg/trace/orcldg_ora_2067.trc:
ORA-10458: standby database requires recovery
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01111: name for data file 7 is unknown - rename to correct file
ORA-01110: data file 7: '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/UNNAMED00007'
ORA-10458 signalled during: ALTER DATABASE OPEN READ ONLY ...

2.备库查看数据文件
SQL> col name for a60
SQL> select file#,name from v$datafile order by file#;

     FILE# NAME
---------- ------------------------------------------------------------
         1 +DATADG/ORCLDG/DATAFILE/system.258.954626559
         2 +DATADG/ORCLDG/DATAFILE/roidba.387.963323519
         3 +DATADG/ORCLDG/DATAFILE/sysaux.259.954626615
         4 +DATADG/ORCLDG/DATAFILE/undotbs1.260.954626701
         5 +DATADG/ORCLDG/DATAFILE/roidba.388.963323313
         6 +DATADG/ORCLDG/DATAFILE/users.261.954626717
         7 /u01/app/oracle/product/12.1.0/dbhome_1/dbs/UNNAMED00007

7 rows selected.

3.重新创建新的数据文件
SQL> alter database create datafile  '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/UNNAMED00007'  as  '+datadg';

Database altered.

4.备库查看数据文件
SQL> select file#,name from v$datafile order by file#;

     FILE# NAME
---------- ------------------------------------------------------------
         1 +DATADG/ORCLDG/DATAFILE/system.258.954626559
         2 +DATADG/ORCLDG/DATAFILE/roidba.387.963323519
         3 +DATADG/ORCLDG/DATAFILE/sysaux.259.954626615
         4 +DATADG/ORCLDG/DATAFILE/undotbs1.260.954626701
         5 +DATADG/ORCLDG/DATAFILE/roidba.388.963323313
         6 +DATADG/ORCLDG/DATAFILE/users.261.954626717
         7 +DATADG/ORCLDG/DATAFILE/roidba.376.963349729

7 rows selected.

SQL> 

SQL> ! ls -l /u01/app/oracle/product/12.1.0/dbhome_1/dbs/
total 11448
-rw-r----- 1 oracle asmadmin     1024 Dec 14 11:22 archlog_1_83_961866198_585bafa7.arc
-rw-r----- 1 oracle asmadmin    48640 Dec 14 11:22 archlog_1_84_961866198_585bafa7.arc
-rw-rw---- 1 oracle oinstall     1544 Dec 21 21:00 hc_orcldg.dat
-rw-r--r-- 1 oracle oinstall     2992 Feb  3  2012 init.ora
-rw-r--r-- 1 oracle oinstall       41 Sep 13 22:08 initorcldg.ora
-rw-r----- 1 oracle oinstall       24 Sep 13 22:02 lkORCLDG
-rw-r----- 1 oracle asmadmin 11649024 Dec 17 11:53 snapcf_orcldg.f
-rw-r----- 1 oracle oinstall     3584 Sep 13 22:02 spfileorcldg.ora

5.备库查看dg信息
SQL> select message from v$dataguard_status;

MESSAGE
--------------------------------------------------------------------------------
WARNING: STANDBY_FILE_MANAGEMENT initialization parameter is
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
ARC3: Archival started
Managed Standby Recovery starting Real Time Apply
Primary database is in MAXIMUM PERFORMANCE mode
RFS[1]: Assigned to RFS process (PID:3014)

MESSAGE
--------------------------------------------------------------------------------
RFS[2]: Assigned to RFS process (PID:3008)
RFS[3]: Assigned to RFS process (PID:3021)
RFS[4]: Assigned to RFS process (PID:3024)
ARC1: Beginning to archive thread 1 sequence 261 (8320210-8320689)
ARC0: Beginning to archive thread 1 sequence 258 (8194341-8318764)
ARC1: Completed archiving thread 1 sequence 261 (0-0)
ARC0: Completed archiving thread 1 sequence 258 (0-0)
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 1111

MESSAGE
--------------------------------------------------------------------------------
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery process shutdown
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
Media Recovery Log +DATADG/arch/log_1_258_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_259_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_260_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_261_961866198_585bafa7.arc
Media Recovery Waiting for thread 1 sequence 262 (in transit)

32 rows selected.

6.主库切归档,备库继续查看日志

MESSAGE
--------------------------------------------------------------------------------
WARNING: STANDBY_FILE_MANAGEMENT initialization parameter is
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC2: Becoming the heartbeat ARCH
ARC2: Becoming the active heartbeat ARCH
ARC3: Archival started
Managed Standby Recovery starting Real Time Apply
Primary database is in MAXIMUM PERFORMANCE mode
RFS[1]: Assigned to RFS process (PID:3014)

MESSAGE
--------------------------------------------------------------------------------
RFS[2]: Assigned to RFS process (PID:3008)
RFS[3]: Assigned to RFS process (PID:3021)
RFS[4]: Assigned to RFS process (PID:3024)
ARC1: Beginning to archive thread 1 sequence 261 (8320210-8320689)
ARC0: Beginning to archive thread 1 sequence 258 (8194341-8318764)
ARC1: Completed archiving thread 1 sequence 261 (0-0)
ARC0: Completed archiving thread 1 sequence 258 (0-0)
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
MRP0: Background Media Recovery terminated with error 1111

MESSAGE
--------------------------------------------------------------------------------
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery process shutdown
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery starting Real Time Apply
Media Recovery Log +DATADG/arch/log_1_258_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_259_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_260_961866198_585bafa7.arc
Media Recovery Log +DATADG/arch/log_1_261_961866198_585bafa7.arc
Media Recovery Waiting for thread 1 sequence 262 (in transit)
ARC3: Beginning to archive thread 1 sequence 262 (8320689-8322685)

MESSAGE
--------------------------------------------------------------------------------
ARC3: Completed archiving thread 1 sequence 262 (0-0)
Media Recovery Waiting for thread 1 sequence 263 (in transit)

35 rows selected.

SQL> 
三、小结

1.ALTER DATABASE ... CREATE DATAFILE
--官方说明
Creates a new empty data file in place of an old one--useful to re-create a data file that was lost with no backup.

2.StandbyFileManagement 需要参数设置为auto
DGMGRL> edit database orcl set property StandbyFileManagement=auto;
Property "standbyfilemanagement" updated
DGMGRL> edit database orcldg set property StandbyFileManagement=auto;
Property "standbyfilemanagement" updated
DGMGRL> 
阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯