How to get list of saved Putty sessions:
reg query HKEY_USERS\S-1-5-21-4126248137-1196961995-3114428227-500\Software\SimonTatham\PuTTY\Sessions
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
четверг, 9 июля 2009 г.
среда, 8 июля 2009 г.
вторник, 7 июля 2009 г.
How to simulate block corruption
REM simulate block corruption for test 12.1
RMAN> alter database datafile 6 offline;
Statement processed
dd if=zero.txt of=C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF seek=30 bs=8192
RMAN> select * from v$database_block_corruption;
no rows selected
RMAN> validate datafile 6;
Starting validate at 10-NOV-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00006 name=C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6 FAILED 0 29 641 1003639
File Name: C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 15
Index 0 3
Other 1 593
validate found one or more corrupt blocks
See trace file C:\APP\ORACLE\diag\rdbms\db12cdb\db12cdb\trace\db12cdb_ora_10992.trc for details
Finished validate at 10-NOV-15
RMAN> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO CON_ID
---------- ---------- ---------- ------------------ --------- ----------
6 30 1 0 CORRUPT 0
RMAN> alter database datafile 6 online;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 11/10/2015 11:14:15
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: 'C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF'
RMAN> recover corruption list;
Starting recover at 10-NOV-15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00006
channel ORA_DISK_1: reading from backup piece C:\APP\ORACLE\FAST_RECOVERY_AREA\DB12CDB\BACKUPSET\2015_11_10\O1_MF_NNNDF_TAG20151110T101009_C43JQCC6_.BKP
channel ORA_DISK_1: piece handle=C:\APP\ORACLE\FAST_RECOVERY_AREA\DB12CDB\BACKUPSET\2015_11_10\O1_MF_NNNDF_TAG20151110T101009_C43JQCC6_.BKP tag=TAG20151110T101009
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 10-NOV-15
RMAN> alter database datafile 6 online;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 11/10/2015 11:14:32
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: 'C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF'
RMAN> recover datafile 6;
Starting recover at 10-NOV-15
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 10-NOV-15
RMAN> alter database datafile 6 online;
Statement processed
RMAN> alter database datafile 6 offline;
Statement processed
dd if=zero.txt of=C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF seek=30 bs=8192
RMAN> select * from v$database_block_corruption;
no rows selected
RMAN> validate datafile 6;
Starting validate at 10-NOV-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00006 name=C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6 FAILED 0 29 641 1003639
File Name: C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 15
Index 0 3
Other 1 593
validate found one or more corrupt blocks
See trace file C:\APP\ORACLE\diag\rdbms\db12cdb\db12cdb\trace\db12cdb_ora_10992.trc for details
Finished validate at 10-NOV-15
RMAN> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO CON_ID
---------- ---------- ---------- ------------------ --------- ----------
6 30 1 0 CORRUPT 0
RMAN> alter database datafile 6 online;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 11/10/2015 11:14:15
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: 'C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF'
RMAN> recover corruption list;
Starting recover at 10-NOV-15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring block(s)
channel ORA_DISK_1: specifying block(s) to restore from backup set
restoring blocks of datafile 00006
channel ORA_DISK_1: reading from backup piece C:\APP\ORACLE\FAST_RECOVERY_AREA\DB12CDB\BACKUPSET\2015_11_10\O1_MF_NNNDF_TAG20151110T101009_C43JQCC6_.BKP
channel ORA_DISK_1: piece handle=C:\APP\ORACLE\FAST_RECOVERY_AREA\DB12CDB\BACKUPSET\2015_11_10\O1_MF_NNNDF_TAG20151110T101009_C43JQCC6_.BKP tag=TAG20151110T101009
channel ORA_DISK_1: restored block(s) from backup piece 1
channel ORA_DISK_1: block restore complete, elapsed time: 00:00:01
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 10-NOV-15
RMAN> alter database datafile 6 online;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 11/10/2015 11:14:32
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: 'C:\PROJECT\DB12CDB\DB12CDB\USERS01.DBF'
RMAN> recover datafile 6;
Starting recover at 10-NOV-15
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 10-NOV-15
RMAN> alter database datafile 6 online;
Statement processed
Подписаться на:
Сообщения (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...