VST to determine the port of the sql login broker to use wit

Posted by Stefan Marquardt on 25-Feb-2016 08:03

Hi,

because it's impossible to set SQL rights from an ABL program I have to fork to a shell and start sqlexp with an input file.
Is this still the truth?

This should be done by a batch job from an existing connection, the cmd shall get the needed -.H and -S from any vst tables.

_servers could be a good table but how to identify the sql login, it can be one for abl and sql or a second for sql only.

How to get on the fastest way the SQL Login port?

for each _servers where _server-type = "login":....

Do I really need to check every extents one by one for a parameter?

And I checked _dbparam and noticed an OT "problem"
How to find "-n" and/or ".-N"?  

Posted by Keith Sudbury on 25-Feb-2016 08:22

Yes this is still the case. If you are running 11.5 or higher you can use the new fields to determine if the server supports SQL or 4GL or both.

knowledgebase.progress.com/.../How-to-identify-which-login-brokers-are-running-via-VST

The good news is that -N only supports TCP now so it isn't required. But it is also available in the _Servers VST.

_DbParams-Name should be case sensitive but it isn't... if you really want to check you can include a check for _DbParams-Msg-Num or _DbParams-Desc to tell the difference or do a case sensitive comparison.

All Replies

Posted by Keith Sudbury on 25-Feb-2016 08:22

Yes this is still the case. If you are running 11.5 or higher you can use the new fields to determine if the server supports SQL or 4GL or both.

knowledgebase.progress.com/.../How-to-identify-which-login-brokers-are-running-via-VST

The good news is that -N only supports TCP now so it isn't required. But it is also available in the _Servers VST.

_DbParams-Name should be case sensitive but it isn't... if you really want to check you can include a check for _DbParams-Msg-Num or _DbParams-Desc to tell the difference or do a case sensitive comparison.

Posted by Stefan Marquardt on 25-Feb-2016 08:36

Thanks Keith

This info was helpful: "server-num 0 is reserved for primary broker"

"case sensitive comparison"

How it the syntax for FIND record WHERE record.field = "-n" (or -N) ?

For the port I will use this code, it works for single broker or an existing secondary broker:

def var iPort as integer.

find first _servers where _server-type = "login" and _server-num > 0 no-error.

if avail _servers then

 iPort = _server-PortNum.

else do:

 find _servers where _server-type = "login" and _server-num = 0.

 iPort = _server-PortNum.

end.

disp iPort.

This thread is closed