What should you do to ensure that users can execute the stored procedures?

You are a database developer. You develop solutions by using SQL Server 2008 in an enterprise environment. You plan to create a stored procedure that queries a sales table and produces forecast data. You do not have administrative permissions, and you are not the owner of the database. You have permissions to create stored procedures. Users will only have permissions to execute your stored procedures. You need to ensure that users can execute the stored procedures. What should you do?

You are a database developer. You develop solutions by using SQL Server 2008 in an enterprise environment. You plan to create a stored procedure that queries a sales table and produces forecast data. You do not have administrative permissions, and you are not the owner of the database. You have permissions to create stored procedures. Users will only have permissions to execute your stored procedures. You need to ensure that users can execute the stored procedures. What should you do?

A.
Set the TRUSTWORTHY property of the database to ON.

B.
Include an EXECUTE AS OWNER clause when you create each stored procedure.

C.
Include an EXECUTE AS CALLER clause when you create each stored procedure.

D.
Include a SETUSER statement before you query the sales table in each stored procedure.



Leave a Reply 0

Your email address will not be published. Required fields are marked *