Question Sql Broker Up And Running.

Jack@dba

Member
Hi All,

I would like to know, how to check the status of Sql broker is up and running.
i gone through progress and knowledge base but not able to find it.
Kindly help on this.

Progress Version: 9.1E
OS: Unix

Thanks
Jack.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The SQL broker is an _mprosrv process. If it is a secondary broker it will have been started with the -m3 parameter. If it is SQL-specific then it will have been started with the -ServerType SQL parameter.

So the easiest way to see that it is running is to parse your ps output as appropriate.
 

Jack@dba

Member
Hi Rob,

Thanks for update..............

pgresdba 189858 1 0 01:57:36 - 0:02 /progress/91e/bin/_mprosrv /progdata/aps/crndb1/apscrn -pf /usr/wrk/pf/mai.pf -pf /tst/dba/etc/pf/apscrn.pf -H test-S apscrn -N tcp
pgresdba 192608 1 0 01:57:35 - 0:01 /progress/91e/bin/_mprosrv /progdata/tst/misc01/usagemon -pf /usr/wrk/pf/mai.pf -H test-S usagemon -N tcp
pgresdba 193684 1 0 04:03:41 - 0:00 /progress/91e/bin/_mprosrv -m1 /progdata/tst/crnbard1/tstcrnb -N tcp -Nd /dev/tcp -hs 0 -Mm 1024 -yy 1950 -cpinternal iso8859-1 -cpstream ibm850 -cpterm ibm850 -cpcase Basic -cpcoll basic -S tstcrnb -H p5lp4
pgresdba 196002 1 0 01:57:36 - 0:02 /progress/91e/bin/_mprosrv /progdata/aps/reydb1/apsrey -pf /usr/wrk/pf/mai.pf -pf /tst/dba/etc/pf/apsrey.pf -H test-S apsrey -N tcp
pgresdba 199486 1 0 01:57:34 - 0:01 /progress/91e/bin/_mprosrv /progdata/tst/fin01/finrey -pf /usr/wrk/pf/mai.pf -H test-S finrey -N tcp
pgresdba 199922 1 0 01:57:34 - 0:02 /progress/91e/bin/_mprosrv /progdata/tst/fin01/fincrn -pf /usr/wrk/pf/mai.pf -H test-S fincrn -N tcp
pgresdba 201094 1 0 01:57:33 - 0:02 /progress/91e/bin/_mprosrv /progdata/tst/shr1/mfg86d/mfgctrl -pf /usr/wrk/pf/mai.pf -H test-S mfgctrl -N tcp
pgresdba 203166 1 0 01:57:34 - 0:01 /progress/91e/bin/_mprosrv /progdata/tst/phxbard1/tstphxb -pf /usr/wrk/pf/mai.pf -H test-S tstphxb -N tcp
pgresdba 206274 1 0 01:57:35 - 0:01 /progress/91e/bin/_mprosrv /progdata/val/slcdb1/valslcb -pf /usr/wrk/pf/mai.pf -H test-S valslcb -N tcp
pgresdba 206958 1 0 02:47:41 - 0:00 /progress/91e/bin/_mprosrv /progdata/pre/reydb1/prerey -m3 -Mn 8 -Ma 10 -Mpb 4 -S prereyoi -ServerType SQL
-N tcp

proserve /$dbpath/aspcrn -m3 -Mi 3 -Ma 5 -Mpb 4 -S aspcrn -ServerType SQL
proserve /$dbpath/aspcrn -m3 -Mi 3 -Ma 5 -Mpb 4 -S aspcrn -ServerType SQL

From above ps details how i can find which is primary broker and which secondar broker?

Thanks
Jack.
 

TomBascom

Curmudgeon
The ones with "-m3" on the command line are secondary brokers. The others *might* be secondary brokers -- you will have to parse the .pf files to tell. But offhand, and assuming that you have shown everything, it seems unlikely since there is just one process per db for the others.
 

Jack@dba

Member
Secondary brokers also called as Sql brokers.
Am i wrong

And also i not seen any _sql process running in our server.

ps -ef | grep _sqlsrv
pgresdba 37544 209960 0 10:47:42 pts/2 0:00 grep _sqlsrv

when i started odbc connection i able to see m3 process running in server.


pgresdba 124084 1 0 08:36:59 - 0:00 /progress/r91e/bin/_mprosrv /progdata/tst/reydb1/tstrey -m3 -Mi 3 -Ma 5 -Mpb 4 -S tstreyoi -ServerType SQL

<p-6400>/tst/dba/bin: ps -ef | grep tstreyboi

pgresdba 117956 1 0 08:36:59 - 0:00 /progress/r91e/bin/_mprosrv /progdata/tst/reybard1/tstreyb -m3 -Mi 3 -Ma 5 -Mpb 4 -S tstreyboi -ServerType SQL

pgresdba 126224 209960 0 08:38:07 pts/2 0:00 grep tstreyboi
 
Last edited:

Rob Fitzpatrick

ProgressTalk.com Sponsor
Secondary brokers also called as Sql brokers.
Am i wrong
Yes.

A database is opened in multi-user mode by the primary broker. It may or may not also be a connection broker that can spawn remote servers. This is determined by the -ServerType parameter. Any broker that is started against the database after the primary broker is a secondary broker. It too spawns servers, which may be 4GL, SQL, or both, depending on the -ServerType value. A secondary broker must be started with the -m3 parameter; that distinguishes it as a secondary.

You could, for example, start a database with a single SQL broker, e.g.:
proserve sports -ServerType SQL -S 12345

This would be a database with a SQL broker and no secondaries. Another example:
proserve sports -ServerType SQL -S 12345
proserve sports -ServerType 4GL -S 23456 -m3

This database has a primary broker that is also a SQL connection broker, and a secondary 4GL connection broker. So a broker can be primary or secondary independent of being 4GL or SQL (or other).
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
A programmatic way to think about this:

Code:
for each _servers no-lock where _servers._server-type = "login":
  display _servers.
end.
Code:
Server Number  Server Pid Server Type Server Protocol                     Logins Current Users   Max Users Server Port Number Pending Connections
───────────── ─────────── ─────────── ──────────────────── ───────────────────── ───────────── ─────────── ────────────────── ───────────────────
            0        8537 Login       TCP                                    195             0          40              35902                   0
            1        8570 Login       TCP                                      0             0          10              35907                   0

This code shows all brokers. The primary broker is always Server Number 0. All other login brokers are, by definition, secondary.
 
Top