If you are in a DB2 Command Prompt, use the following command:  !net stop (service name)  to stop the service.  You can use the format to restart the service:  !net start (service name).

If you are the DOS Command Prompt use the same command without the "!".


We are currently use this code to stop our services so we can have a clean shut down of DB2 so we can reboot the servers when necessary:

We call this batch (Shutdownserver.bat) file that calls a file with the commands to shut down all of the DB2 services:

        DB2CMD -i DB2 -vtf \SHUTDOWNSERVER.DB2 -z \ShutDownServer.TXT

The following is in  a file (Shutdownserver.db2) that is called from the above batch file:

        !NET STOP TE-AD-51-1;
        !NET STOP TE-UF-51-1;

        !NET STOP TE-AD-51-2;
        !NET STOP TE-UF-51-2;

        ATTACH TO NRDEVL1 USER ?????? USING ??????????;

        LIST APPLICATIONS FOR DATABASE NRDAIRD1 SHOW DETAIL;
        LIST APPLICATIONS FOR DATABASE NRDHPPD1 SHOW DETAIL;

        DB2STOP FORCE;

        ATTACH TO NRTEST1 USER ?????????? USING ?????????;

        LIST APPLICATIONS FOR DATABASE NRDAIRT1 SHOW DETAIL;

        DB2STOP FORCE;

        DB2ADMIN STOP;


Hope this helps.

Ron Draper
Computer Information Technology Specialist I
Missouri Department of Natural Resources
MIS Program
526-1077

[EMAIL PROTECTED]
Microsoft Certified Professional



"LeGrand Decius" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

03/22/2001 10:33 AM
Please respond to db2eug

       
        To:        [EMAIL PROTECTED]
        cc:        (bcc: Ronald Draper/MIS/DAS/MODNR)
        Subject:        DB2EUG: DB2 Services


How can I stop and restart all DB2 services from the command prompt?

This is for DB2 WINNT ver 6.1

Thanks in advance.


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



Reply via email to