grant admin argument: Grant privileges to run SQL administration API commands

Use the grant admin argument with the admin() or task() function to grant privileges to run SQL administration API commands.

Syntax


1  EXECUTE FUNCTION
1 admin
1 task
2  (
2  " grant admin "
2  , " user_name " , " privilege_group "
2  ) ;
Element Description Key Considerations
user_name The name of the user for which privileges are granted.
privilege_group The name of the privilege group. See SQL administration API portal: Arguments by privilege groups for a list of privilege groups.

Usage

Individual users can be granted privileges to administer their database servers by running SQL administration API commands. Users with these privileges can connect to a database server with their user name and run SQL administration API commands, by connecting directly.

Only user informix, or a user with ADMIN or GRANT privilege for SQL administration API commands, can use the grant admin argument.

Example

The following command grants the privilege for running backup and restore SQL administration commands to the user Bob:

EXECUTE FUNCTION task("grant admin", "Bob", "BAR");