Salesforce

4GL/ABL/SQL: How can we create users in a Progress or OpenEdge database?

« Go Back

Information

 
Title4GL/ABL/SQL: How can we create users in a Progress or OpenEdge database?
URL NameP163831
Article Number000142647
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
4GL/ABL/SQL:  How can we create users in a Progress or OpenEdge database?
How to create database users using the Data Administration Tool?
How to programmatically create database users using 4GL/ABL?
How to programmatically create database users using SQL?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution

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.

Workaround
Notes
Important: After the first user is created, Progress will require a valid userID and password when connecting to that database. If  the "Disallow blank Userid access" database option is enabled, it will not allow connecting anonymously anymore from there on.  

References to Other Documentation

Security in OpenEdgeData management:Database security
Security in OpenEdge:Core user authentication and authorization
OpenEdge SQL statements:CREATE USER
Create user using OpenEdge.DataAdmin.*
Database Administration Entity Interface Reference

Progress Article(s):

Basic Guide to Defining Progress SQL-92 Database Permissions & Security
How to grant a new user dba priviledges in SQL.
What are the differences between a database administrator and a database owner?
Keyword Phrase
Last Modified Date4/29/2024 1:45 AM

Powered by