How to call a DB2 SP from Solaris machine.


 
Thread Tools Search this Thread
Operating Systems Linux How to call a DB2 SP from Solaris machine.
# 1  
Old 03-24-2010
How to call a DB2 SP from Solaris machine.

Hi,
Can some one give me the syntax, how to call a DB2 SP from a Solaris machine.

Thanks and Regards,
Preetham R.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Call Anonymous block from DB2

Hi, I have a shell script and im trying to call a .sql file. The sql file has a simple Anonymous block. The code is shell script db2 -tvf query.sql the sql file contains SET SERVEROUTPUT ON; BEGIN call dbms_output.put_line( 'Hello' ); END; I get the following error BEGIN... (1 Reply)
Discussion started by: sup
1 Replies

2. Solaris

Solaris backup machine

Hi, I have a server with Solaris 11 with a zpool raid to serve as a NAS. Every day in the morning I do an incremental snapshot of the zpool and send it to another local disk as a backup. I would now like to build another small server to hold backups in a different place to prevent data loss... (0 Replies)
Discussion started by: RychnD
0 Replies

3. Solaris

Solaris ssh client hangs when connecting to another Solaris machine

Got a strange problem. I have 4 Solaris servers all configured the same, Solaris 10 x86 update 10. When I try to ssh from one Solaris 10 server to another server ssh hangs. I have an identical server and when I try this everything works fine. The weird thing is if I am root on the server... (1 Reply)
Discussion started by: ccj4467
1 Replies

4. Shell Programming and Scripting

System call using awk on Solaris

I'm brand new to awk and need your help. I want to be able to shut down my workstations when they become to hot (because we've lost our cooling). I found a really neat way to monitor the temperature of the system and a short, simple awk scipt to use with it: /usr/sbin/prtpicl -v -c... (2 Replies)
Discussion started by: natural
2 Replies

5. Shell Programming and Scripting

How to call shell script from db2 triggger

Is there a way to call a shell script via db2 trigger? I want to wake up a shell script to perform some action if there is a insert action on a db2 table. (1 Reply)
Discussion started by: prasperl
1 Replies

6. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

7. Shell Programming and Scripting

Unix Korn Shell script on Solaris to DB2 UDB LUW database

I am rather new to korn shell scripting and attempting to write a Unix script that would detach, attach a range partition table in DB2 UDB LUW database. This would be a job scheduled in control M that reads in an input file with 5 parameters passed to it from the application. I don't have much... (1 Reply)
Discussion started by: tjhanso
1 Replies

8. IP Networking

RSH to Ubuntu machine from Solaris machine?

This is probably really basic compared to what you guys are usually talking about here, but I have a problem and I have no idea what to do about it. I try to RSH to my Ubuntu computer from my Solaris one and run into a dead end: >> rsh 192.168.1.103 ::ffff:192.168.1.103: Connection timed out... (4 Replies)
Discussion started by: Bradj47
4 Replies

9. Solaris

Best possible communication mechanism between a Solaris machine and a windows machine

hi, I have some windows client machines which require a signal to be sent by a Solaris machine( SunOS 5.6) when ever a particular event occurs on that Solaris machine. What are possible communication mechanisms by which i can do this. the constraints are > the windows machines have to... (7 Replies)
Discussion started by: Krsh
7 Replies

10. UNIX for Dummies Questions & Answers

Exception while loading DB2 driver Class.forName("com.ibm.db2.jcc.DB2Driver")

Hi... I m working on UNIX z/OS. Actually i have to pass the parameters from the JCL to java-db2 program thru PARM. I am able to pass the arguments but the problem occured is, it is throwing an exception while loading the db2 driver as 'Javaclassnotfound:com.ibm.db2.jcc.DB2Driver'... (0 Replies)
Discussion started by: Sujatha Gowda
0 Replies
Login or Register to Ask a Question
DB2_GET_OPTION(3)							 1							 DB2_GET_OPTION(3)

db2_get_option - Retrieves an option value for a statement resource or a connection resource

