473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

sql procedure/ DB2 Procedure...in UNIX Script

Hi All,
can anybody let me know the steps how to call the stored proceedure that is developed in db2 or sql, into unix shell script.
Point: Stored proc. may or may not have parameters.
Point: Stored proc. may or may not return anything.
Feb 27 '07 #1
6 6943
Motoma
3,237 Expert 2GB
You would need to use the command line tool for your particular database.
For instance: With MySQL, there is a tool called mysql, which you can call on the command line to execute queries.
Feb 27 '07 #2
You would need to use the command line tool for your particular database.
For instance: With MySQL, there is a tool called mysql, which you can call on the command line to execute queries.
---------------------------------------------------------------------------------------------
First of all thanks for the reply...
Ya I want to use command line tool...that'll call some stored proc. with some parameters, and the call should be made from script.
Do you have any idea of that...plz let me know.

Let me know what are the other ways to call stored procs. of sql/db2 through unix shell scripts.

Thanks.
Feb 28 '07 #3
Motoma
3,237 Expert 2GB
---------------------------------------------------------------------------------------------
First of all thanks for the reply...
Ya I want to use command line tool...that'll call some stored proc. with some parameters, and the call should be made from script.
Do you have any idea of that...plz let me know.

Let me know what are the other ways to call stored procs. of sql/db2 through unix shell scripts.

Thanks.
Not being a DB2 guy, this link was all I can find. However, we do happen to have a DB2 forum, and if you were to post further questions there, the experts there may be more helpful.
Feb 28 '07 #4
Not being a DB2 guy, this link was all I can find. However, we do happen to have a DB2 forum, and if you were to post further questions there, the experts there may be more helpful.
-----------------------------
thanks for clement piece of advice..

could you please tell to call sql procedure through unix.....whatever ways are !
Any no. of ways....I would accepts !
Thanks for sharing knowledge. !!

I am looking for the link that you have provided. (thanks for that.)
Mar 1 '07 #5
Motoma
3,237 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. db2 "call sp_myProc (4, 12)"
  2.  
Mar 1 '07 #6
Expand|Select|Wrap|Line Numbers
  1. db2 "call sp_myProc (4, 12)"
  2.  
---------------------------------------------------------------------

Is this only to be done ? Unix will deduct db2 through this or should we do some modifications with PATH ?
What happens when stored proc. returns a set of records ? Where those will go ?
If I want to display those filtered records in Unix then what is to be done ?

That means how the communication is to be maintained between Unix and database (SQL etc.) ?

Hope I'll get some info. on this from our side.
Thanks in advance !!

Bye
Mar 3 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
5
by: vishal | last post by:
Hi, I am writing my first script to execute a Oracle procedure through a unix script. Could you tell me how do I do error handling here? How do I know in my script if the procedure executed...
1
by: DB_2 | last post by:
Hello, I created the following stored procedure. (Please ignore the logic in it; at this point it is not complete and I am trying to get the basic structure working first.) CREATE PROCEDURE...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
1
by: KrippZ | last post by:
Hi! Im writing a asp.net webapp and I need some help with scheduling of a stored procedure. I'd like to know if it's possible to have a stored produdere (that I have written) to be schedualed...
4
by: istruttorenuoto | last post by:
hi to everbody i need to write a unix script to do a sqlplus connection (using user id and password) to an oracle database and call a stored procedure. how could i do it? thanks to all
0
by: istruttorenuoto | last post by:
hi! I have some problems to call a stored procedure from an Unix Script. Here's the script stty istrip stty erase ^H export ORACLE_BASE=/product/oracle export...
7
by: programming | last post by:
Hi all, i have been having trouble with a login script that works on my windows machine, however when i upload it to the Unix server through VPN, the same script won't work! It won't parse...
26
by: seemagoyal | last post by:
Hi, I don't have any experiance of UNIX and oracle. but i have got a short assignment for writing a unix script that will call a stored procedure. this script has to run this procedure after...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.