Salesforce

Database did not shutdown when using dbman -stop scripts

« Go Back

Information

 
TitleDatabase did not shutdown when using dbman -stop scripts
URL NameP136887
Article Number000139164
EnvironmentProduct: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
DBMAN -stop script did not shut the database down
Do not see message:  Shutdown request received from Admin Server. (8852) being written to the database log file.
Database log file shows messages 8848, 9151, 9148 and 8845.
When the AdminServer is being shutdown it posts an 8475 error to the admserv.log file
Steps to Reproduce
Clarifying Information
Database was started via scripts that issue the dbman -start command.
AdminServer is being shutdown by a user.
Error MessageConnection to Admin Server lost. (8848)
Admin Server is shutting down, connection terminated. (9151)
Registration ACK not received, msgcode=<msgcode>. (9148)
Registration ACK not received, msgcode=-2. (9148)
Error registering with Admin Server. (8845)

Failure sending packet to broker process. (8475)
Defect Number
Enhancement Number
Cause
The AdminServer lost communication with the database prior to the database shutting down. 

This is because the script being used to stop database processes did not validate that they were truly stopped prior to shutting down the AdminServer (proadsv -stop). 

As a result the AdminServer is no longer able to communicate with the database Broker processes.  Therefore any attempts to make use of the DBMAN commands  will fail until the AdminServer is brought back online.
Resolution
When using scripts to shutdown Database Brokers, the recommendation is that the script validate that these brokers have been stopped prior to stopping the AdminServer.  Failure to ensure that these brokers have stopped prior to stopping the AdminServer can result in these Servers no longer being registered with or able to communicate with the AdminServer, until the AdminServer is restarted.

To check on the status of a database

One of the following commands can be used to check the current status of the database broker:

1.  Query the Connection Manager for the status of the database while the AdminServer is running:

$   dbman -query -db dbname 

2.  Independent of the AdminServer, the PROUTIL BUSY qualifier can be used to test the command return code in a UNIX script or Windows batch file to get the current state of the database.

$   proutil dbname -C busy 

The return codes for the BUSY qualifier are:
 
Return Code:   Description:

0                Database is not in use.
6                Database is in use.
64               Database is in process of starting up
.
 
3.  Independent of the AdminServer, the PROUTIL HOLDER qualifier will return a message indicating the state of the database.  The command also has return codes which can be queried via a UNIX or Windows command line or script for the state of the database:

$   proutil dbname -C holder
 
The return codes for the HOLDER qualifier are:
 
Return Code:    Description:
0               Database is not in use.
14              Database locked by single user, PROUTIL or RFUTIL.
16              Database open in multi-user mode.
 
Sample scripts making use of the PROUTIL command line options (BUSY and HOLDER) are available within the documentation in the Database Administration Guide.
Workaround
Notes
References to Written Documentation:

Database Administration Guide - PROUTIL utility and DBMAN utility
Keyword Phrase
Last Modified Date3/20/2017 8:59 AM

Powered by