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 Unix scripting experience (I am a DB2 UDB LUW DBA) and looking for some direction and possibly sample scripts to see how this could be accomplished
If you ask questions it is always a good idea to provide some sample data as example for what you have and what you want to achieve. Otherwise it is difficult to suggest.
If i get you correctly you have a file (?) with five parameters stated in it (?) and your script is called, has to open the file and retrieve the parameters from it, yes?
Ok, i don't know your file format, but let's suppose its name is "/path/to/param.file" and it looks like that:
Further i suppose that the five parameters are fixed and you know in advance which parameters to expect (the values could differ, but the parameters names do not). Your script could look like this:
Hi all,
I have a requirement to connect DB2 database and do some operations and generate a report through shell script.
Can anyone please tell me how can i connect DB2 from unix shell script?
Thanks in ADV. (2 Replies)
Hi
I am trying to connect to db2 database from Unix shell script (k shell)
I need to catch the status of connect whether it is succesful or not.
----------------------------------------------------------
# Read login credentials for db2
tput clear
echo "Please enter your Userid:\c"... (3 Replies)
I need to pass a variable as a parameter from shell script into a DB2 database.
var=bhuk_1123_Q_11/22/09
select * from tbl1 where serial_id='$var';
I have tried executing it using
db2 -tvf scriptname
Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Hi ,
We are migrating our database from DB2 z/os to DB2 UDB on UNIX.
and cobol on mainframes to AIX cobol on UNIX.
We have some cobol Db2 programs that are accessing different Databases
how do we code such type of programs in AIX cobol.
Do we need to Establish connection for accessing... (0 Replies)
Am trying to export the content of Stored Procedure to a file using GET ROUTINE command. After executing the command first few lines of the file contains ASCII characters though i have original text following that.
Any help is appreciated. (0 Replies)
Hi All,
Am porting my application from AIX to Windows. As a part of this I need to port the Database in IBM DB2 UDB to SQL Server 2005. Is there any Guide/Doc/Article available on this? How to convert the stored procedures and physical data from DB2 to SQL Server 2005?
Thanks in Advance (0 Replies)
I am trying to develop a script that can connect to a DB2 database mainframe and Query the database and display the results. I've been researching, but I have yet to find a definitive solution where I can enter in the Mainframe DB2 address db2:// and query the database and return the results. If... (2 Replies)
I am trying to connect to database db2 through shell script.
The process I am trying is
> db2
It gives me error Access Denied.
While checking for access I have the rights.
Is there ant other way round..?
Please help. (3 Replies)
Hi,
Can anyone please give me a script or let me know how to connect to a sybase database and execute a query using Korn shell scripts.Am new to Unix but i need to do this ASAP.
Please help.
Thanks,
Gops (7 Replies)