Re: doing select without grant



Roy Goldhammer (roy@xxxxxxx) writes:
I have store procedure with dinamic sql which run select from 2 tables.

I want my users to run my store procedure without granting the select on
them.

How can i do it?

If you are on SQL 2000, forget about it.

If you are on SQL 2005, sign the procedure with a certificate and
grant permission to a created from the certificate. Details here:
http://www.sommarskog.se/grantperm.html


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Auditing and IP addresses
    ... Create a certificate and which you sign the trigger with. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: Retrieving Devices thru xp_Availablemedia in 2005 without SA role
    ... certificate, and sign the procedure with the certificate. ... and grant that login VIEW SERVER STATE (which I ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: sql query which has got 3 dynamic parameters
    ... have a store procedure to which I pass a number which will give me a ... say if I type exec SP_FETCH_ROWS 1 ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: dbrpcparam datalen problem
    ... I tried to use it for the store procedure call: ... and which the version of SQL Server following SQL 2008 will not support. ... not support features added in later versions. ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • ADOConnection TimeOut 30 second, no way to change it ???
    ... i use ADOConnection component to connect to SQL Server and using TQuey to ... When i execute the store procedure, it look like the setting is no effect ...
    (borland.public.delphi.database.ado)