Salesforce

How to dump SQL-92 privileges

« Go Back

Information

 
TitleHow to dump SQL-92 privileges
URL NameP17829
Article Number000133506
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to dump SQL-92 privileges.
How to dump SQL-92 table permissions.
How to obtain the SQL-92 permissions set within a database.
How can SQL security information be dumped
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
To dump SQL-92 table permissions:

Generate SQL-92 GRANT statements on one or more tables with the SQLSCHEMA -g parameter:
  1. The output file name created will always be created with a file extension of .dfsql.
  2. Pass the -g parameter %.% to obtain a list for all the tables in the database.   
  3. In Progress versions prior 9.1E02, OpenEdge 10.0B03,  UPDATE permissions need to be manually added. Refer to Article  The Sqlschema utility does not handle update permissions when using the -g parameter.   
sqlschema -u user_name [-a password] -g [owner_name].table_name  -o outputFile  <database_name>
Where: database_name = progress:T:host:portnum:dbname

Examples: 

1. Dump all table rights for all tables into a file which can loaded later.
sqlschema -u <username> -a <password> -g %.% -o <outputfile> progress:T:<hostname or IP>:<port name or number>:<database name>

2. Dump all table rights for one table into a file which can loaded later:
sqlschema -u <username> -a <password> -g <owner name>.<table name> -o <outputfile> progress:T:<hostname or IP>:<port name or number>:<database name>

To dump the rights defined for customer table of sports2000 database running on sample port 2500 on sample machine mymachine, use the following command:
sqlschema -u myusername -a mypassword -g PUB.customer -o myoutputfile  progress:T:mymachine:2500:sports2000

The output file will contain all the permissions granted.  Example:
grant select on "SYSPROGRESS"."SYS_TBL_CONSTRS" to "PUBLIC";

 
To load the SQL-92 table permissions:

Load the file output from the SQLSCHEMA command into a new database:

Example:
sqlexp -char -db dbname -H localhost -S portnumber -infile c:\temp\input.dfsql
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:35 AM

Powered by