Grant a system privilege to authorize a user or role to perform an operation on the database.
Prerequisites
You must have administrative rights on the system privilege you want to grant.
Connect to the database.
Execute a statement similar to the following:
Option | Statement | ||
---|---|---|---|
Grant a privilege, with no administrative rights. |
|
||
Grant a privilege, with administrative rights. |
|
||
Grant administrative rights only on a privilege. |
|
Example
To grant the CREATE ANY OBJECT system privilege to the role RoleA without giving RoleA administrative rights, execute the following statement:
GRANT CREATE ANY OBJECT TO RoleA |
To grant RoleA the CREATE ANY OBJECT system privilege along with the ability to grant or revoke the system privilege to and from other users and roles, execute the following statement:
GRANT CREATE ANY OBJECT TO RoleA WITH ADMIN OPTION |
To give RoleA administrative rights to the BACKUP DATABASE system privilege, but not the ability to use the BACKUP DATABASE privilege, execute the following statement:
GRANT BACKUP DATABASE TO RoleA WITH ADMIN ONLY OPTION |
To grant RoleA administrative rights (only) for the BACKUP DATABASE and CHECKPOINT system privileges, execute the following statement:
GRANT BACKUP DATABASE, CHECKPOINT TO RoleA WITH ADMIN ONLY OPTION; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |