Hello,
I am new to DB2.
I am using DB2 9.1 on windows
The requirement is I have to create a batch file.
It creates a database and creates the tables in it.
So that the user of this batch file can run this batch file on the server machine where
DB2 is running, and then they should be able to use database name/user name/password
in java to connect to this newly created instance from their client machines.
The 2 scripts for this (create db and create tables) are working fine when
I use 'db2cmd db2 ... ', but when I put this into a batch file I am having problems.
I created the following batch file:
createDatabase.bat
db2cmd db2 -f createDatabase.sql
This starts another shell, and creates the tables, but leaves the shell open when it is done.
Is there any way to get the shell to close by itself ?
I have tried adding QUIT and EXIT but the shell is still open after the command execution.
So how can I close the db2 shell after it is done executing the commands ?