There are 3 ways to create users in a Progress/OpenEdge database.
The following examples show the minimum requirements to create user. For more details on creating users when the authentication is made through third-party systems or OEAG, and when domains are enabled in the database, please refer to the OpenEdge documentation where more details are provided.
1. Using the Progress/OpenEdge Data Administration Tool
(a) Start Progress environment with a proenv command:
on Windows click: Start button > Programs > Progress > proenv
on Unix/Linux run: $DLC/bin/proenv (where DLC is your Progress installation directory)
(b) Start the Data Administration Tool using the following command:
on Windows: prowin32 dbname -p _admin.p (where dbname is your database name)
on Unix/Linux: mpro dbname -p _admin.p (where dbname is your database name)
(c) Select from the menu: Admin | Security | Edit User List | Add and then fill the required fields.
2. Programmatically using the 4GL/ABL language
The following 4GL/ABL code, if executed from a Procedure Editor or a 4GL/ABL client session connected to an OpenEdge or a Progress database, will create a user in that database with the following details: User ID = SomeId, User Name = SomeName, Password = SomePwd:
CONNECT dbname.
CREATE _User.
ASSIGN
_User._Userid = "SomeID"
_User._User-Name = "SomeName"
_User._Password = ENCODE("SomePwd").
Example: save the above code as adduser.p file and then issue the following command:
on Windows: prowin32 dbname -p adduser.p (where dbname is your database name)
on Unix/Linux: mpro dbname -p adduser.p (where dbname is your database name)
Note: Progress "development" license is required to run (and compile on the fly) the above code.
3. Programmatically using SQL
The following SQL CREATE statement, if executed from an ODBC or a JDBC client connected to an OpenEdge or a Progress database, creates a user in that database with the following details:
User ID = SomeId, User Password = SomePwd:
CREATE USER 'SomeID', 'SomePwd';
COMMIT;
Example: Open proenv session as above and then use SQL Explorer, as follows:
sqlexp -db dbname -H hostname -S portnumber (where 'hostname' and 'portnumber' relate to how your database 'dbname' was started)
CREATE USER 'SomeID', 'SomePwd';
commit;
grant dba to 'SomeID';
commit;
select * from sysprogress.sysdbauth;
quit;
Next time, you can use this newly created 'dba' user to connect with SQL Explorer, for example:
sqlexp -db dbname -H hostname -S portnumber -user SomeID -password SomePwd
select * from sysprogress.sysdbauth;
quit;
*** For more information on the authentication system used for the OpenEdge database, please check the links below.