Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ADG database data file damage handling

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. description

For a single instance ADG database, if the system01.dbf file of the slave database is damaged, you need to restore the data file to ensure that the data of the main database is consistent.

Second, the processing process

1. The database starts to mount state.

Recovery Manager: Release 11.2.0.4.0-Production on Thu Dec 12 20:42:35 2019

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connected to target database (not started)

RMAN > startup mount

Oracle instance started

Database mounted

Total System Global Area 3089920000 bytes

Fixed Size 2257232 bytes

Variable Size 654315184 bytes

Database Buffers 2415919104 bytes

Redo Buffers 17428480 bytes

2. Use RMAN to restore

$rman target sys/xxxx@devdb auxiliary sys/xxx@devdbdg

Recovery Manager: Release 11.2.0.4.0-Production on Thu Dec 12 20:43:53 2019

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

Connected to target database: DEVDB (DBID=931475173)

Connected to auxiliary database: DEVDB (DBID=931475173, not open)

RMAN > run {

Allocate channel d1 type disk

Allocate channel d2 type disk

Backup as copy reuse

Datafile 1 auxiliary format'/ oradata/devdbdg/system01.dbf'

} 2 > 3 > 4 > 5 > 6 >

Using target database control file instead of recovery catalog

Allocated channel: d1

Channel d1: SID=1145 device type=DISK

Allocated channel: d2

Channel d2: SID=1715 device type=DISK

Starting backup at 12-DEC-2019 20:45:23

Channel d1: starting datafile copy

Input datafile file number=00001 name=/oradata/devdb/system01.dbf

Output file name=/oradata/devdbdg/system01.dbf tag=TAG20191212T204523

Channel d1: datafile copy complete, elapsed time: 00:00:15

Finished backup at 12-DEC-2019 20:45:38

Released channel: d1

Released channel: d2

RMAN >

RMAN > exit

Recovery Manager complete.

$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 12 20:45:50 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL > alter database recover managed standby database using current logfile disconnect from session

Database altered.

SQL > alter database recover managed standby database cancel

Database altered.

SQL > alter database open

Database altered.

SQL > alter database recover managed standby database using current logfile disconnect from session

Database altered.

SQL > * select from t *

ID 1 2 3 4

SQL >

SQL > select process,status from v$managed_standby

PROCESS STATUS

ARCH CONNECTED

ARCH CONNECTED

ARCH CLOSING

ARCH CONNECTED

RFS IDLE

RFS IDLE

RFS IDLE

MRP0 APPLYING_LOG

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report