Consultor Eletrônico



Kbase P8045: Is there a way to limit SQL connections to the first broker and not allow them to logon to the secon
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/6/2005
Status: Verified

GOAL:

Is there a way to limit SQL connections to the first broker and not allow them to logon to the second, 4GL, broker?

FIX:

If a secondary login broker is in use, then it must be started on a different port.

The separation of the 4GL and SQL connections is achieved in the client settings for -S when connecting. This specifies which port (and therefore associated broker) they will connect to, 4GL or SQL.

To ensure that a broker is for 4GL or SQL only, there is a radio button setting in Progress Explorer in the properties of the server group, "client type", that allows for this setting.

It can now be set as a startup parameter as well from Progress 9.1D onwards, as per our documentation online at http://www.progress.com


From the Progress Startup Command and Parameter Reference:

Type of Server to Start (-ServerType)
Specify whether to start a 4GL server, a SQL server, or both.

Operating System and Syntax UNIX Windows

-ServerType [4GL|SQL|Both]

Where:
4GL
Indicates that the broker will only support 4GL servers.
SQL
Indicates that the broker will only support SQL-92 servers.
Both
Indicates that the broker supports both 4GL and SQL-92 servers. If -ServerType is not specified, the default is both

Use the Type of Server to Start (-ServerType) parameter to limit the type of server the broker can start.

To change the value of -ServerType, use the conmgr.properties file if using the AdminServer or the command line arguments if starting database brokers through cmd line/scripts.

Example: (from cmd line arguments - only the relevant parameters are listed)

Let's assume that we have:
- 8 SQL-92 C/S connections on the primary broker only (3500) and want the remote servers to be spawned within the range 3000 to 3003
- 50 4GL C/S connections on the secondary broker only (4500) and want the remote servers to be spawned within the range 4000 to 4005
- Various SQL-92 or 4GL batch/dayend/archiving jobs that run on a dedicated 1GB line, but only one at any given time.
- 2 APW's, 1 BIW, 1 WDOG, 1 AIW and as many as 36 shared-memory connections.

This is then what our startup arguments would like:

primary broker:
proserve dbname -Mn 10 -Ma 2 -Mi 1 -Mpb 4 -n 100 -ServerType SQL -S 3500 -minport 3000 -maxport 3003

secondary broker:
proserve dbname -m3 -Ma 10 -Mi 5 -Mpb 5 -ServerType 4GL -S 4500 -minport 4000 -maxport 4005

secondary broker:
proserve dbname -m3 -Ma 1 -Mpb 1 -ServerType both -S 5500 -minport 4000 -maxport 4005


When a 4GL client attempts to connect Client/Server to the SQL only server (eg: mpro dbname -S 3500), the following error will be returned:
Only SQL clients allowed on this Broker

Note: There is nothing stopping a non-batch/load intensive connection (SQL or 4GL) from using the "fast-line" (-S 5500). However, this broker is limited to only ONE C/S connection at a time in this configuration.