SYNOPSIS
string db2_get_option (resource $resource, string $option) DESCRIPTION
Retrieves the value of a specified option value for a statement resource or a connection resource. PARAMETERS
o $resource - A valid statement resource as returned from db2_prepare(3) or a valid connection resource as returned from db2_connect(3) or db2_pconnect(3). o $option - A valid statement or connection options. The following new options are available as of ibm_db2 version 1.6.0. They provide use- ful tracking information that can be set during execution with db2_get_option(3). Note Prior versions of ibm_db2 do not support these new options. When the value in each option is being set, some servers might not handle the entire length provided and might truncate the value. To ensure that the data specified in each option is converted correctly when transmitted to a host system, use only the characters A through Z, 0 through 9, and the underscore (_) or period (.). o $userid - SQL_ATTR_INFO_USERID - A pointer to a null-terminated character string used to identify the client user ID sent to the host database server when using DB2 Connect. Note DB2 for z/OS and OS/390 servers support up to a length of 16 characters. This user-id is not to be confused with the authentication user-id, it is for identification purposes only and is not used for any authorization. o $acctstr - SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated character string used to identify the client accounting string sent to the host database server when using DB2 Connect. Note DB2 for z/OS and OS/390 servers support up to a length of 200 characters. o $applname - SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated character string used to identify the client application name sent to the host database server when using DB2 Connect. Note DB2 for z/OS and OS/390 servers support up to a length of 32 characters. o $wrkstnname - SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated character string used to identify the client workstation name sent to the host database server when using DB2 Connect. Note DB2 for z/OS and OS/390 servers support up to a length of 18 characters. The following table specifies which options are compatible with the available resource types: Resource-Parameter Matrix +-----------+--------------------------+---+---+---+ | Key | | | | | | | | | | | | | Value | | | | | | | | | | | | Resource Type | | | | | | | | | | +-----------+--------------------------+---+---+---+ |Connection | | | | | | | | | | | | | Statement | | | | | | | | | | | | Result Set | | | | | | | | | | | userid | | | | | | | | | | | | | | | | | | | SQL_ATTR_INFO_USERID | | | | | | | | | | | | X | | | | | | | | | | | | X | | | | | | | | | | | | - | | | | | | | | | | | acctstr | | | | | | | | | | | | | | | | | | | SQL_ATTR_INFO_ACCTSTR | | | | | | | | | | | | X | | | | | | | | | | | | X | | | | | | | | | | | | - | | | | | | | | | | | applname | | | | | | | | | | | | | | | | | | | SQL_ATTR_INFO_APPLNAME | | | | | | | | | | | | X | | | | | | | | | | | | X | | | | | | | | | | | | - | | | | | | | | | | |wrkstnname | | | | | | | | | | | | | | | | | | | SQL_ATTR_INFO_WRKSTNNAME | | | | | | | | | | | | X | | | | | | | | | | | | X | | | | | | | | | | | | - | | | | | | | | | | +-----------+--------------------------+---+---+---+ RETURN VALUES
Returns the current setting of the connection attribute provided on success or FALSE on failure. EXAMPLES
Example #1 Setting and retrieving parameters through a connection resource <?php /* Database Connection Parameters */ $database = 'SAMPLE'; $user = 'db2inst1'; $password = 'ibmdb2'; /* Obtain Connection Resource */ $conn = db2_connect($database, $user, $password); echo "Client attributes passed through connection string: "; /* Create the associative options array with valid key-value pairs */ /* Assign the attributes through connection string */ /* Access the options specified */ $options1 = array('userid' => 'db2inst1'); $conn1 = db2_connect($database, $user, $password, $options1); $val = db2_get_option($conn1, 'userid'); echo $val . " "; $options2 = array('acctstr' => 'account'); $conn2 = db2_connect($database, $user, $password, $options2); $val = db2_get_option($conn2, 'acctstr'); echo $val . " "; $options3 = array('applname' => 'myapp'); $conn3 = db2_connect($database, $user, $password, $options3); $val = db2_get_option($conn3, 'applname'); echo $val . " "; $options4 = array('wrkstnname' => 'workstation'); $conn4 = db2_connect($database, $user, $password, $options4); $val = db2_get_option($conn4, 'wrkstnname'); echo $val . " "; echo "Client attributes passed post-connection: "; /* Create the associative options array with valid key-value pairs */ /* Assign the attributes after a connection is made */ /* Access the options specified */ $options5 = array('userid' => 'db2inst1'); $conn5 = db2_connect($database, $user, $password); $rc = db2_set_option($conn5, $options5, 1); $val = db2_get_option($conn5, 'userid'); echo $val . " "; $options6 = array('acctstr' => 'account'); $conn6 = db2_connect($database, $user, $password); $rc = db2_set_option($conn6, $options6, 1); $val = db2_get_option($conn6, 'acctstr'); echo $val . " "; $options7 = array('applname' => 'myapp'); $conn7 = db2_connect($database, $user, $password); $rc = db2_set_option($conn7, $options7, 1); $val = db2_get_option($conn7, 'applname'); echo $val . " "; $options8 = array('wrkstnname' => 'workstation'); $conn8 = db2_connect($database, $user, $password); $rc = db2_set_option($conn8, $options8, 1); $val = db2_get_option($conn8, 'wrkstnname'); echo $val . " "; ?> The above example will output: Client attributes passed through connection string: db2inst1 account myapp workstation Client attributes passed post-connection: db2inst1 account myapp workstation SEE ALSO
db2_connect(3), db2_cursor_type(3), db2_exec(3), db2_set_option(3), db2_pconnect(3), db2_prepare(3). PHP Documentation Group DB2_GET_OPTION(3)