This tutorial explains the steps to restore and recover a datafile lost In an Oracle standby datafiles.
Production Database : ----> db_unique_name : DHCP
Standby Database : ---->db_unique_name : DHCPDR
Start the Standby Database in MOUNT State:
$ sqlplus / as sysdba
Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jan 28 15:40:58 2025
Version 19.16.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1073737776 bytes
Fixed Size 8933424 bytes
Variable Size 926941184 bytes
Database Buffers 130023424 bytes
Redo Buffers 7839744 bytes
Database mounted.
Verify the Standby Database Status:
SQL> select name,database_role,open_mode,log_mode from v$database;
NAME DATABASE_ROLE OPEN_MODE LOG_MODE
---------- ------------------------------ ------------------- ---------------------
DHCP PHYSICAL STANDBY MOUNTED ARCHIVELOG
Connect to RMAN and Restore the Datafile Using Service:
ora19c@DHCPDR:~$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jan 28 15:48:58 2025
Version 19.16.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: DHCP (DBID=1881015276, not open)
RMAN> restore datafile 53 from service DHCP;
Starting restore at 28-JAN-25
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=392 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=2 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=237 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=276 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: using network backup set from service DHCP
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 0053 to /sapdata2/DHCP/datafiles/sr_datafile_53.dbf
channel ORA_DISK_1: restore complete, elapsed time: 01:44:06
Finished restore at 28-JAN-25
Recovery Manager complete.
ora19c@DHCPDR:~$
Toufique Khan