Objetos

Tipos de Permissões

Select

The right to select data. Select permission can be applied to specific columns

Insert

The right to insert data

Update

The right to modify existing data. Update rights for which a WHERE clause is used require select rights as well. Update permission can be set on specific columns.

Delete

The right to delete existing data

References

The References permission on a table is needed to create a FOREIGN KEY constraint that references that table

Execute

The right to execute stored procedures or user-defined functions

GRANT

Sintaxe:

GRANT Permissions, … , …
ON Object
TO User/role, User/role
WITH GRANT OPTION

Permissions: ALL, SELECT, INSERT, DELETE, REFERENCES, UPDATE, or EXECUTE

WITH GRANT OPTION: Indicates that the grantee will also be given the ability to grant the specified permission to others.

Revoke, Deny

Revoke e Deny têm sintaxes similares ao GRANT

Se o Grant incluiu “WITH GRANT OPTION”

  • Então temos de remover permissões em cascata (Cascade)

Deny é a ação oposta ao Grant: remove explicitamente uma permissão.

  • Que se sobrepõem a um eventual Grant “sobreposto”

Devemos “anular” um Grant ou Deny com um Revoke.

Last updated