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: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Tue, 12 Apr 2005 10:34:00 -0400
Message-ID: <C9995D8C5E0DDA4A8FF9D68EE666CE0704AC0457@exchsen0a1ma>


Dave,

The only thing you are missing is - cron. OEM is just not robust enough. As you point out, to do something as simple as you want requires tons of OEM jobs.

With cron, you can create one generic job, pass in params as I suggested, and have everything that you need. Plus, (and your management will like this) cron is free. OEM job submission is not free and certainly not cheap.

Tom

-----Original Message-----
From: Herring Dave - dherri [mailto:Dave.Herring_at_acxiom.com] Sent: Tuesday, April 12, 2005 10:17 AM
To: thomas.mercadante_at_labor.state.ny.us; 'Peter.Hitchman_at_thomson.com'; oracle-l_at_freelists.org
Subject: RE: Multiple DBs per Server and OEM

I tried "$@" and no values are listed, so OEM isn't passing a parameter, as Tom mentioned on his followup.

My hope was to limit the copies of scripts. I'm using OEM in an environment where I have 8 linux/unix servers hosting 14 databases. I have a few maintenance ksh scripts where I'd like them to run against each database. Within OEM I was hoping to create just one job, then assign each database to the job so that in the active menu I'd have 14 jobs, based off one job in the library. But, it appears my only option is to have 14 jobs in the library, one per database passing as an argument the oracle sid. Argg!

This is going to get ugly, as I actually have a number of maintenance scripts, maybe 5 or 6. That means I'll end up with 70+ separate jobs in the job library. Our passwords at the OS level are set to expire every 45 days, so every 45 days I have to remove all jobs from the active list, reset preferred credentials on all 8 servers, then resubmit the jobs. The remove can be done via a group select, but resubmitting, as far as I can tell, has to be done one-by-one, meaning 70+ submits. Ick!

This seems rather cumbersome. Am I missing something?

Dave



Dave Herring, DBA
Acxiom Corporation
3333 Finley
Downers Grove, IL 60515
wk: 630.944.4762
<mailto:dherri_at_acxiom.com>

> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
> On Behalf Of Mercadante, Thomas F
> Sent: Tuesday, April 12, 2005 8:59 AM
> To: 'Peter.Hitchman_at_thomson.com'; oracle-l_at_freelists.org
> Subject: RE: Multiple DBs per Server and OEM
>
> 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.
>
> Tom
>
>
> -----Original Message-----
> From: Peter.Hitchman_at_thomson.com [mailto:Peter.Hitchman_at_thomson.com]
> Sent: Tuesday, April 12, 2005 9:47 AM
> To: oracle-l_at_freelists.org
> Subject: RE: Multiple DBs per Server and OEM
>
> Hi,
> As a stab in the dark, have you tried echoing "$@" in the ksh script to =
> see it OEM is passing any parameters?
>
> Regards
>
> Pete
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]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.
> =20
>
> 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?
>
> =20
>
> Any help would be appreciated.
>
> =20
>
> Dave
>
> -------------------------------------
>
> Dave Herring, DBA
>
> Acxiom Corporation
>
> 3333 Finley
>
> Downers Grove, IL 60515
>
> wk: 630.944.4762
>
> < <mailto:dherri_at_acxiom.com> mailto:dherri_at_acxiom.com>
>
> -------------------------------------
>
> =20
>
>
>
> **********************************************************************
> 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.
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 12 2005 - 10:38:00 CDT

Original text of this message

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