Routine to Connect the DataBase

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Routine to Connect the DataBase

Post by pklcnu »

Dear Experts

I need to run an update script after the job execution. I tried using Stored Procedure stage but it don't have option for SQL server. Is there any way either to call a Stored Procedure from routine or writing the script in routine and then call the Database through routine ?

If so can you please explain how to call the Database through routine.

Many Thanks
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

Call an update script in an after job routine that only runs on job success.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
pklcnu
Premium Member
Premium Member
Posts: 50
Joined: Wed Aug 06, 2008 4:39 pm

Post by pklcnu »

miwinter wrote:Call an update script in an after job routine that only runs on job success.
Thanks for the reply......my question was what lines of code that i need to include in the routine in order to connect to the Database......like DBName, UserName, Password etc.........how to write this in the routine apart from the update script.

Thanks
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

This has been answered before. Probably you can search for "SQLConnect".
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't need a routine and that would just complicate this. Leverage the command line interface for your DB from a script - for example, using sqlplus for Oracle. So for SQL Server it would be isql I believe, yes?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply