Quote:
|
Originally Posted by yadu
Hi,
I want to know how to run sql files in command prompt for db2 on Solaris, something similar to @abc.sql in Oracle.
I'm new to Db2, please bear with me if this is a silly question.
Thanks
|
Unfortunately, you can't run a script from within the db2 clp like you can in oracle (i.e @<script>). The only way to run a script is by calling the db2 clp from the OS prompt. For example, I use;
db2 -tvf <scriptname> -z <outputfile>
-t denotes the semicolon as the statement terminator (what you'll be used to in Oracle). -v is verbose, and -f is for filename. -z sends the output to a specified file (instead of "spooling" you can do this).
Kedison