Salesforce

How to dump SQL DBA users in OpenEdge

« Go Back

Information

 
TitleHow to dump SQL DBA users in OpenEdge
URL NameHow-to-dump-SQL-DBA-users-in-OpenEdge
Article Number000115200
EnvironmentProduct: OpenEdge
Version: All supported versions
OS: All supported platforms
Other: SQL-92
Question/Problem Description
How to dump SQL DBA users in OpenEdge.

Is it possible to dump SQL DBA users in OpenEdge?

Is it possible to dump SQL DBA users via the SQLSCHEMA utility?

Are SQL DBA privileges dumped by the SQLSCHEMA utility?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
It is currently not possible to dump SQL DBA users. The SQLSCHEMA utility will not dump out CREATE USER statements for defined users in _User, nor does it dump DBA privileges.

It was determined that the Progress Product is functioning as designed.
 
An enhancement to the product can be requested through the Progress Community via an Ideas submission.  Customer feedback is valuable and Idea submissions are monitored by our Product Management team.  Enhancement requests are reviewed during the planning phase of each new product release and a list of the enhancements chosen for implementation can be found in the Release Notes documents that accompany each release.  Once an Idea is submitted the Progress Software Community will have the opportunity to comment on and vote for the Idea.
 
For detailed information on how to submit an Idea, please refer to Knowledge Base article  "How to submit an idea for a Progress product enhancement".
Workaround
Use the following steps to transfer SQL DBA users between databases:

1) Dump out the content of the _user table using Data Administration > Admin > Dump Data and Definitions > User Table Contents.

2) Use the following ABL code to generate .sql file to generate GRANT DBA statements for current DBA users:
 
OUTPUT TO VALUE("createDbaUsers.sql") APPEND.
FOR EACH _User NO-LOCK:
     FOR EACH _Sysdbauth WHERE _Sysdbauth._grantee = _User._Userid NO-LOCK: 
          PUT UNFORMATTED "GRANT DBA TO " + _GRANTEE + "; " SKIP.
          PUT UNFORMATTED "COMMIT WORK;" SKIP.
     END.
END.
OUTPUT CLOSE.

3) Use SQLSCHEMA to dump out database object-related GRANTs.

In the new database with the .df loaded, 

1) Start Data Administration against the database and:
- Reload users with Admin > Load Data and Definitions > User Table Contents.
- Create the sysprogress user in Data Administration > Admin > Security > Edit User List.

2) Use SQLEXP to execute the script to recreate DBA user(s); use the sysprogress user account to do this:

sqlexp -db myNewDatabase -S 9999 -user sysprogress -password sysprogress -infile createDbaUsers.sql

3) Use SQLEXP to execute the .dfsql script to re-apply GRANTs using the DBA user created in step #2.

sqlexp -db myNewDatabase -S 9999 -user myDBA -password myDBApwd -infile grants.dfsql

4) Remove the sysprogress user from the database.
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:22 AM

Powered by