Table Permissions

  • Is there a script out there that will set table permissions for my users, rather than me having to use the GUI to check the Select, Insert, and Update permissions? Any help will be greatly appreciated.

  • Best practice is to use stored procedures and only grant users EXECUTE permission rather than table permissions, but you can grant permissions at the database level using GRANT or by right-clicking the database in SSMS, selecting Properties, then selecting Permissions. Permissions granted this way affect all tables in the database.

    Greg

  • I am new to SQL Server and can certainly navigate through the GUI, as you instructed, but I would really like to learn how to setup a stored procedure. Where should I start? Thanks for all your help.

  • I tried testing the db permission "Execute", but it returns an error stating that the user does not have Select permissions on the table.

  • So, you must have figured out how to create a stored procedure. The procedure and the tables is accesses must have the same owner. In our shop, all database objects are owned by dbo.

    Greg

  • In order to test, I just followed your instructions using the SSMC. I still don't know how to create a stored procedure. Any help would be greatly appreciated

  • Okay, sorry. The EXECUTE permission pertains to being able to execute stored procedures.

    I don't write a lot of stored procedures myself as that's done mostly by the developers here. You can get a template by right-clicking on Stored Procedures in a database in SSMS and selecting new stored procedure. You basically want to put any code that will directly access tables i.e. SELECT, DELETE, INSERT, UPDATE in stored procedures.

    There are lots of books and articles about writing efficient stored procedures and BooksOnLine is a great resource.

    Greg

  • I appreciate all your help. Thanks.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply