Granting permissions on views

Setting permissions on views is similar to setting them on tables.

For more information about the SQL statements involved, see Granting permissions on tables.

A user may perform an operation through a view if one or more of the following are true:

  • The appropriate permission(s) on the view for the operation has been granted to the user by a user with DBA authority.

  • The user has the appropriate permission(s) on all the base table(s) for the operation.

  • The user was granted appropriate permission(s) for the operation on the view by a non-DBA user. This user must be either the owner of the view or have WITH GRANT OPTION of the appropriate permission(s) on the view. The owner of the view must be either:

    • a user with DBA authority.

    • a user that does not have DBA authority, but also the owner of all the base table(s) referred to by the view.

    • a user that does not have DBA authority, and is not the owner of some or all the base table(s) referred to by the view. However, the view owner has SELECT permission WITH GRANT OPTION on the base table(s) not owned and any other required permission(s) WITH GRANT OPTION on the base table(s) not owned for the operation.

      Instead of the owner having permission(s) WITH GRANT OPTION on the base table(s), permission(s) may have been granted to PUBLIC. This includes SELECT permission on system tables.

UPDATE permissions can be granted on an entire view or on individual columns within a view.

Note

You can grant permissions on disabled views. Permissions to disabled views are stored in the database and become effective when the object is enabled.

To grant permissions on views (Sybase Central)
  1. Connect to the database as a user with DBA authority.

  2. Click Views.

  3. Right-click a view and then choose Properties.

  4. Click the Permissions tab.

  5. Configure the permissions for the view:

    • Click Grant.

    • Double-click a user or group.

    • In the permissions table, click the fields beside the user or group to set specific permissions.

    • To revoke all permissions, select a user or group and click Revoke

  6. Click Apply.

Tip

You can also assign permissions from the User Properties or Group Properties window. Use the View Properties window to assign permissions to multiple users or groups. Use the User Properties or Group Properties window to assign permissions to multiple views.

See also