Contents Index Granting DBA and RESOURCE authority Granting permissions on views

ASA Database Administration Guide
  Managing User IDs and Permissions
    Managing individual user IDs and permissions

Granting permissions on tables


You can assign a set of permissions on individual tables and grant users combinations of these permissions to define their access to a table.

You can use either Sybase Central or Interactive SQL to set permissions. In Interactive SQL, you can use the following SQL statements to grant permissions on tables.

To grant permissions on tables or columns (Sybase Central)

  1. Connect to the database.

  2. Open the Tables folder for that database.

  3. Right-click a table and choose Properties from the popup menu.

  4. On the Permissions tab of the Table property sheet, configure the permissions for the table:

Tips 
Legend for the columns on the Permissions page: A=Alter, D=Delete, I=Insert, R=Reference, S=Select, U=Update.

You can also assign permissions from the user/group property sheet. To assign permissions to many users and groups at once, use the table's property sheet. To assign permissions to many tables at once, use the user's property sheet.

To grant permissions on tables or columns (SQL)

  1. Connect to the database with DBA authority or as the owner of the table.

  2. Execute a GRANT statement to assign the permission.

    For more information, see GRANT statement.

Example 1 

All table permissions are granted in a very similar fashion. You can grant permission to M_Haneef to delete rows from the table named sample_table as follows:

  1. Connect to the database as a user with DBA authority, or as the owner of sample_table.

  2. Type and execute the following SQL statement:

    GRANT DELETE
    ON sample_table
    TO M_Haneef
Example 2 

You can grant permission to M_Haneef to update the column_1 and column_2 columns only in the table named sample_table as follows:

  1. Connect to the database as a user with DBA authority, or as the owner of sample_table.

  2. Type and execute the following SQL statement:

    GRANT UPDATE (column_1, column_2)
    ON sample_table
    TO M_Haneef

Table view permissions are limited in that they apply to all the data in a table (except for the UPDATE permission which may be restricted). You can fine-tune user permissions by creating procedures that carry out actions on tables, and then granting users the permission to execute the procedure.

See also


Contents Index Granting DBA and RESOURCE authority Granting permissions on views