[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-admin
Subject:    [HPADM] Summary:  Cloning Oracle SID software ($ORACLE_HOME) with BCVs
From:       "Abramson, Stuart" <SAbramson () Wabtec ! com>
Date:       2003-11-26 15:21:25
[Download RAW message or body]

Thanks to:
 
    Denny Koovakattu
    Dan Copeland
        IlicR@stentor.ca <mailto:IlicR@stentor.ca> 
        Lynn Sattler
 
We're cloning Oracle BCVs to another server, and changing the:
    hostname
    SID Name
    Mount Point names
    Listener Ports
 
The "clone rules" are:
 

        1.      Edit Files to point to proper locations/values:
                        initSID.ora
                        tnsnames.ora
                        listener.ora
        2.      Replace symbolic links under ORACLE_HOME with new path.

        3.      Need to relink binaries to (if path has changed.).  (See
above.)
        4.      mv $ORACLE_HOME/admin/SID to the new SID name.

        5.      Edit Apache files (above) if we use the Oracle bundled
Apache.
        6.      Reset the Oracle passwds with "orapwd" utility, if
                initSID.ora:"remote_login_passwordfile" = "exclusive",
                which ours is.
        7.      If you use "Oracle Intelliget Agent", then edit:
                        snmp_ro.ora
                        snmp_rw.ora
                        services.ora
        8.      If you use "Oracle Enterprise Manager", then edit:
                        OEMclient.properties.
 

The followin code will do that:
 

#       1.      Rename files in Oracle Software directory from $OLD_SID
#               to $NEW_SID.
find $NEW_MP_SW -name "*${OLD_SID}*" | while read FILE
do
        NEWFILE=$( echo $FILE | sed "s/${OLD_SID}/${NEW_SID}/g" )
        mv $FILE $NEWFILE
        chown oracle:dba $NEWFILE
done
#       Do it TWICE!
find $NEW_MP_SW -name "*${OLD_SID}*" | while read FILE
do
        NEWFILE=$( echo $FILE | sed "s/${OLD_SID}/${NEW_SID}/g" )
        mv $FILE $NEWFILE
done
#       2.      Edit key files:
#               The key files are:
KEY_FILES="     $ORA_HOME/dbs/init${NEW_SID}.ora
                $ORA_HOME/network/admin/listener.ora
                $ORA_HOME/network/admin/tnsnames.ora    "
#               The key "values" to replace are:
for FILE in $KEY_FILES
do
        #       Host, Oracle SID name, Port
        sed "s/$OLD_HOST/$NEW_HOST/g" $FILE \
                | sed "s/$OLD_SID/$NEW_SID/g" \
                | sed "s/$OLD_PORT/$NEW_PORT/g" > $FILE.new1
        #       Mount Points:
        set -A OLD_DIRS $OLD_MPS
        set -A NEW_DIRS $NEW_MPS
        CNT=${#OLD_DIRS[@]}
        #
        (( I=0 ))
        while (( I < CNT ))
        do
                sed "s?${OLD_DIRS[$I]}?${NEW_DIRS[$I]}?g" $FILE.new1
> $FILE.new2
                mv $FILE.new2 $FILE.new1
                (( I=I+1 ))
        done
        mv $FILE.new1 $FILE
        chown oracle:dba $FILE
done
#       3.      Relink symbolic-linked files
find $NEW_MP_SW -type l | while read LINK
do
        FILE=$( ll $LINK | awk -F">" '{print $2}' )
        NEW_FILE=$( echo $FILE | sed "s?$OLD_MP_SW?$NEW_MP_SW?" )
        echo $FILE | grep -q $OLD_MP_SW
        if (( $? == 0 ))
        then
                #       This is a soft link to the Old Mount Point Name
                rm $LINK
                ln -s $NEW_FILE $LINK
                ll $LINK
        fi
done


 
 

       

  _____  

From: Abramson, Stuart 
Sent: Friday, November 21, 2003 5:10 PM
To: 'Denny Koovakattu'
Subject: RE: [HPADM] Cloning Oracle SID software ($ORACLE_HOME) with BCVs


Denny:
 
Here are some files that I'm looking at either because they reference
"hostname", "SID name" or contain the host or SID in their names.:
 
(Asterisk indicate files you mentioned below.)
 
        /u1001/app/oracle/product/9.2.0/Apache/Apache/conf/httpd.conf
 
/u1001/app/oracle/product/9.2.0/Apache/Apache/conf/httpd.conf.default
        /u1001/app/oracle/product/9.2.0/Apache/Apache/setupinfo.txt
        /u1001/app/oracle/product/9.2.0/admin/HOTB*
        /u1001/app/oracle/product/9.2.0/dbs/initHOTB.ora*
        /u1001/app/oracle/product/9.2.0/dbs/lkHOTB
        /u1001/app/oracle/product/9.2.0/dbs/orapwHOTB
        /u1001/app/oracle/product/9.2.0/network/admin/listener.ora*
        /u1001/app/oracle/product/9.2.0/network/admin/snmp_ro.ora
        /u1001/app/oracle/product/9.2.0/network/admin/snmp_rw.ora
        /u1001/app/oracle/product/9.2.0/network/admin/tnsnames.ora*
        /u1001/app/oracle/product/9.2.0/network/agent/services.ora
        /u1001/app/oracle/product/9.2.0/sysman/config/OEMClient.properties
 
What do you think?
 
    Stuart


  _____  

From: Denny Koovakattu [mailto:groups@koovakattu.com] 
Sent: Friday, November 21, 2003 4:52 PM
To: Abramson, Stuart
Subject: Re: [HPADM] Cloning Oracle SID software ($ORACLE_HOME) with BCVs



I am not aware of any Oracle utilities to do this. I am assuming you have
the cloning part covered, i.e., recovering the DB. If the path to
$ORACLE_HOME is changing I would suggest relinking the Oracle binaries (even
though it might work without relinking.) In the past some utilities have
failed due to embedded paths to shared libraries. I make it a point to set
LDOPTS=+s while linking Oracle. Else chatr them later. What we have done in
the past is to keep a template of the initSID.ora, listener.ora and the
tnsnames.ora and overwrite the copy of the PROD files with that. 

- You might already have it covered, but check if the REPORT server is using
a password file.
-  Rename the directory SID under $ORACLE_BASE/admin or create a new
directory structure (Assuming you are using OFA)

Regards,
Denny

Abramson, Stuart wrote:


Hpux-admins: 


We used to "clone" our Production Oracle Instance to a BCV Reporting
Instance by only "BCV-ing" the data files. 

We set up the oracle software on the BCV server for a SID called REPORT, and
we left it there.  Over time, REPORT didn't get patched, etc, and wasn't an
exact copy of PROD.

We now want to BCV the Oracle software, in $ORACLE_HOME as well as the data.


So, I'm looking at changing SID names, port numbers, hostnames, file system
names in the Oracle software directories from PROD to REPORT, every time I
split the Oracle software:

	          $ORACLE_HOME/dbs/initSID.ora 

	          $ORACLE_HOME/network/admin/listener.ora 
          $ORACLE_HOME/network/admin/tnsnames.ora 

Is there an Oracle utility that does this for you?: 

          OracleClone OLDSID NEWSID 

Does anyone have a list of the places that you have to change? 

Hasn't someone done this before? 

        Stuart 

	

Stuart Abramson | Off:  412/825-1434  | Cell:  412/417-1567 |  email:
sabramson@wabtec.com <mailto:sabramson@wabtec.com>  



***** CONFIDENTIALITY NOTE *****
The content contained in this e-mail transmission is legally privileged and
confidential information intended only for the use of the individual or
entity named herein. If the reader of this transmission is not the intended
recipient, you are hereby notified that any dissemination, distribution, or
copying of this transmission is strictly prohibited.




***** CONFIDENTIALITY NOTE *****
The content contained in this e-mail transmission is legally privileged and \
confidential information intended only for the use of the individual or entity named \
herein. If the reader of this transmission is not the intended recipient, you are \
hereby notified that any dissemination, distribution, or copying of this transmission \
is strictly prohibited.


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE></TITLE>

<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=678320715-26112003>Thanks to:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=678320715-26112003></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Tahoma 
color=#000000>Denny Koovakattu</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff size=2><SPAN 
class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Tahoma color=#000000>Dan 
Copeland</FONT></SPAN></FONT></DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Tahoma 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A 
href="mailto:IlicR@stentor.ca">IlicR@stentor.ca</A></FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003></SPAN><SPAN class=678320715-26112003><FONT 
face=Tahoma size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier 
color=#0000ff>Lynn Sattler</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2>We're&nbsp;cloning Oracle BCVs to another server, and changing 
the:</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Courier 
color=#0000ff size=2>hostname</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Courier 
color=#0000ff size=2>SID Name</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Courier 
color=#0000ff size=2>Mount Point names</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003>&nbsp;&nbsp;&nbsp; <FONT face=Courier 
color=#0000ff size=2>Listener Ports</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff size=2>The 
"clone rules" are:</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV><SPAN class=678320715-26112003>
<DIV><BR><FONT face=Courier color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edit Files to point to proper 
locations/values:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 initSID.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 tnsnames.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 listener.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SPAN class=678320715-26112003>Replace 
symbolic </SPAN>links under ORACLE_HOME with new 
path.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Courier color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Need to relink binaries to (if path has 
changed.).&nbsp; (See above.)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv $ORACLE_HOME/admin/SID to the new SID 
name.</FONT></DIV>
<DIV><FONT face=Courier color=#0000ff 
size=2><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edit Apache files (above) if we use the Oracle 
bundled Apache.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
6.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reset the Oracle passwds with "orapwd" utility, 
if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 initSID.ora:"remote_login_passwordfile" = 
"exclusive",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 which ours is.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
7.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you use "Oracle Intelliget Agent", then 
edit:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 snmp_ro.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 snmp_rw.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 services.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
8.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you use "Oracle Enterprise Manager", then 
edit:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 OEMclient.properties.</FONT></DIV>
<DIV><FONT face=Courier color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><BR><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2>The followin code will do that:</FONT></SPAN></DIV>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
  size=2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  Rename files in Oracle Software directory from 
  $OLD_SID<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  to $NEW_SID.<BR>find $NEW_MP_SW -name "*${OLD_SID}*" | while read 
  FILE<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NEWFILE=$( echo $FILE 
  | sed "s/${OLD_SID}/${NEW_SID}/g" 
  )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv $FILE 
  $NEWFILE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chown oracle:dba 
  $NEWFILE<BR>done<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do it TWICE!<BR>find 
  $NEW_MP_SW -name "*${OLD_SID}*" | while read 
  FILE<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NEWFILE=$( echo $FILE 
  | sed "s/${OLD_SID}/${NEW_SID}/g" 
  )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv $FILE 
  $NEWFILE<BR>done<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edit key 
  files:<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  The key files are:<BR>KEY_FILES="&nbsp;&nbsp;&nbsp;&nbsp; 
  $ORA_HOME/dbs/init${NEW_SID}.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  $ORA_HOME/network/admin/listener.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  $ORA_HOME/network/admin/tnsnames.ora&nbsp;&nbsp;&nbsp; 
  "<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  The key "values" to replace are:<BR>for FILE in 
  $KEY_FILES<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Host, Oracle SID name, 
  Port<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sed 
  "s/$OLD_HOST/$NEW_HOST/g" $FILE 
  \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  | sed "s/$OLD_SID/$NEW_SID/g" 
  \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  | sed "s/$OLD_PORT/$NEW_PORT/g" &gt; 
  $FILE.new1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mount 
  Points:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set -A OLD_DIRS 
  $OLD_MPS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set -A NEW_DIRS 
  $NEW_MPS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  CNT=${#OLD_DIRS[@]}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  #<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (( I=0 
  ))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (( I &lt; CNT 
  ))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  sed "s?${OLD_DIRS[$I]}?${NEW_DIRS[$I]}?g" $FILE.new1 
  &gt;$FILE.new2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  mv $FILE.new2 
  $FILE.new1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  (( I=I+1 ))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  done<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mv $FILE.new1 
  $FILE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chown oracle:dba 
  $FILE<BR>done<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Relink symbolic-linked files<BR>find 
  $NEW_MP_SW -type l | while read 
  LINK<BR>do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FILE=$( ll $LINK | 
  awk -F"&gt;" '{print $2}' )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  NEW_FILE=$( echo $FILE | sed "s?$OLD_MP_SW?$NEW_MP_SW?" 
  )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $FILE | grep -q 
  $OLD_MP_SW<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (( $? == 0 
  ))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This is a soft link to the Old Mount 
  Point 
  Name<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  rm 
  $LINK<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  ln -s $NEW_FILE 
  $LINK<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
  ll $LINK<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  fi<BR>done<BR></FONT></SPAN></SPAN></DIV></BLOCKQUOTE>
<DIV><SPAN class=678320715-26112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=678320715-26112003><SPAN class=802110722-21112003><FONT 
face=Courier color=#0000ff size=2>&nbsp;</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN></SPAN><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Abramson, Stuart <BR><B>Sent:</B> Friday, 
November 21, 2003 5:10 PM<BR><B>To:</B> 'Denny Koovakattu'<BR><B>Subject:</B> 
RE: [HPADM] Cloning Oracle SID software ($ORACLE_HOME) with 
BCVs<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2>Denny:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2>Here are some files that I'm looking at either because they 
reference "hostname", "SID name" or contain the host or SID in their 
names.:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2>(Asterisk indicate files you mentioned 
below.)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=802110722-21112003><FONT face=Courier 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px" align=left><SPAN 
class=802110722-21112003><FONT face=Courier color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/u1001/app/oracle/product/9.2.0/Apache/Apache/conf/httpd.conf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/Apache/Apache/conf/httpd.conf.default<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/Apache/Apache/setupinfo.txt<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/admin/HOTB*<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/dbs/initHOTB.ora*<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/dbs/lkHOTB<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/dbs/orapwHOTB<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/network/admin/listener.ora*<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/network/admin/snmp_ro.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/network/admin/snmp_rw.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/network/admin/tnsnames.ora*<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/network/agent/services.ora<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 /u1001/app/oracle/product/9.2.0/sysman/config/OEMClient.properties</FONT></SPAN></DIV>
 <DIV><SPAN class=802110722-21112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=802110722-21112003><FONT face=Courier color=#0000ff size=2>What 
do you think?</FONT></SPAN></DIV>
<DIV><SPAN class=802110722-21112003><FONT face=Courier color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=802110722-21112003><FONT face=Courier color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp; Stuart</DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px" align=left><BR></DIV></FONT></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Denny Koovakattu 
[mailto:groups@koovakattu.com] <BR><B>Sent:</B> Friday, November 21, 2003 4:52 
PM<BR><B>To:</B> Abramson, Stuart<BR><B>Subject:</B> Re: [HPADM] Cloning Oracle 
SID software ($ORACLE_HOME) with BCVs<BR></FONT><BR></DIV>
<DIV></DIV><BR>I am not aware of any Oracle utilities to do this. I am assuming 
you have the cloning part covered, i.e., recovering the DB. If the path to 
$ORACLE_HOME is changing I would suggest relinking the Oracle binaries (even 
though it might work without relinking.) In the past some utilities have failed 
due to embedded paths to shared libraries. I make it a point to set LDOPTS=+s 
while linking Oracle. Else chatr them later. What we have done in the past is to 
keep a template of the initSID.ora, listener.ora and the tnsnames.ora and 
overwrite the copy of the PROD files with that. <BR><BR>- You might already have 
it covered, but check if the REPORT server is using a password file.<BR>-&nbsp; 
Rename the directory SID under $ORACLE_BASE/admin or create a new directory 
structure (Assuming you are using OFA)<BR><BR>Regards,<BR>Denny<BR><BR>Abramson, 
Stuart wrote:<BR>
<BLOCKQUOTE 
cite=midAC198B2815CBB94587ACA150296E638E04BBA6B0@wccexcwab.wcc.wabtec.com 
type="cite">
  <META content="MS Exchange Server version 5.5.2654.45" name=Generator>
  <P><FONT face=Courier color=#0000ff size=2>Hpux-admins:</FONT> </P><BR>
  <P><FONT face=Courier size=2>We used to "clone" our Production Oracle Instance 
  to a BCV Reporting Instance by only "BCV-ing" the data files.</FONT> </P>
  <P><FONT face=Courier size=2>We set up the oracle software on the BCV server 
  for a SID called REPORT, and we left it there.&nbsp; Over time, REPORT didn't 
  get patched, etc, and wasn't a</FONT><FONT face=Courier color=#0000ff size=2>n 
  exact</FONT><FONT face=Courier size=2> copy of PROD.</FONT></P>
  <P><FONT face=Courier size=2>We now want to BCV the Oracle 
  software</FONT><FONT face=Courier color=#0000ff size=2>, in 
  $ORACLE_HOME</FONT><FONT face=Courier size=2> as well as the data.</FONT> </P>
  <P><FONT face=Courier size=2>So, I'm looking at changing SID names, port 
  numbers, hostnames, file system names in the Oracle software directories from 
  PROD to REPORT, every time I split the Oracle software:</FONT></P>
  <UL>
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier 
    size=2>&nbsp; $ORACLE_HOME/dbs/initSID.ora</FONT> </P>
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier 
    size=2>&nbsp; $ORACLE_HOME/network/admin/listener.ora</FONT> 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier 
    size=2>&nbsp; $ORACLE_HOME/network/admin/tnsnames.ora</FONT> </P></UL>
  <P><FONT face=Courier size=2>Is there an Oracle utility that does this for 
  you?:</FONT> </P>
  <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier size=2>&nbsp; 
  OracleClone OLDSID NEWSID</FONT> </P>
  <P><FONT face=Courier size=2>Does anyone have a list of the places that you 
  have to change?</FONT> </P>
  <P><FONT face=Courier size=2>Hasn't someone done this before?</FONT> </P>
  <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier 
  size=2>Stuart</FONT> </P>
  <UL>
    <P><FONT face=Courier size=2></FONT></P></UL>
  <P><B><FONT face=Arial color=#0000ff size=2>Stuart Abramson | Off:&nbsp; 
  412/825-1434&nbsp; | Cell:&nbsp; 412/417-1567 |&nbsp; email:&nbsp; <A 
  class=moz-txt-link-abbreviated 
  href="mailto:sabramson@wabtec.com">sabramson@wabtec.com</A></FONT></B> 
  </P><BR><BR>***** CONFIDENTIALITY NOTE *****<BR>The content contained in this 
  e-mail transmission is legally privileged and confidential information 
  intended only for the use of the individual or entity named herein. If the 
  reader of this transmission is not the intended recipient, you are hereby 
  notified that any dissemination, distribution, or copying of this transmission 
  is strictly prohibited.<BR></BLOCKQUOTE>
<BR>
***** CONFIDENTIALITY NOTE *****<BR>
The content contained in this e-mail transmission is legally privileged and \
confidential information intended only for the use of the individual or entity named \
herein. If the reader of this transmission is not the intended recipient, you are \
hereby notified that any dissemination, distribution, or copying of this transmission \
is strictly prohibited.<BR> </BODY></HTML>


--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl

 Archives:  ftp.dutchworks.nl/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic