Stored Procedures as a Security Mechanism

Using stored procedures as a security mechanism is one way you can provide security for your application. As with all database applications, you first have to create the tables that will track your data. When the tables are created, you must then create stored procedures for every data action that you will make on those tables. For example, if you have a table from which you will always insert and delete data, you must create one stored procedure that inserts data and one stored procedure that deletes data. After you create all the requisite stored procedures, you give your users permissions to execute those stored procedures and revoke all INSERT, UPDATE, and DELETE privileges to the underlying tables. ...

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.