O'Reilly logo

Writing Stored Procedures for Microsoft SQL Server by Matthew Shepker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required