|
|
복구 전 :
@recover
복구 후 :
복구과정 :
SYS @ oracle19 > @datafile
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
7 USERS
/u01/app/oracle/oradata/ORACLE19/users01.dbf
4 UNDOTBS1
/u01/app/oracle/oradata/ORACLE19/undotbs01.dbf
1 SYSTEM
/u01/app/oracle/oradata/ORACLE19/system01.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
3 SYSAUX
/u01/app/oracle/oradata/ORACLE19/sysaux01.dbf
5 TS702
/u01/app/oracle/oradata/ORACLE19/ts702.dbf
2 INDEX702
/u01/app/oracle/oradata/ORACLE19/index702.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
8 TS703
/u01/app/oracle/oradata/ORACLE19/ts703.dbf
9 INDEX703
/u01/app/oracle/oradata/ORACLE19/index703.dbf
10 TS834
/u01/app/oracle/oradata/ORACLE19/ts834.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
11 TS708
/u01/app/oracle/oradata/ORACLE19/ts708b.dbf
12 TS834
/u01/app/oracle/oradata/ORACLE19/ts834b.dbf
13 TS899
/u01/app/oracle/oradata/ORACLE19/ts899.dbf
12 rows selected.
SYS @ oracle19 > !rm /u01/app/oracle/oradata/ORACLE19/ts834.dbf
SYS @ oracle19 > !rm /u01/app/oracle/oradata/ORACLE19/ts708b.dbf
SYS @ oracle19 > !rm /u01/app/oracle/oradata/ORACLE19/ts834b.dbf
SYS @ oracle19 > !rm /u01/app/oracle/oradata/ORACLE19/ts899.dbf
SYS @ oracle19 > startup force
ORACLE instance started.
Total System Global Area 2415917880 bytes
Fixed Size 8899384 bytes
Variable Size 536870912 bytes
Database Buffers 1862270976 bytes
Redo Buffers 7876608 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 10 - see DBWR trace file
ORA-01110: data file 10: '/u01/app/oracle/oradata/ORACLE19/ts834.dbf'
SYS @ oracle19 > @recover
FILE#
----------
NAME
--------------------------------------------------------------------------------
10
/u01/app/oracle/oradata/ORACLE19/ts834.dbf
11
/u01/app/oracle/oradata/ORACLE19/ts708b.dbf
12
/u01/app/oracle/oradata/ORACLE19/ts834b.dbf
FILE#
----------
NAME
--------------------------------------------------------------------------------
13
/u01/app/oracle/oradata/ORACLE19/ts899.dbf
SYS @ oracle19 > exit;
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@ora19c ~]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 29 16:29:42 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORACLE19 (DBID=3392687739, not open)
RMAN> list failure;
using target database control file instead of recovery catalog
Database Role: PRIMARY
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1402 HIGH OPEN 2025/09/29:16:28:53 One or more non-system datafiles are missing
RMAN> advise failure;
Database Role: PRIMARY
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1402 HIGH OPEN 2025/09/29:16:28:53 One or more non-system datafiles are missing
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=622 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /u01/app/oracle/oradata/ORACLE19/ts834.dbf was unintentionally renamed or moved, restore it
2. If file /u01/app/oracle/oradata/ORACLE19/ts708b.dbf was unintentionally renamed or moved, restore it
3. If file /u01/app/oracle/oradata/ORACLE19/ts834b.dbf was unintentionally renamed or moved, restore it
4. If file /u01/app/oracle/oradata/ORACLE19/ts899.dbf was unintentionally renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 10; Restore and recover datafile 11; Restore and recover datafile 12; ...
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/oracle19/oracle19/hm/reco_3886612310.hm
RMAN> repair failure preview;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/oracle19/oracle19/hm/reco_3886612310.hm
contents of repair script:
# restore and recover datafile
restore ( datafile 10, 11, 12, 13 );
recover datafile 10, 11, 12, 13;
sql 'alter database datafile 10, 11, 12, 13 online';
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/oracle19/oracle19/hm/reco_3886612310.hm
contents of repair script:
# restore and recover datafile
restore ( datafile 10, 11, 12, 13 );
recover datafile 10, 11, 12, 13;
sql 'alter database datafile 10, 11, 12, 13 online';
Do you really want to execute the above repair (enter YES or NO)? yes
executing repair script
Starting restore at 2025/09/29:16:30:44
using channel ORA_DISK_1
creating datafile file number=13 name=/u01/app/oracle/oradata/ORACLE19/ts899.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/ORACLE19/ts708b.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T151034_nfn8ptkm_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T151034_nfn8ptkm_.bkp tag=TAG20250929T151034
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/ORACLE19/ts834.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T152135_nfn9ch89_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T152135_nfn9ch89_.bkp tag=TAG20250929T152135
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/ORACLE19/ts834b.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T152529_nfn9lst5_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORACLE19/backupset/2025_09_29/o1_mf_nnndf_TAG20250929T152529_nfn9lst5_.bkp tag=TAG20250929T152529
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2025/09/29:16:30:47
Starting recover at 2025/09/29:16:30:47
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/fast_recovery_area/ORACLE19/archivelog/1_2_1213100042.dbf
archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/fast_recovery_area/ORACLE19/archivelog/1_3_1213100042.dbf
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/fast_recovery_area/ORACLE19/archivelog/1_4_1213100042.dbf
archived log file name=/u01/app/oracle/fast_recovery_area/ORACLE19/archivelog/1_2_1213100042.dbf thread=1 sequence=2
media recovery complete, elapsed time: 00:00:00
Finished recover at 2025/09/29:16:30:48
sql statement: alter database datafile 10, 11, 12, 13 online
repair failure complete
Do you want to open the database (enter YES or NO)? yes
database opened
RMAN> exit;
Recovery Manager complete.
[oracle@ora19c ~]$ sys
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Sep 29 16:31:17 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SYS @ oracle19 > @datafile
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
7 USERS
/u01/app/oracle/oradata/ORACLE19/users01.dbf
4 UNDOTBS1
/u01/app/oracle/oradata/ORACLE19/undotbs01.dbf
1 SYSTEM
/u01/app/oracle/oradata/ORACLE19/system01.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
3 SYSAUX
/u01/app/oracle/oradata/ORACLE19/sysaux01.dbf
5 TS702
/u01/app/oracle/oradata/ORACLE19/ts702.dbf
2 INDEX702
/u01/app/oracle/oradata/ORACLE19/index702.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
8 TS703
/u01/app/oracle/oradata/ORACLE19/ts703.dbf
9 INDEX703
/u01/app/oracle/oradata/ORACLE19/index703.dbf
10 TS834
/u01/app/oracle/oradata/ORACLE19/ts834.dbf
FILE_ID TABLESPACE_NAME
---------- ------------------------------
FILE_NAME
--------------------------------------------------------------------------------
11 TS708
/u01/app/oracle/oradata/ORACLE19/ts708b.dbf
12 TS834
/u01/app/oracle/oradata/ORACLE19/ts834b.dbf
13 TS899
/u01/app/oracle/oradata/ORACLE19/ts899.dbf
12 rows selected.
