Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Multiple DBs per Server and OEM

RE: Multiple DBs per Server and OEM

From: Mercadante, Thomas F <>
Date: Tue, 12 Apr 2005 09:59:13 -0400
Message-ID: <C9995D8C5E0DDA4A8FF9D68EE666CE0704AC0454@exchsen0a1ma>

OEM does not automatically pass any parameters to ksh jobs. It simply runs what you tell it to run. It doesn't matter if the job was assigned to two different databases - OEM simply runs the job and expects you to know what you are doing.

You can pass parameters to jobs that you run. So if your ksh job accepts a parameter (say the name of another ksh script that sets up a bunch of environmentals for a specific database - like oracle sid, a job log, temp log and scripts directory, oracle home directory etc.), then the ksh job you run can be generic.

I do this all the time. We create a "bin" directory and make sure it is in the unix path. In this directory, we create one ksh file for each database on the machine. By executing this file, all of the above are established. It makes ksh scripting much easier.


-----Original Message-----
From: [] Sent: Tuesday, April 12, 2005 9:47 AM
Subject: RE: Multiple DBs per Server and OEM

As a stab in the dark, have you tried echoing "$@" in the ksh script to = see it OEM is passing any parameters?



-----Original Message-----
[]On Behalf Of Herring Dave - dherri Sent: 12 April 2005 14:29
To: Oracle-L_at_Freelists. Org (E-mail)
Subject: Multiple DBs per Server and OEM

Does anyone use OEM to run jobs against a server that contains multiple = DBs?
I have a server that has 2 databases on it and a need to run a job via = OEM
against both databases. The job is a mixture of O/S commands and SQL, = so I
created a ksh script to perform the work, then created a job within OEM = as a
database job, assigned both databases to it, under "Tasks" I chose "Run = OS
Command" and under "Parameters" I listed out the ksh script in the = command
section. My thought was that the job in OEM would run twice, with $ORACLE_SID set differently based on the database assigned.

The problem is that at the OS level, $ORACLE_SID stays the same. It = appears
the only way to work with different databases automatically is the use = "Run
SQL Command" or "Run DBA Command". Is this true? Is there some way for = a
ksh script, called via an OEM Job, to know what database its being asked = to
run against, such as some parameter from OEM?


Any help would be appreciated.



Dave Herring, DBA

Acxiom Corporation

3333 Finley

Downers Grove, IL 60515

wk: 630.944.4762

< <>>


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,=20 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.
Received on Tue Apr 12 2005 - 10:03:12 CDT

Original text of this message