When I try "DB2 FORCE APPLICATION" I get the error:
DB21061E Command line environment not initialized.
Any suggestions would be appreciated. Thanks
--
Michael Appelmans
Agility, Inc.
*SpamBam - remove 123 to mail*
mappe...@123agility-inc.com
In article <356db...@news1.ibm.net>,
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
From this point if you wish to execute a "script" or :
use a batch file (*.bat) include your commands prefixed with DB2 and separated
by a semicolon.
or
setup a SQL script (e.g. Temp.SQL) same as the batch file but without the DB2
at the start of each SQL
command. The type DB2 -vtf Temp.SQL
Hope this helps
DB2CMD DB2 batchfile.cmd doesn't work.
I tried it with just one command in the file such as:
LIST DATABASE DIRECTORY
or
FORCE APPLICATIONS ALL
and I get:
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1024N A database connection does not exist. SQLSTATE=08003
Thanks again.
--
Michael Appelmans
Agility, Inc.
*SpamBam - remove 123 to mail*
mappe...@123agility-inc.com
ray....@cmsx.com wrote in message <6km8jo$n9m$1...@nnrp1.dejanews.com>...
>Try running db2cmd db2 batchfile.cmd
>
>In article <356db...@news1.ibm.net>,
> "Michael Appelmans" <map...@ibm.net> wrote:
>>
>> How do I run a db2 clp cmd such as FORCE APPLICATION in a batch (.cmd)
file
>> on NT.
>>
>> When I try "DB2 FORCE APPLICATION" I get the error:
>> DB21061E Command line environment not initialized.
>>
>> Any suggestions would be appreciated. Thanks
>> --
>> Michael Appelmans
>>
>> Agility, Inc.
>> *SpamBam - remove 123 to mail*
>> mappe...@123agility-inc.com
>>
>>
>
>
Thanks for your reply.
--
Michael Appelmans
Agility, Inc.
*SpamBam - remove 123 to mail*
mappe...@123agility-inc.com
Ray Houle wrote in message <356EA810...@sympatico.ca>...
>You must or :
>initialize your DOS session for DB2 by issuing the DB2CMD command, this
will
>bring a DOS command window from which you may issue DB2,
>or
>Using the mouse Start/Programs/DB2 For WindowsNT/Command Window or Command
Line
>Processor.
>
>From this point if you wish to execute a "script" or :
>use a batch file (*.bat) include your commands prefixed with DB2 and
separated
>by a semicolon.
>or
>setup a SQL script (e.g. Temp.SQL) same as the batch file but without the
DB2
>at the start of each SQL
>command. The type DB2 -vtf Temp.SQL
>
>Hope this helps
>
However the DB2CMD window remains open. Since I have to run this in
unattended mode (repeatedly) I need a way to close the DB2cmd session from
within batchfile.cmd. Quit and exit do not work. Any suggestions?
>Try running db2cmd db2 batchfile.cmd
>
>In article <356db...@news1.ibm.net>,
> "Michael Appelmans" <map...@ibm.net> wrote:
>>
>> How do I run a db2 clp cmd such as FORCE APPLICATION in a batch (.cmd)
file
>> on NT.
>>
>> When I try "DB2 FORCE APPLICATION" I get the error:
>> DB21061E Command line environment not initialized.
>>
>> Any suggestions would be appreciated. Thanks
>> --
>> Michael Appelmans
>>
>> Agility, Inc.
>> *SpamBam - remove 123 to mail*
>> mappe...@123agility-inc.com
>>
>>
>
>
:>However the DB2CMD window remains open. Since I have to run this in
:>unattended mode (repeatedly) I need a way to close the DB2cmd session from
:>within batchfile.cmd. Quit and exit do not work. Any suggestions?
Try DB2CMD /C ...... rest of command line.
The "/C" will instruct NT to close the secondary window when
the command completes.
--
Michael Appelmans
Agility, Inc.
*SpamBam - remove 123 to mail*
mappe...@123agility-inc.com
Nolly Unvala wrote in message ...