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: Multiple DBs per Server and OEM

RE: Multiple DBs per Server and OEM

From: Herring Dave - dherri <Dave.Herring_at_acxiom.com>
Date: Tue, 12 Apr 2005 16:58:26 -0500
Message-ID: <7ED53A68952D3B4C9540B4EFA5C76E36458666@CWYMSX04.Corp.Acxiom.net>


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_at_acxiom.com>

> -----Original Message-----
> From: Howard Latham [mailto:howard.latham_at_rsmb.co.uk]
> Sent: Tuesday, April 12, 2005 9:37 AM
> To: thomas.mercadante_at_labor.state.ny.us; Herring Dave - dherri; oracle-
> l_at_freelists.org
> 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_at_rsmb.co.uk
>
> 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.
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 12 2005 - 18:32:27 CDT

Original text of this message

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