Thursday, April 23, 2009

Easy way to find backup controlfile trace...

Yesterday I was wondering how to generate backup control file trace and than easily find appropriate trace file. The answer is very simple. We need to use tracefile_identifier!

SQL> alter session set tracefile_identifier='bcf';
Session altered.

SQL> alter database backup controlfile to trace;
Database altered.

SQL> exit
(...)

oralab01:/home/oracle> cd $ORACLE_HOME/admin/cbd/udump

oralab01:/opt/oracle/admin/mydb/udump> ls -latr *bcf*
-rw-r----- 1 oracle dba 91521 Apr 22 11:09
mydb_ora_7093_bcf.trc

oralab01:/opt/oracle/admin/mydb/udump> more mydb_ora_7093_bcf.trc
(...)
STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "mydb" NORESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 6
MAXLOGMEMBERS 3
(...)

0 comments: