Kbase P50496: Sample 4GL code to list users who have SQL DBA access and resource privileges to a database.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/28/2009 |
|
Status: Verified
GOAL:
How to determine who has SQL-DBA access rights to a database?
GOAL:
How to determine who may have created a database?
GOAL:
Sample 4GL code to list users who have SQL DBA access and resource privileges to a database.
GOAL:
Sample 4GL code to query the _sysdbauth table.
FIX:
Sometimes it is helpful to know which users have DBA access to a database and have proper permissions to be an SQL DBA.
The 4GL code below may be run from a 4GL session and will display which users have DBA access writes for an SQL session.
FOR EACH _Sysdbauth.
DISPLAY _Grantee _Dbaacc _Resacc.
END.
Code will return the information similar to that listed below. NOTE: users without resource rights (RES_ACC)will not be able to create database objects.
GRANTEE DBA_ACC RES_ACC ------------------------------- ------------ --------------- another-user y y some-user y
SYSPROGRESS y y
When conv89 was used to convert the database there will not be an owner of the database for and an SQL DBA will have to be created.
GRANTEE DBA_ACC RES_ACC ------------------------------- ------------ --------------- SYSPROGRESS y y
See Solution 20143: Basic Guide to Defining Progress SQL-92 Database Permissions & Security for additional information on creating SQL DBA.