Permission revocation

To revoke a user's permission on a database object, use either the REVOKE statement or Sybase Central.

In Sybase Central, you can view and change permissions either per user or per database object. For example, if you want to see who has permission on a specific table, you can view the table's permissions by clicking the table in the left pane and clicking its Permissions tab in the right pane. Similarly, if you want to change all the permissions for a specific user, you can view all of the user's explicitly-set table permissions by clicking the user in the left pane and clicking its Table Permissions in the right pane.

 Revoke permissions on tables, views, columns, procedures, dbspaces, or sequence generators (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority or as the user who owns the database object that you want to revoke permission on.

    Note

    When revoking connect permissions or table permissions from another user, the other user must not be connected to the database.

  2. In the left pane, either click the database object that you want to revoke a user permission on, or click the user (or group) whose permissions you want to revoke.

    • To revoke permissions per user   If you clicked a user (or group), then in the right pane click the permissions tab that corresponds to the database object that you want to revoke permissions on. For example, to revoke permissions on a table, click the Table Permissions tab.

      The permissions tab list the names of the database objects that the user (or group) has explicitly set permissions on.

    • To revoke permissions per database object   If you clicked a database object, then in the right pane click the Permissions tab.

      The Permissions tab lists the users and groups that currently have permissions on the database object.

  3. Select the row of the database object or user whose permissions you want to modify.

    • To revoke permissions on dbspaces, procedures, functions, sequence generators, and views   A checkmark in a column indicates that the user has permission.

      To revoke a permission, you must click in the column that currently contains a checkmark and continue clicking until the column contains no checkmark.

    • To revoke permissions on tables and table columns   A checkmark in a column indicates that the user has permission. A checkmark with a plus sign (+) indicates that the user has permission plus the ability to grant that permission to other users. A checkmark with a plus sign (+) is equivalent to executing the GRANT statement with the WITH GRANT OPTION clause.

      When you select a table, the corresponding Column Permissions table appears below the Permissions table.

      • To revoke permission on a table   To revoke a permission, you must click in the column that currently contains a checkmark or a checkmark with + (plus sign) and continue clicking until the column contains no checkmark.

        When you revoke permission from a table, you also revoke any column permissions associated with that permission for the table.

      • To revoke permission on a table column   To revoke a permission, you must click in the column that currently contains a checkmark or a checkmark with + (plus sign) and continue clicking until the column contains no checkmark.

        When you revoke permissions from the Column Permissions table, Column permissions are granted/granted with grant option icon disappears in the Table Permissions above.

      Note
      • When you revoke a permission for a user who had WITH GRANT OPTION for that permission—a checkmark with a plus sign(+)—then everyone who that user granted the permission to also has their permission revoked. See Revoking WITH GRANT OPTION.

      • To undo your changes, select the row and click Edit » Undo.

      • To turn on or off the Legend for the permissions table, click File » Show Legend.

  4. Click File » Save to save all your changes.

 Revoke permissions on tables, views, columns, procedures, dbspaces, or sequence generators (SQL)
  1. Connect to the database as a user with DBA authority.

  2. Execute a REVOKE statement to assign the permission.

 See also