SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 stored proc. debug iin visual studio style
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arkiboys
Flowing Fount of Yak Knowledge

1418 Posts

Posted - 03/10/2013 :  14:50:58  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3712 Posts

Posted - 03/10/2013 :  17:04:18  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

1418 Posts

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

arkiboys
Flowing Fount of Yak Knowledge

1418 Posts

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

bandi
Flowing Fount of Yak Knowledge

India
2218 Posts

Posted - 03/11/2013 :  06:10:08  Show Profile  Reply with Quote
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 - 03/11/2013 :  12:51:10  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3712 Posts

Posted - 03/11/2013 :  13:03:53  Show Profile  Reply with Quote
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 - 03/11/2013 :  14:14:06  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000