Hi,
You must first attach to the remote instance.
Here is a similar script from a remote client.

ATTACH TO xxxxxxx USER xxxxxxx USING xxxxxxx;
CONNECT TO xxxxxxx USER xxxxxxx USING xxxxxxx;
FORCE APPLICATION ALL;
DB2STOP;
DB2START;

I'm on V7.2 on W-2K and this works for me. Output from script center follows :

ATTACH TO xxxxxxx USER xxxxx USING           Instance Attachment Information   
Instance server        = DB2/NT 7.2.0  Authorization ID       = xxxxxxx  Local 
instance alias   = xxxxxxx   CONNECT TO xxxxxxx USER xxxxxxx USING           Database 
Connection Information   Database server        = DB2/NT 7.2.0  SQL authorization ID   
= xxxxxxx  Local database alias   = xxxxxxx   FORCE APPLICATION ALL DB20000I  The 
FORCE APPLICATION command completed successfully. DB21024I  This command is 
asynchronous and may not be effective immediately.   DB2STOP DB20000I  The DB2STOP 
command completed successfully.  DB2START DB20000I  The DB2START command completed 
successfully. 
HTH
Kurt  


>>> [EMAIL PROTECTED] 09/17/01 05:22PM >>>
I created a script to stop and restart services on remote servers, but it is
failing... anyone know a better way?  and FYI: for some reason my script
centers on remote servers will not work. Script centers always give me Login
failure, although I can run the scripts in command center or from a CLP
without any problems... OTHER FYI: we are running db2 udb 5.2 on NT

script is as follows 

DB2 CONNECT TO %1 USER admin USING password
DB2 FORCE APPLICATION ALL
DB2STOP
DB2START

all the above script does, is stop the instance on the LOCAL workstation
that I am running the script from...

any help would be greatly appreciated


=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to