-- After media failure
03:03:25 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test';
select * from t_t where object_name = 'test'
*
ERROR at line 1:
ORA-01115: IO error reading block from file 15 (block # 13)
ORA-01110: data file 15: 'F:\OCP\T_I.DBF'
ORA-27091: unable to queue I/O
ORA-27070: async read/write failed
OSD-04006: ReadFile() failure, unable to read from file
-- But file online
03:03:46 150 4294967295 SYS@orcl> select status, error from v$datafile_header where file# = 15;
STATUS | ERROR
----------- | -----------------------------------------------------------------
ONLINE | CANNOT READ HEADER
-- Put to offline
RMAN> sql 'alter database datafile 15 offline';
sql statement: alter database datafile 15 offline
-- Try back and cool! file just needs recovery
RMAN> sql 'alter database datafile 15 online';
sql statement: alter database datafile 15 online
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 12/11/2010 03:09:42
RMAN-11003: failure during parse/execution of SQL statement: alter database datafile 15 online
ORA-01113: file 15 needs media recovery
ORA-01110: data file 15: 'F:\OCP\T_I.DBF'
03:10:04 150 4294967295 SYS@orcl> select status, error from v$datafile_header where file# = 15;
STATUS | ERROR
----------- | -----------------------------------------------------------------
OFFLINE |
-- Recover
03:09:51 150 4294967295 SYS@orcl> recover datafile 15;
Media recovery complete.
-- And back to online
RMAN> sql 'alter database datafile 15 online';
sql statement: alter database datafile 15 online
-- Get working statement again :)
03:10:38 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test';
no rows selected
Elapsed: 00:00:00.10
Execution Plan
----------------------------------------------------------
Plan hash value: 476242662
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 177 | 1 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_T | 1 | 177 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | T_I | 1 | | 1 (0)| 00:00:01 |
------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("OBJECT_NAME"='test')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
2 consistent gets
0 physical reads
0 redo size
995 bytes sent via SQL*Net to client
370 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
This site contains information, scripts and instructions related to Oracle database and other technologies. Please use sqlplus and test my scripts on test environment before actual use on production. All relevant comments are welcome.
Страницы
- Main
- Veritas cluster
- AIX
- Solaris
- Linux
- Performance scripts
- RAC
- TNS
- Init parameters
- Dataguard
- ASM
- Unix tips
- VxVM
- Linux HA (hearbeat)
- Oracle internals
- Metalink (useful notes)
- Security
- OGG Oracle Golden Gate
- HTML/JavaScript in sqlplus
- Automatic TSPITR 11.2.0.3 (dropped user)
- 12.1
- SQL Performance Analyzer
- Backup/Recovery
- Alert log
Подписаться на:
Комментарии к сообщению (Atom)
Update BLOB
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
RMAN> sql "alter database datafile '/u01/app/oracle/oradata/orcl/test_1.dbf' off line"; using target database contro...
-
-- After media failure 03:03:25 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test'; select * from t_t where ob...
Комментариев нет:
Отправить комментарий