﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Rights to execute stored procedure / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 12:16:09 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>[quote][b]river1 (3/24/2010)[/b][hr]ok, thank you very much.So what is the "EXECUTE AS" for?[/quote]to execute as another database user that is not linked to a server level login</description><pubDate>Wed, 24 Mar 2010 12:13:00 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>ok, thank you very much.So what is the "EXECUTE AS" for?</description><pubDate>Wed, 24 Mar 2010 09:35:46 GMT</pubDate><dc:creator>river1</dc:creator></item><item><title>RE: Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>It is one aspect of security.  If you only grant users access to the views and stored procedures, they don't require access to the underlying tables.  It is a means of layering security.Also, by using views and stored procedures to provide access to the underlying tables, you hide the actual schema of your database.  If future changes are required to add functionality, as long as the output from the views and stored procedures remains the same, the users never have to know that the schema changed.</description><pubDate>Wed, 24 Mar 2010 09:32:24 GMT</pubDate><dc:creator>Lynn Pettis</dc:creator></item><item><title>RE: Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>hum???How is that?If a user as rights to execute the stored procedure but do not have permissions on the tables inside the stored procedure how can the procedure run if it runs in the context of the user?</description><pubDate>Wed, 24 Mar 2010 09:26:26 GMT</pubDate><dc:creator>river1</dc:creator></item><item><title>RE: Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>Should only need execute rights on the stored procedure.  There may be exceptions to that, but usuallly only if the tables in question on in another database.</description><pubDate>Wed, 24 Mar 2010 09:23:31 GMT</pubDate><dc:creator>Lynn Pettis</dc:creator></item><item><title>Rights to execute stored procedure</title><link>http://www.sqlservercentral.com/Forums/Topic888975-146-1.aspx</link><description>Hi,  I have this stored procedure:create procedure UpdateAut (@TIPO as varchar(10),@OBS as varchar(20))asbegin	declare @erro as integer		begin transaction	update consulta_contribuintes set tipo =@tipo,obs=@obs,dtaupd=getdate()	set @erro =@@error	    if @erro =0 		begin			commit transaction            insert into procedimentos_executados values (21)		end		else			rollback transaction end  I want that a user (SQL User) can execute the stored procedure, so i will give him the right to execute the procedure.Inside the procedure i insert and update values in two tables:    consulta_contribuintes    procedimentos_executados This users needs rights to in this two tables? or only needs the right to execute the procedure?Thank you</description><pubDate>Wed, 24 Mar 2010 07:54:06 GMT</pubDate><dc:creator>river1</dc:creator></item></channel></rss>