Consultor Eletrônico



Kbase P71617: The Sqlschema utility does not handle update permissions when using the -g parameter.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/01/2005
Status: Unverified

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.0A
OpenEdge 10.0B

SYMPTOM(s):

The Sqlschema utility does not handle update permissions when using the -g parameter.

The Sqlschema utility does not produce any GRANT UPDATE statements when using the -g parameter.

CAUSE:

Bug# 20040311-001

FIX:

Option 1: Upgrade to OpenEdge 10.0B01. This issue has been fixed in this OE service pack

Option 2: As a workaround (in the event you cannot upgrade to OE 10.0B01), the following Stored Procedure will list all UPDATE privileges for all users for the database.
CREATE PROCEDURE grantupdate ()
RESULT ( cSqlCmd CHARACTER(132) )
BEGIN
SQLCursor scTbl = new SQLCursor ("SELECT tblowner, tbl, grantee "
+ "FROM sysprogress.systabauth "
+ "WHERE upd = 'y'");
scTbl.open ();
scTbl.fetch ();
while (scTbl.found()) {
String sSchemaName = (String) scTbl.getValue(1, CHARACTER);
String sTblName = (String) scTbl.getValue(2, CHARACTER);
String sUser = (String) scTbl.getValue(3, CHARACTER);
sUser = "'" + sUser + "'";
String sGrantCmd = new String("GRANT UPDATE ON "
+ sSchemaName.trim() + "."
+ sTblName.trim()
+ " TO " + sUser.trim() + ";");
SQLResultSet.set (1, sGrantCmd);
SQLResultSet.insert();
scTbl.fetch();
}
scTbl.close();
SQLResultSet.set (1, "COMMIT WORK;");
SQLResultSet.insert();
END;