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.
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