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

Home -> Community -> Usenet -> c.d.o.server -> Re: Dan's handy perl script

Re: Dan's handy perl script

From: Sybrand Bakker <oradba_at_sybrandb.demon.nl>
Date: Tue, 18 Dec 2001 23:13:32 +0100
Message-ID: <fnfv1uksiger69f3kv8cqsorqgeq93uv8p@4ax.com>


On 18 Dec 2001 21:13:26 GMT, Dan Bikle <dbikle_at_rahul.net> wrote:

>
>Hi,
>
>I found a useful perl command which comes in handy.
>
>Often I use it when I install an Oracle database using an existing
>tree of Oracle software rather than from a cdrom. I refer to this
>method as a "manual install".
>
>I started using this method when Oracle released 8.1.6.
>
>The reason for this is that after 8.1.6, I found that some of
>the sql scripts under $ORACLE_HOME have $ORACLE_HOME hard-coded
>into them.
>
>So, suppose I have an existing database which was installed via
>cdrom and has this:
>
>ORACLE_HOME=/oracle/app/oracle/product/BIKLE817
>
>At this point I could tar-up ORACLE_HOME and copy it to another host.
>
>Then suppose I unpack it here:
>
>ORACLE_HOME=/oracle/app/oracle/product/SMITH817
>
>Now is when my perl command comes into use:
>
>cd /oracle/app/oracle/product/SMITH817
>/bin/find . -type f -print|xargs /bin/grep -l BIKLE817|xargs /bin/perl -e "s/BIKLE817/SMITH817/g" -p -i.bak
>
>The above perl command will find every file which contains the string:
>BIKLE817
>
>It will edit each file and replace BIKLE817 with SMITH817.
>
>All the files which contained BIKLE817 will be renamed with a .bak
>at the end of each file name.
>
>If we are confident we no longer need the .bak files,
>we could delete them with this command:
>
>/bin/find . -name '*.bak' -type f -print|xargs /bin/grep -l BIKLE817|xargs /bin/rm
>
>I have more demos on my site.
>
>---------------------------------------------------------------------
>Daniel B. Bikle/Independent Oracle Consultant
>bikle_at_bikle.com | 650/941-6276 | P.O. BOX AG LOS ALTOS CA 94023
>http://www.bikle.com
>---------------------------------------------------------------------

Some of our customers did something similar, he tared the sw and unpacked at a different site.
Our group felt very unhappy about that and submitted a tar with Oracle Support. I thought their reply would have been 'you need to relink' Guess what? Their reply was 'Oracle doesn't support this' So please stop promoting this method.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Tue Dec 18 2001 - 16:13:32 CST

Original text of this message

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