17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 – Data Classification and Roles• SELECT permissions – when granted, allows the user to execute theSELECT queries against a table, view or table-valued user definedfunction. The SELECT query retrieves rows of data.• INSERT permissions – when granted, allows the user to executeINSERT statements against a table, view or table-valued user definedfunction in order to add rows of data.• UPDATE permissions – when granted, allows the user to executeUPDATE statements against a table, view or table-valued user definedfunction in order to change values contained within existing columnsof data.• DELETE permissions – when granted, allows the user to executeDELETE statements against a table, view or table-valued user definedfunction in order to remove rows of data.• EXECUTE permissions – when granted, allows the user to execute astored procedure or scalar-valued user defined function. If the databaseobjects that are contained within the stored procedure have theidentical owner as the stored procedure, the explicit granting ofpermissions to these underlying database objects are not required. Thisis known as ownership chaining.• REFERENCES permissions – when granted, allows the user to create aforeign key constraint to a table, view or table-valued user definedfunction.• ALL permissions – when granted, this provides all of the ANSI-92permissions that are applicable for the given database object. Forexample, when ALL is granted to a stored procedure only EXECUTE isgranted; but when applied to a table DELETE, INSERT, REFERENCES,SELECT and UPDATE are granted.These permissions can be granted to database users, database roles and serverroles by using the GRANT statement in SQL Server Management Studio. Thefollowing is an example of the syntax of this statement:GRANT [Permissions] ON [Object] TO [Security Account]This statement's arguments are:• Permissions: The actions the security account can perform. Theoptions for tables, table-valued user defined functions or views are:SELECT INSERT, UPDATE, DELETE and REFERENCES. The optionsfor scalar-valued user defined functions are: EXECUTE andREFERENCES. The only option for a stored procedure is EXECUTE.48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!