Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to run the DB2 commands without using the db2cmd.exe on WinNT ?

1,939 views
Skip to first unread message

Prakash Gowda

unread,
Jun 5, 2003, 5:24:42 AM6/5/03
to
Hi All,

I need to do the scripting for DB2 UDB database on Win NT.

Currently in Oracle-8.17 we can do the scripting by using the
sqlplus.exe
If we run the following command :-
sqlplus -s
Username/password
Select * from username.table;
From the above commands, we can display the contents of the table.

In similar way In DB2 on WinNT I want to display the contents of table
in one shot. But in Win NT I have to run db2cmd .exe first to run db2
commands.
Then it will create one more command prompt, there we have to give
the db2 commands like:
db2 connect to database
db2 select * from table
Since it is creating one more command prompt, I am facing problems in
my scripting.
So please If anybody knows about, how should we execute the db2
commands without creating the another command prompt.

In summary:
Is there any steps from which we can run the db2 commands without
using the db2cmd.exe. Like in Unix we will use the db2 command
directly.

Thanks in advance.

Regards,
Prakash G.

Thomas Erdenberger

unread,
Jun 5, 2003, 8:30:26 AM6/5/03
to
Hi!

Use
db2cmd /w /i
from the Windows Command Prompt to initialize the command environment in
the current Command Prompt Window. After that you can issue the db2
commands as you wanted. Check the Command Reference, Chapter 1, db2cmd,
for more options and ways to automate your task.

Regards,
Thomas

0 new messages