It is currently 22 Oct 2018 10:31


Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 12 Mar 2012 2:23 
Offline
Nouveau
Nouveau
User avatar

Joined: 31 Oct 2009 12:00
Posts: 56
hello experts,

haunting some information about how can we implemenet PL/SQL scripts in control-M.

1. simple method is two wrap in scripts

or call with DB module.

If anyone has implemented PL/SQL scripts from Control-M,

please share/suggest Ideas

Thanks


Top
   
 Post subject: PL/SQL
PostPosted: 30 Jul 2012 10:57 
Offline
Nouveau
Nouveau
User avatar

Joined: 30 Jul 2012 12:00
Posts: 4
Hello.

I know two ways to execute PL/SQL scripts from Control-M:

1. If you are using a Unix-type operating system on your database system, you can create a shell script to launch a sqlplus session and then use the execute comand to run your PL/SQL. Example:

Code:
sqlplus /nolog
connect [$user_name]/[$user_pass]@[SID]
SET TIMING ON
ALTER PROCEDURE SCHEMA.MY_PROCEDURE COMPILE;
execute SCHEMA.MY_PROCEDURE();
Disconnect


This method has a disadvantage: it will only execute the shell job and the agent response is going to be an operating system-centric one, this means the agent is not going to interpret the databases error responses when they happen. The advantage is that you can run old database procedures in Oracle 8i, for example. I'm not sure, but there should be a similar way using .bat files on Windows platforms to run PL/SQLs

2. The other way is to use the database module to run PL/SQL. This is the recommended method since Control-M's agent is going to interpret Oracle error codes. We run database processes on a daily basis using this method. Control-M only supports Oracle 9i or newer.

The seconnd method also works for Oracle functions. If you have out/return parameters, Control-M will detect them and you can capture them on a variable and do some other processing depending on output.

Hope this helps.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: haelethix and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved