Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 stored proc. debug iin visual studio style

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2013-03-10 : 14:50:58
Hi,
Is there a way to debug and step through a stored proc even if the user is NOT an admin user.
If so, how is this done in VS please?
Thanks

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-03-10 : 17:04:18
You don't have to be an admin user, but you will need View Definition permission on the stored procedure.

This link shows you how to use VS 2010 to debug: http://support.microsoft.com/kb/316549
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2013-03-11 : 04:43:45
What/whete do you set view definition permission?
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2013-03-11 : 04:49:09
What/whete do you set view definition permission?
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-03-11 : 06:10:08
To set View Permission on a particular Stored Procedure
In SQL Management Studio,
1) Right-click on that specific Stored Procedure
2) Go to Properties
3) Select Permissions Option
4) Add permissions by selecting Search button

Check this link to set View Definition permission through query...
http://sqlserverimpressions.blogspot.in/2008/10/grant-permissions-to-view-stored.html

--
Chandu
Go to Top of Page

skc18
Starting Member

9 Posts

Posted - 2013-03-11 : 12:51:10
Bandi,
I am using SQL 2005.

Followed intructions of yours to add permissions on particular SPRoc, and tried to open sproc using VS 2005 as indicated on microsoft support website.

But I am receiving an error message.


The error message is

User could not execute Stored Procedure 'master.dbo.sp_enable_sql_debug' on Sql Sever (Server Name). Click for more information.

Could you please let me know what the error might be?
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-03-11 : 13:03:53
You need execute permissions as well. Follow the instructions Chandu posted at 03/11/2013 : 06:10:08, but add Execute Permission in addition to View Permission.
Go to Top of Page

skc18
Starting Member

9 Posts

Posted - 2013-03-11 : 14:14:06
James, even when adding Execute permission on the Stored Proc along with View definition,I'm receiving same error message. :(

Go to Top of Page
   

- Advertisement -