We are trying to develop a batch file that will cleanly stop all of the DB2 instances and services, so we can do maintenance on the box. The servers have multiple instances on the box. I can shut down the first instance with no problems but when I try attaching to the second instance it fails. Any help would be greatly appreciated. Here is a copy of the code in the batch file:
** Stopping the Cool-Gen services to DB2 **
!NET STOP TE-AD-51-1;
!NET STOP TE-UF-51-1;
!NET STOP TE-AD-51-2;
!NET STOP TE-UF-51-2;
!NET STOP TE-AD-51-CRID1;
!NET STOP TE-UF-51-CRID1;
ATTACH TO NRDEVL1 USER XXXXXXXX USING XXXXXXXXXXX;
LIST APPLICATIONS FOR DATABASE NRDAIRD1 SHOW DETAIL;
LIST APPLICATIONS FOR DATABASE NRDHPPD1 SHOW DETAIL;
DB2STOP FORCE;
ATTACH TO NRTEST1 USER XXXXXX USING XXXXX;
LIST APPLICATIONS FOR DATABASE NRDAIRT1 SHOW DETAIL;
DB2STOP FORCE;
DB2ADMIN STOP;
Here is what is returned
!NET STOP TE-AD-51-1
!NET STOP TE-UF-51-1
!NET STOP TE-AD-51-2
!NET STOP TE-UF-51-2
!NET STOP TE-AD-51-CRID1
!NET STOP TE-UF-51-CRID1
ATTACH TO NRTEST1 USER XXXXXXXX USING
Instance Attachment Information
Instance server = DB2/NT 6.1.0
Authorization ID = XXXXXXXXXX
Local instance alias = NRTEST1
LIST APPLICATIONS FOR DATABASE NRDAIRT1 SHOW DETAIL
Auth Id Application Name Appl. Application Id Seq# Number of Coordinating Coordinator Status Status Change Time DB Name DB Path
Handle Agents Node Number pid/thread
-------- -------------------- ---------- ------------------------------ ---- ---------- ------------ --------------- ------------------------------ -------------------------- -------- --------------------
XXXXXXX NR34S201.exe 21 *LOCAL.NRTEST1.010516123102 0001 1 0 336 UOW Waiting Not Collected NRDAIRT1 F:\NRTEST1\NODE0000\SQL00001\
XXXXXXX NR34S202.exe 22 *LOCAL.NRTEST1.010516123113 0001 1 0 344 UOW Waiting Not Collected NRDAIRT1 F:\NRTEST1\NODE0000\SQL00001\
DB2STOP FORCE
DB20000I The DB2STOP command completed successfully.
ATTACH TO NRDEVL1 USER XXXXXXX USING
SQL1032N No start database manager command was issued. SQLSTATE=57019
LIST APPLICATIONS FOR DATABASE NRDAIRD1 SHOW DETAIL
SQL1032N No start database manager command was issued. SQLSTATE=57019
LIST APPLICATIONS FOR DATABASE NRDHPPD1 SHOW DETAIL
SQL1032N No start database manager command was issued. SQLSTATE=57019
DB2STOP FORCE
SQL1032N No start database manager command was issued. SQLSTATE=57019
DB2ADMIN STOP
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
Any help would be greatly appreciated. This script is being used by the network team to shut down the server, so DB2 doesn't have to do a crash recovery.
Ron Draper
Computer Information Technology Specialist I
Missouri Department of Natural Resources
MIS Program
526-1077
[EMAIL PROTECTED]
Microsoft Certified Professional
- Re: DB2EUG: Shutting down a DB2 NT server... Ronald Draper
- Re: DB2EUG: Shutting down a DB2 NT s... Gert van der Kooij
- RE: DB2EUG: Shutting down a DB2 NT s... Vilas, Ajith (USPC.PCT.Hopewell)
- RE: DB2EUG: Shutting down a DB2 NT s... McLeod, Scott
