RE: Multiple DBs per Server and OEM

  • From: Herring Dave - dherri <Dave.Herring@xxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 12 Apr 2005 16:58:26 -0500

For what it's worth, here's the solution I'm implementing:

1)  Changed target type from database to node.
2)  Added the following argument for the OS command: "-L 'sid1 sid2 sid3'".
3)  Modified script to accept "-L" as an argument, then put the string that
follows in IN_SID_LIST.
4)  Added a for-loop wrapper around the main section, looping through the
list of sids.  Each sid in the list is validated against /etc/oratab.

[[ -z "$IN_SID_LIST" ]] && USAGE

for SID in $IN_SID_LIST
do
   if grep -cw "$SID" /etc/oratab 1>/dev/null 2>&1; then
      ORAENV_ASK="NO"
      . oraenv "$SID"
      echo "[$(date +%m/%d/%Y' '%H:%M:%S)] Running $THISFILE for SID: $SID"
      ...


The point of all of this is to pass a valid list of SIDs to the script.  If
any of the "valid" SIDs are found on that server's /etc/oratab, then run the
script with ORACLE_SID=$SID.

Works?  Yes.  Over engineered?  Yes.

Dave
-------------------------------------
Dave Herring, DBA
Acxiom Corporation
3333 Finley
Downers Grove, IL 60515
wk: 630.944.4762
<mailto:dherri@xxxxxxxxxx>
-------------------------------------

> -----Original Message-----
> From: Howard Latham [mailto:howard.latham@xxxxxxxxxx]
> Sent: Tuesday, April 12, 2005 9:37 AM
> To: thomas.mercadante@xxxxxxxxxxxxxxxxx; Herring Dave - dherri; oracle-
> l@xxxxxxxxxxxxx
> Subject: RE: Multiple DBs per Server and OEM
> 
>  I just tried some jobs on NT (Yes sad isn't it - no cron!)
> And the run DBA Script appears to connect via the SQLNET
> Route so you could get the SID by select name from v$database
> And pass that to Unix.
> 
> Howard A. Latham
> 
> Tech Services Director UK Oracle User Group.
> 
> SENIOR DATABASE ADMINISTRATOR
> RSMB Television Research Ltd,
> The Communications Building,
> 48 Leicester Square,
> London. WC2H 7LT
> 
> 
> Tel: +44 (0)20 7808 3619
> SW:  +44 (0)20 7808 3600
> Fax: +44 (0)20 7839 7446
> 
> mailto:Howard.latham@xxxxxxxxxx
> 
> http://www.rsmb.co.uk
> 


**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.

--
//www.freelists.org/webpage/oracle-l

Other related posts: