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 2: Grant privileges to User1 (Sybase Central)

Grant system privileges and object-level privileges to User1.

Prérequis

This lesson assumes that you have completed the previous lesson in this tutorial. See Lesson 1: Create two new users: User1 and User2 (Sybase Central).

 Task
  1. In the left pane in Sybase Central, click to expand Users, and click User1.

  2. Grant the BACKUP DATABASE and VALIDATE ANY OBJECT system privileges to User1.

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

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

    3. Click the BACKUP DATABASE system privilege, then click OK.

    4. Repeat the above steps, this time clicking the VALIDATE ANY OBJECT system privilege, then click OK.

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

  3. Grant SELECT and UPDATE object-level privileges on the Employees table to User1, with administrative rights.

    1. In the right pane, click the Table Privileges tab.

    2. Right-click anywhere on the tab and click New » Privileges.

    3. Click the Employees table, then click OK. The Employees table is added to the list of tables for User1. Each check mark in the letter columns indicates an object-level privilege that User1 has on the table. For example, S for select, I for insert, and so on. However, in this lesson only User1 should have the ability to select from, and update, the Employees table.

    4. Click the cells beneath the columns to clear their contents until there is a check mark, with a plus sign (+), in only the S (for select) and U (for update) columns. The plus sign indicates administrative rights. All other cells in the row should be empty.

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

Résultat

User1 now has the BACKUP DATABASE and VALIDATE ANY OBJECT system privileges, which are required to back up the SQL Anywhere sample database. User1 also has the SELECT and UPDATE object-level privileges on the Employees table, and can grant the privileges to other users.

 See also