Set security administrators from batch

RealHeavyDude

Well-Known Member
OpenEdge 11.7.3

The data administration tool provides a menu item to set security administrator on the database in the security menu. I need to invoke this function from a batch procedure and I don't like to roll my own and fiddle with the respective meta-schema tables can-* settings.

Does anybody know whether there is a procedure ( in the prodict library for example ) which I could use for that?

Thanks in Advance.
 

RealHeavyDude

Well-Known Member
Found the solution - for anyone who is interested

Code:
using OpenEdge.DataAdmin.DataAdminService from propath.
using OpenEdge.DataAdmin.IAdministrator from propath.

define variable administrator  as class  IAdministrator    no-undo.
define variable service        as class  DataAdminService  no-undo.
define variable okay           as logical     no-undo.

assign service = new DataAdminService ( ldbname ( 1 ) ).
assign administrator = service:getAdministrator ( ).
assign administrator:administrators = 'xyz,realheavydude'.
assign okay = service:updateAdministrator ( input administrator ).
 

RealHeavyDude

Well-Known Member
Some caveats I stumbled on:
  • You must have a development license installed or you must start the ABL client session with the -rx parameter
  • On *nix you must have the ${DLC}/tty/OpenEdge.ServerAdmin.pl in the PROPATH.
 
Top