Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » User and database security » User security (roles and privileges) » Tutorial: Granting roles and privileges (Sybase Central)

 

Lesson 3: Create a role and grant it to User1 (Sybase Central)

Create a role that contains the privileges necessary to debug a procedure and correct any errors found during the debugging process, and then grant that role to User1. Also, grant administrative rights on the role to User1 so that they can grant the role to, or revoke the role from, other users as necessary.

Prerequisites

This lesson assumes that you have completed all previous lessons in this tutorial. See Lesson 2: Grant privileges to User1 (Sybase Central).

 Task
  1. Create the role.

    1. In the left pane in Sybase Central, right-click Roles and click New » Role.

    2. In the What do you want to name the new user-defined role? field, type DebugAndAlter, and then click Next.

    3. On the Choose the Administrators screen, click Finish to accept the default, which is to allow users with the MANAGE ROLES system privilege (also known as global administrators) to administer the role.

  2. Grant the required system privileges to the role.

    1. In the left pane, double-click Roles and select DebugAndAlter.

    2. In the right pane, click the System Privileges tab.

    3. Right-click anywhere on the tab, and click New » Granted System Privileges.

    4. Click the ALTER ANY OBJECT system privilege, then click OK.

    5. Right-click the tab again, click New » Granted System Privileges, select DEBUG ANY PROCEDURE, and then click OK.

    6. Click File » Save to save your changes to the database.

  3. Grant the role to User1 with administrative rights on the role.

    1. In the left pane, double-click Users and select User1.

    2. In the right pane, click the Roles tab.

    3. Right-click anywhere on the tab, then click New » Granted Roles.

    4. Click DebugAndAlter and then click OK. The ability to exercise the DebugAndAlter role is granted to User1, without administrative rights.

    5. In the right-pane, on the row for the DebugAndAlter role, click in the cell in the Adm. column to add a check mark. This grants administrative rights on the role to User1.

    6. Click File » Save to save your changes to the database.

Results

The role DebugAndAlter, which has the DEBUG ANY PROCEDURE and ALTER ANY OBJECT system privileges, has been created and granted to User1. User1 has also been given administrative rights on the role.

 See also