Revoking user permissions – Sybase 12.4.2 User Manual

Page 382

Advertising
background image

Managing individual user IDs and permissions

362

2

Click the Users and Groups folder, and locate the user you want to grant
permissions to.

3

Right-click the user, and select Copy from the popup menu.

4

Locate the procedure you want to allow the user to execute, in the Stored
Procedures folder.

5

Click the procedure, and choose Edit

Paste from the main menu to grant

permissions.

For more information, see the Sybase Central online Help.

Revoking user permissions

Any user’s permissions are a combination of those that have been granted and
those that have been revoked. By revoking and granting permissions, you can
manage the pattern of user permissions on a database.

The REVOKE statement is the exact converse of the GRANT statement. To
disallow M_Haneef from executing

my_procedure

, the command is:

REVOKE EXECUTE ON my_procedure FROM M_Haneef

This command must be issued by the DBA or by the owner of the procedure.

Permission to delete rows from

sample_table

can be revoked by issuing the

command:

REVOKE DELETE ON sample_table FROM M_Haneef

Warning!

If you revoke a user’s connect privileges, any database objects

owned by that user are deleted without warning. Likewise, if you use the stored
procedure sp_dropuser to drop a user, database objects owned by that user are
dropped without warning. To avoid this problem, remove objects owned by a
user or assign them to another user before issuing

REVOKE CONNECT

or

sp_dropuser

.

Note

Procedures like

sp_dropuser

provide minimal compatibility with

Adaptive Server Enterprise stored procedures. If you are accustomed to
Adaptive Server Enterprise (or Adaptive Server IQ 11.x) stored procedures,
you should compare their text with Adaptive Server IQ 12 procedures before
using the procedure in

dbisql

. To compare, use the command

Advertising