backup Controlfile to trace [message #436781] |
Mon, 28 December 2009 05:21 |
pokhraj_d
Messages: 117 Registered: December 2007
|
Senior Member |
|
|
Hi All,
I have created trace file by using below command:-
=================
SQL > alter database backup controlfile to trace;
Does anybody have a script to parse this control file backup?
that is, i need to create a neat script that contains just
STARTUP NOMOUNT
CREATE CONTROLFILE...
...
...
CHARACTER SET JA16SJIS;
Can someone share it with me ??
Regards-
Pokhraj
|
|
|
|
Re: backup Controlfile to trace [message #436787 is a reply to message #436781] |
Mon, 28 December 2009 05:59 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
##shamelessly stolen in bits & pieces from Google.
oracle@atana#perl -ne 'print unless ((/^#/) or (/^--/)); exit if (/^;/);' < ctrl.sql
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "CHUM" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/data/chum/redo01.log' SIZE 50M,
GROUP 2 '/u01/data/chum/redo02.log' SIZE 50M,
GROUP 3 '/u01/data/chum/redo03.log' SIZE 50M
DATAFILE
'/u01/data/chum/system01.dbf',
'/u01/data/chum/sysaux01.dbf',
'/u01/data/chum/undotbs01.dbf',
'/u01/data/chum/users01.dbf'
CHARACTER SET WE8MSWIN1252
;
[Updated on: Mon, 28 December 2009 06:02] Report message to a moderator
|
|
|
Re: backup Controlfile to trace [message #436796 is a reply to message #436781] |
Mon, 28 December 2009 06:32 |
pokhraj_d
Messages: 117 Registered: December 2007
|
Senior Member |
|
|
Hi,
Thanx for the solution. Only one confusion:-
do I need to insert the below command at the shell script?
"perl -ne 'print unless ((/^#/) or (/^--/)); exit if (/^;/);' < ctrl.sql"
Forgot to post. I am using Shell script.
Please advice.
Regards-
Pokhraj
[Updated on: Mon, 28 December 2009 06:37] Report message to a moderator
|
|
|
|
|