Home | Previous Page | Next Page   Programming with SQL > Granting and Revoking Privileges in Applications >

Assigning Roles

Alternatively, the DBA can define a role with the CREATE ROLE statement, and use the GRANT and GRANT ROLE and REVOKE ROLE statements to assign privileges and grant and revoke privileges to that roles. For example:

GRANT ROLE engineer TO nmartin; 

The SET ROLE statement is needed to activate a non-default role. For more information on roles and privileges, see Access-Management Strategies and Privileges on a Database and on its Objects. For more information on the GRANT and REVOKE statements, see the IBM Informix: Database Design and Implementation Guide. For more information about the syntax of these statements, see IBM Informix: Guide to SQL Syntax.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]