Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Script tp parse control file backup ??

Re: Script tp parse control file backup ??

From: Ron Perrie <ron.perrie_at_perriepartners.co.uk>
Date: Thu, 01 Jul 2004 17:04:57 +0100
Message-ID: <40E43629.809@perriepartners.co.uk>


Mladen Gogala carved on a tree stump on 01/07/2004 16:14:

>On 07/01/2004 10:31:11 AM, Mitchell Baldwin wrote:
>
>
>>I thought I ought to post the code !....
>>
>>
>
>I don't think so.
>
>
>
>>------- Start of Code
>>
>>
>
>sqlplus:
>alter database backup controlfile to trace as '/tmp/tracefile.trc';
>
>
>perl -ne 'print unless ((/^#/) or (/^--/)); exit if (/^;/);'</tmp/tracefile.trc
>
>------- End of Code
>
>Demonstration:
>-bash-2.05b$ perl -ne ' print unless ((/^#/) or (/^--/)); exit if (/^;/);'<tracefile.trc
>STARTUP NOMOUNT
>CREATE CONTROLFILE REUSE DATABASE "CMPL" NORESETLOGS ARCHIVELOG
> MAXLOGFILES 5
> MAXLOGMEMBERS 3
> MAXDATAFILES 100
> MAXINSTANCES 1
> MAXLOGHISTORY 226
>LOGFILE
> GROUP 1 '/data/CMPL/redo/redo01.rdo' SIZE 128M,
> GROUP 2 '/data/CMPL/redo/redo02.rdo' SIZE 128M,
> GROUP 3 '/data/CMPL/redo/redo03.rdo' SIZE 128M
>
>DATAFILE
> '/data/CMPL/system/system01.dbf',
> '/data/CMPL/system/undotbs01.dbf',
> '/data/CMPL/supplied/indx01.dbf',
> '/data/CMPL/supplied/tools01.dbf',
> '/data/CMPL/supplied/users01.dbf',
> '/data/CMPL/supplied/xdb01.dbf',
> '/data/CMPL/data/COMPLIANCE1.dbf',
> '/data/CMPL/data/IMSEOK01.dbf',
> '/data2/CMPL/data/UNIV01.dbf',
> '/data/CMPL/data/UNIV_INDX01.dbf',
> '/data/CMPL/data/VIEW.dbf',
> '/data2/CMPL/data/WIZARD01.dbf',
> '/data2/CMPL/data/WIZARD_NDX01.dbf',
> '/data2/CMPL/data/TRD01.dbf',
> '/data2/CMPL/transport/BLOOMBERG01.dbf',
> '/data/CMPL/transport/BLOOMBERG02.dbf',
> '/data/CMPL/transport/BLOOMBERG01.dbf',
> '/data2/CMPL/transport/BLOOMBERG_NDX01.dbf',
> '/data2/CMPL/data/BLOOMBERG_NDX02.dbf',
> '/data2/CMPL/transport/BLOOMBERG02.dbf',
> '/data2/CMPL/data/BLOOMBERG_NDX03.dbf'
>CHARACTER SET WE8ISO8859P1
>;
>
>
>
>

Mladen,

Thanks for that lovely perl one-liner.
Unfortunately I can get it to run on my PC. (laptop, Winders XP-PRO) . I am just starting with perl (ActivePerl v5.8.4) and the hieroglyphs of the language still have me crying into my beer (doesn't taste too bad actually)
Anyway, the error returned is:
 "Can't find string terminator " ' " anywhere before EOF at -e line 1."

Please could you enlighten me with a book title,url or other source for a solution?

Cheers ,

Ron



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jul 01 2004 - 11:01:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US