Thanks for all your concern... =)
But, with the help of my mentor Mr. Haris...
I know how to get a list of DB directories...
You can use the command:
db2cmd -c -w -i db2 list db directory | findstr /c:"Database alias" > DatabaseList.tx t
this command can export the database alias line to "DatabaseList.t xt" file.
But, maybe the exec() function cannot process the pipelining argument...
User Profile
Collapse
-
Thanks for all replies i got... =)
It's truly a good idea, and i very appreciate that... =)
But, I think in my cases that idea cannot be applied...
Because, i have some databases and anybody (who have access) can create a new database and alter any table (he or she wants) for some purposes.
So, i want to previews all the exist databases without need any extra works (like adding information into...Leave a comment:
-
How to get Databases Name in DB2 using Java (JDBC)?
Hello, all I am a newbie in Java + DB2 (and thescripts.com) =P
I want to ask:
How can I get (list) Databases name / aliases in DB2 using Java?
I am using windows XP
DB2 v8.1.7.445
JDK 1.4.1
thx for the answer... =) -
Hm...
I'd try that...
I can connect to DB2 using JDBC and I've tried that command...
But, the exception return this message:
"[IBM][JDBC Driver] CLI0637E QUERY cannot be found."
maybe you can give me further explanation or suggestion (with details)?
My goals is I want to list all DB2 databases that connect trough my JDBC.
i.e: I have DBs: UNIVERSITY1, UNIVERSITY2, UNIVERSITY3...Leave a comment:
-
How to get Databases Name in DB2
Hello, all I am a newbie in DB2 (and thescripts.com) =P
I want to ask:
How can I get (list) Databases name / aliases in DB2 using Java?
I am using windows XP
DB2 v8.1.7.445
JDK 1.4.1
thx for the answer... =)
No activity results to display
Show More
Leave a comment: