Stored Procedures and SQL Server

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
jhorton
Participant
Posts: 1
Joined: Mon Feb 11, 2008 3:57 pm

Stored Procedures and SQL Server

Post by jhorton »

I am new to the Stored Procedure stage and was hoping someone could point me in the direction of a good resource to creating a stored procedure job. I can get my stored procedure stage to connect to my SQL Server database but I am having troubles getting the arguments set up in the stage (I think). Whatever the case, after it connect it errors, I have tried many things and get many different errors. I don't have a specific problem but I do need a resource that can walk me through the process. I am just trying to call simple stored procs that take one or two inputs and do some manipulation in the database and only return a success or failure message. Thanks for your help.
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

Realizing you are using Parallel Edition and I only have Server Edition, I found the Stored Proc Stage to be difficult to get working correctly as well. What I did to cheat was to add a before or after job command in the appropriate place to fire off the stored proc.

So my command line part looks like: exec sp_whatevername
and the parameters line (if you have parameters) is like:
#TableName# #BatchNumber#

This has worked very well for me so far. Is it the best way? Probably not, but if it ain't broke don't fix it! :P

[/code]
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Read i46decsp.pdf (STP stage) file in the \IBM\InformationServer\Documentation folder.
filename.txt
Participant
Posts: 27
Joined: Thu Mar 20, 2008 11:55 am

Re: Stored Procedures and SQL Server

Post by filename.txt »

[quote="jhorton"] I can get my stored procedure stage to connect to my SQL Server database but I am having troubles getting the arguments set up in the stage (I think).[/quote]

How you got connect to SQL Server using Stored Proc stage ..?
SQL Server is not supported in this stage.
If you look in Stage>General>Database Vendor
There are only three options namely...
1)Oracle
2)DB2
3)Sybase

Please correct me If I am wrong.
Let me know how you connect to SQL Server from Stored Proc stage.
Thanks.

"Creativity is the ability to use your available resources to their fullest."
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

For V8, you will have 5 options, SQL Server is one of them.
Post Reply