Salesforce

How to determine which port the database was started on?

« Go Back

Information

 
TitleHow to determine which port the database was started on?
URL NameP52476
Article Number000149679
EnvironmentProduct: Progress OpenEdge
Version: 8.x, 9.x, 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to determine what port the Database was started on?
How to determine if the Database was started with networked connections enabled?
How to find the Listening Port of a Database Login Broker?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
To determine what Port, if any, the database was started check any of the following.

The "-S" parameter is specified on Startup of the database to enable networked connections . When the database is not started with this parameter it is not enabled for network connections, there is no default Listening Port.

Depending how the database is started, determines where the Listening Port "-S" parameter resides:
1.   If the database is started by a script then within the script file on the line that starts the database there should be an entry for the "-S" parameter.
2.   If the database startup parameters are contained within a parameter files the then on the command to execute the startup of the database there should be a "-pf" parameter with a file referenced. The file referenced within the "filename.pf" will contain the value for the "-S" parameter.
3.   If the database is managed by the AdminServer, the startup parameters are listed in the conmgr.properties file in the servergroup section with the port argument.
4.   If the database is started by a user from the command line, then the user who initiates the startup of the database should know the value of the "-S" parameter.

If you can not determine how the database is started:
 
1.  The value of the "-S" parameter is written to the database logfile. The database logfile is named "<dbname>.lg". To determine if a database was started with a -S parameters, parse the log file:
BROKER 0: Service Name (-S): ####. (4262)
If the database is not started with on a listening port the following entry will be in the logfile.
BROKER 0: Service Name (-S): Not Enabled. (4262)
BROKER 0: Service Name (-S): 0. (4262)


2.   The _Servers VST can be queried from a shared-memory connection to the database.
 
DEFINE BUFFER autoservers FOR _servers.

FOR EACH _servers WHERE _server-type = "login":
    DISPLAY 
        _servers._server-type
        _servers._server-num
        _servers._Server-Pid
        _servers._server-portnum.
END.

FOR EACH autoservers WHERE 
    autoservers._server-type = "auto" :
    DISPLAY 
        autoservers._server-type 
        autoservers._server-num 
        autoservers._Server-Pid 
        autoservers._server-portnum 
        autoservers._Server-MaxUsers 
        autoservers._Server-CurrUsers 
        autoservers._Server-PENDConn.
END.

Starting with OpenEdge 11.5, the _servers VST has additional _SrvParam* extent fields, which show the values of the Broker-specific startup parameters. Refer to Article  How to find the value of -Mpb with VSTs?   

While the Listening Port for Network Communications is typically defined on the Primary Login Broker, there may be secondary login Brokers that are also started, which will have their distinct Port defined. These however cannot start until the Primary Login Broker, which is always user number 0, has been started with or without networked connections enabled.
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:16 AM

Powered by