I am trying to run a table-populating db2 script from a Java program. But the program is hanging. This java program is already being used, successfully, to create tables etc. That means, it already has a connection to the database.
The script runs successfully outside the java program. When run outside the Java program, the db2 script "connect to DBNAME" before it loads the table.
Thinking that this "connect to ..." might interfere with script operation from within program, I removed this "connect to ..." statement, but the script still hangs.
java statement that invokes this script is:
Runtime.getRuntime().exec("db2cmd -c -w -i db2 -c -t -v -f script.sql")
I'd appreciate any help.
Thanks