Overcome ORA-600[4xxx] open database

Recovering a Dropped Table from a Full Database Backup using manual backup and recovery procedures (Doc ID 96197.1)

You cannot follow the note exactly as this note is for a valid full backup where you have all logs needed for point in time recovery – the changes you need to make are in the summary . . . → Read More: Overcome ORA-600[4xxx] open database

清理RMAN Catalog恢复目录

有这样一个需求,用户使用RMAN Catalog恢复目录保存多台Database Server的备份信息。 由于每天都会执行大量的backup操作,而且所备份的DB的结构本身都已经十分复杂了,导致recovery catalog恢复目录占用空间迅速增长,且用户的磁盘空间较为紧张,可能在短期内无法扩disk space,这就让我们考虑到需要清理RMAN Recovery Catalog中一些不再需要的记录。

首先搞清楚在Catalog库中那些数据段占用了最多的空间Space:

 

这里 RMAN 用户是Catalog Schema 的拥有者 SQL> select bytes/1024/1024 “MB” ,segment_name,segment_type from dba_segments where owner=’RMAN’ order by bytes desc; MB SEGMENT_NAME SEGMENT_TYPE ———- ——————– —————— 88 ROUT TABLE 47 ROUT_U1 INDEX 31 ROUT_I_RSR INDEX 23 ROUT_I_DB INDEX .125 RSR TABLE

 

可以看到是ROUT表占用了最多的空间,那么这张表是做什么用处的呢?

ROUT表用于记录RMAN在执行backup等命令时的输出内容,实际上堆积了V$RMAN_OUTPUT视图中的内容,当目标数据库连接到CATALOG库执行操作或Resync Catalog时会将V$RMAN_OUTPUT中的信息同步到Catalog库的ROUT表中。

 

SQL> . . . → Read More: 清理RMAN Catalog恢复目录

Script:收集介质恢复诊断信息

以下脚本可以用于收集介质恢复诊断信息(recovery_info.sql):

— begin [recovery_info.sql] — define spoolfile = &1 spool &spoolfile alter session set nls_date_format = ‘YYYY-MM-DD HH24:MI:SS’; alter session set timed_statistics = true; alter session set max_dump_file_size = UNLIMITED; set feedback on set term on set wrap on set trimspool on set pagesize 1000 set linesize 100 set numwidth 10 select to_char(sysdate) start_time from . . . → Read More: Script:收集介质恢复诊断信息

Oracle数据恢复:解决ORA-00600:[4000] ORA-00704: bootstrap process failure错误一例

节前帮网友打开了一套断电后无法正常启动的10.2.0.1数据库,该库使用非归档模式且没有任何备份。

主机断电后,该网友尝试重启数据库实例,但是遇到了ORA-00600:[kccpb_sanity_check_2]内部错误:

 

SQL> select status from v$instance; STATUS ———— STARTED SQL> SQL> shutdown immediate; ORA-01507: database not mounted ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 2147483648 bytes Fixed Size 1220432 bytes Variable Size 486539440 bytes Database Buffers 1644167168 bytes Redo Buffers 15556608 bytes ORA-00600: internal error code, . . . → Read More: Oracle数据恢复:解决ORA-00600:[4000] ORA-00704: bootstrap process failure错误一例

Script:检查数据库当前是否有备份操作在执行中

以下脚本可以用于检测数据库当前是否有备份操作在执行中:

SELECT DECODE(os_backup.backup + rman_backup.backup, 0, ‘FALSE’, ‘TRUE’) backup FROM (SELECT COUNT(*) backup FROM gv$backup WHERE status = ‘ACTIVE’) os_backup, (SELECT COUNT(*) backup FROM gv$session WHERE status = ‘ACTIVE’ AND client_info like ‘%rman%’) rman_backup /

Does Duplicate Target Database need Pre-existing DB backup?

之前有网友问我在10g中通过RMAN 的duplicate target database命令复制数据库时是否需要先完成全库的备份。

实际我在10g中并不常用duplicate target database 来帮助创建DataGuard Standby Database,所以虽然记忆中仍有些印象,却不能十分确定地回答了。

今天查了一下资料,发现原来Active database duplication 和 Backup-based duplication 是11g才引入的特性,换句话说10g中duplication是要求预先完成数据库的RMAN backup备份的。

具体关于以上2个特性见文档<RMAN ‘Duplicate Database’ Feature in 11G>,引文如下:

RMAN ‘Duplicate Database’ Feature in 11G You can create a duplicate database using the RMAN duplicate command. The duplicate database has a different DBID from the source database and functions entirely . . . → Read More: Does Duplicate Target Database need Pre-existing DB backup?

Restore Production Database to Development Platform

Overview of setup and configuration

Oracle Enterprise Edition 11gR2. 11.2.0.1.0 Linux RH5 NetBackup 6.5.5 Identical environments: Identical versions of Oracle. Same ORACLE_HOME and ORACLE_BASE. The archive log directory is defined to be the Flash Recovery Area: You know the DBID. Control file autobackup feature enabled with the default format.

NetBackup MML considerations

Restoring from tape using the . . . → Read More: Restore Production Database to Development Platform A step-by-step example

Backup Script:Expdp Schema to ASM Storage

Below is a shell script which backup dmpfile to ASM storage everyday:

#!/bin/bash #asmcmd mkdir DATA/ASM_DATAPUMP_BACKUP #create directory ASM_DATAPUMP_BACKUP as ‘+DATA/ASM_DATAPUMP_BACKUP’; #grant read,write on directory ASM_DATAPUMP_BACKUP to system; #create directory LOGDIR as ‘/s01/logdir’; #grant read,write on directory LOGDIR to system; #create directory DMPBACKUP as ‘/s01/dmpbackup’; #grant read,write on directory DMPBACKUP to system; export ORACLE_HOME=/s01/oracle/product/11.2.0/dbhome_1; export . . . → Read More: Backup Script:Expdp Schema to ASM Storage