Closed PhilippSalvisberg closed 7 years ago
Granting is not enough if column defrole
in table sys.user$
is != 1
. A simpler variant is to just execute the following:
ALTER USER «conn.metaData.userName» DEFAULT ALL
.
However, in some cases this might change the intended behaviour on connect.
If select_catalog_role is not found in session_roles the following solution is generated:
GRANT SELECT_CATALOG_ROLE TO «conn.metaData.userName»;
This is ok, but to ensure the resolution works also when the role is not defaulted, the following additional statement should be generated as well:
ALTER USER «conn.metaData.userName» DEFAULT ROLE select_catalog_role, ...;
the
, ...
represents the list of existing roles.