Hi all,
i want so run a sql-script with user and password parameter.
My sql-script looks like:
--
connect to TEST user TestUser using TestPw
list applications for database TEST show detail
terminate
exit
--
How could I use the script with variable user and password? This
parameter should be in a seperate file.
Thanks...
Stefan
situ - 27 Jun 2006 11:46 GMT
@echo off
SET DB_NAME=MYDB
SET USER_NAME=USER
SET PASSWORD=USER_PASSWORD
db2 CONNECT TO %DB_NAME% user %USER_NAME% USING %PASSWORD%
db2 list applications for database %DB_NAME% show detail
db2 terminate
it may help u a bit
Stefan - 27 Jun 2006 12:11 GMT
does it work as well when I switch the user befor?
"su - dbuser"
situ schrieb:
> @echo off
> SET DB_NAME=MYDB
[quoted text clipped - 6 lines]
>
> it may help u a bit
situ - 27 Jun 2006 12:25 GMT
did u mean if u alreday have one previous connection??
yes it works i think
Ian - 27 Jun 2006 13:48 GMT
> Hi all,
>
[quoted text clipped - 7 lines]
> exit
> --
What does this have to do with perl (i.e. your subject, "db2 & perl")?