Grant users the system privilege required to run stored procedures. Since
most privileges are inherited through role membership, users can inherit the system
privilege and the execute privileges for IQ procedures from a role.
Prerequisites
Requires
the
MANAGE ANY USER or EXECUTE ANY PROCEDURE system privilege.
Task
To grant user user1 the MANAGE ANY USER system privilege and
privileges to execute procedures related to user administration:
- Create a role USER_ADMIN_GRP:
CREATE ROLE USER_ADMIN_GRP
- Grant the MANAGE ANY USER system privilege to the
USER_ADMIN_GRP role:
GRANT MANAGE ANY USER TO USER_ADMIN_GRP
- Grant EXECUTE privilege on SAP Sybase IQ stored procedures
for user administration to USER_ADMIN_GRP:
GRANT EXECUTE on sp_iqaddlogin
to USER_ADMIN_GRP
GRANT EXECUTE on sp_iqcopyloginpolicy
to USER_ADMIN_GRP
GRANT EXECUTE on sp_iqdroplogin
to USER_ADMIN_GRP
GRANT EXECUTE on sp_iqmodifyadmin
to USER_ADMIN_GRP
GRANT EXECUTE on sp_iqmodifylogin
to USER_ADMIN_GRP
- Grant the USER_ADMIN_GRP role to user1.
user1 inherits the MANAGE ANY USER system privilege and
the ability to execute the assigned IQ procedures through membership in
USER_ADMIN_GRP role.
GRANT ROLE USER_ADMIN_GRP TO user1