473,395 Members | 1,666 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,395 software developers and data experts.

db2 & perl

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

Jun 27 '06 #1
4 1412
@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

Jun 27 '06 #2
does it work as well when I switch the user befor?
"su - dbuser"

situ schrieb:
@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


Jun 27 '06 #3

did u mean if u alreday have one previous connection??
yes it works i think

Jun 27 '06 #4
Ian
Stefan wrote:
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
--


What does this have to do with perl (i.e. your subject, "db2 & perl")?

Jun 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephen Ferg | last post by:
Seen in the Wall Street Journal, Monday, July 21, 2003, page B1. Lee Gomes' "Portals" technology column: "Two Men, Two Ways to Speak Computerese and Two Big Successes". This is a brief,...
29
by: Bart Nessux | last post by:
Just fooling around this weekend. Wrote and timed programs in C, Perl and Python. Each Program counts to 1,000,000 and prints each number to the console as it counts. I was a bit surprised. I'm not...
19
by: John Keeling | last post by:
Dear all, I tried the test program below. My interest is to examine timing differences between insert vs. append & reverse for a list. My results on my XP Python 2.3.4 are as follows:...
4
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # to open a file and write to file # do f=open('xfile.txt','w') # this creates a file "object" and name it f. # the second argument of open can be
2
by: Xah Lee | last post by:
© # -*- coding: utf-8 -*- © # Python © © # in Python, one can define a boxed set © # of data and functions, which are © # traditionally known as "class". © © # in the following, we define a...
1
by: Justin Kozuch | last post by:
Hi All, How do I determine the path to Perl on a Windows 2000 server? My hosting company has installed ActiveState Perl (latest version). I've called them and they said the path to perl is...
6
by: Mark Rae | last post by:
Hi, I'm not sure if this is the right newsgroup, but here goes... I'm trying to integrate the webwho.zip cgi script from the following site: http://www.webwho.co.uk/ into a standard ASP.NET...
30
by: fritz-bayer | last post by:
Hi, why does the php expression $result = 5543039447 & 2147483648; when executed evaluate to 0, whereas the perl expression $same = 5543039447 & 2147483648 ;
0
by: jbenezech | last post by:
Hi all , I have a perl/java app running under Win32. The application consists of a perl service (Win32::Daemon) and of java classes. The perl service calls every xx hours java classes to perform...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.