RMAN> list failure;
starting full resync of recovery catalog
full resync complete
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1902 HIGH OPEN 2015-10-15:08:06:31 One or more non-system datafiles are offline
높은 수준의 문제점 priority
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1902 HIGH OPEN 2015-10-15:08:06:31 One or more non-system datafiles are offline
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=144 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=24 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
1. Please contact Oracle Support Services to resolve failure 8445: Datafile 7: '/u01/app/oracle/oradata/orcl/test.dbf' is offline
2. Please contact Oracle Support Services to resolve failure 8451: Datafile 8: '/u01/app/oracle/oradata/orcl/test2.dbf' is offline
Optional Manual Actions
=======================
no manual actions available
Automated Repair Options
========================
no automatic repair options available
RMAN> repair failure;
SYS@orcl>create tablespace oltp
2 datafile '/u01/oltp01.dbf' size 10m;
Tablespace created.
SYS@orcl>create table hr.cpemp
2 tablespace oltp
3 as select * from hr.employees;
Table created.
SYS@orcl>select count(*) from hr.cpemp;
COUNT(*)
----------
107
SYS@orcl>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
[root@lnx04 u01]# rm -f oltp01.dbf
[root@lnx04 u01]# ls
app lost+found
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@lnx04 orcl]$ rtc
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Oct 15 09:09:50 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1420439357)
connected to recovery catalog database
RMAN> report schema;
starting full resync of recovery catalog
full resync complete
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
RMAN-06169: could not read file header for datafile 7 error reason 5
1 700 SYSTEM YES /u01/app/oracle/oradata/orcl/system01.dbf
2 540 SYSAUX NO /u01/app/oracle/oradata/orcl/sysaux01.dbf
3 105 UNDOTBS1 YES /u01/app/oracle/oradata/orcl/undotbs01.dbf
4 5 USERS NO /u01/app/oracle/oradata/orcl/users01.dbf
5 100 EXAMPLE NO /u01/app/oracle/oradata/orcl/example01.dbf
6 100 RMAN_TBS NO /u01/app/oracle/oradata/orcl/rman_tbs.dbf
7 0 OLTP NO /u01/oltp01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 600 TEMP 600 /u01/app/oracle/oradata/orcl/temp02.dbf
RMAN> list failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1842 HIGH OPEN 2015-10-15:09:09:25 One or more non-system datafiles are missing
1902 HIGH OPEN 2015-10-15:08:06:31 One or more non-system datafiles are offline
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1842 HIGH OPEN 2015-10-15:09:09:25 One or more non-system datafiles are missing
1902 HIGH OPEN 2015-10-15:08:06:31 One or more non-system datafiles are offline
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=144 device type=DISK
analyzing automatic repair options complete
Not all specified failures can currently be repaired.
The following failures must be repaired before advise for others can be given.
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------------- -------
1842 HIGH OPEN 2015-10-15:09:09:25 One or more non-system datafiles are missing
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /u01/oltp01.dbf was unintentionally renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 7
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_412522569.hm
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_412522569.hm
contents of repair script:
# restore and recover datafile
sql 'alter database datafile 7 offline';
restore datafile 7;
recover datafile 7;
sql 'alter database datafile 7 online';
Do you really want to execute the above repair (enter YES or NO)?
executing repair script
sql statement: alter database datafile 7 offline
Starting restore at 2015-10-15:09:11:38
using channel ORA_DISK_1
using channel ORA_DISK_2
creating datafile file number=7 name=/u01/oltp01.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 2015-10-15:09:11:38
Starting recover at 2015-10-15:09:11:38
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 2015-10-15:09:11:38
sql statement: alter database datafile 7 online
repair failure complete
[root@lnx04 u01]# ls
app lost+found oltp01.dbf
[root@lnx04 u01]#
'스터디북' 카테고리의 다른 글
[10/16] 실습 - 2 Shrink Space (0) | 2015.10.16 |
---|---|
[10/16] 실습 - 1 RowMigration&&chaining (0) | 2015.10.16 |
[10/15] 정리 (0) | 2015.10.15 |
[10/15] system.dbf for corruption (0) | 2015.10.15 |
[10/14] 실습 - 4 block corruption recover (0) | 2015.10.14 |