Title: RE: DB2EUG: how to stop and restart instances on remote server
Hi,
As Grant said, you can't stop a remote instance with db2stop. Maybe, but I never tried it, you can do it with 'db2 stop database manager'.
The SQL30081 occured because you forced your own connection. You don't need to connect if you want to force applications.
 
If the 'stop database manager' doesn't work you need to use another utility to stop a remote service (also as Grant said).
With the Sc utility from the NT Resourtce Kit or the PS tools from the www.sysinternals.com site that shouldn't be a problem.
 
Hope this helps.
 
Kind regards, Gert
----- Original Message -----
From: Lee Smith
Sent: Tuesday, September 18, 2001 8:41 PM
Subject: RE: DB2EUG: how to stop and restart instances on remote server

hrmmmm, when I try this on my setup..

I get connections on both the attach, and the connect statements..
then I get a SQL300081n error (i.e.- tcpip communication error) on the force application all
and it stops the instance on the local machine on the db2stop.. (i.e.- doesnt hit the remote db2 server)

hrmmmm any other idea??  this script below wont even work from command center....

any help at all would be mucho appreciated..

    -----Original Message-----
    From:   Kurt Sahlberg [SMTP:[EMAIL PROTECTED]]
    Sent:   Tuesday, September 18, 2001 10:22 AM
    To:     [EMAIL PROTECTED]
    Subject:        Re: DB2EUG: how to stop and restart instances on remote server

    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