Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7675
  • Last Modified:

How To Allow Developer To Debug In SQL Server 2012 Without Grant SysAdmin Role?

Greetings,

I have a developer that wants to debug his code and he is unable to because he does not have sysadmin which we reserve for DBA's only. Is there an alternative option so he can debug his code? We really don't want to grant developers sysadmin role for tons of security issues. I executed the GRANT EXECUTE ON sp_enable_sql_debug and it still doesn't work. Please advise.
0
Omega002
Asked:
Omega002
  • 4
  • 4
  • 2
  • +1
5 Solutions
 
tigin44Commented:
to debug a process the account must be a member of the system administrators group for the machine.
0
 
EvilPostItCommented:
What is your developer attempting to debug. If you could give me a scenario i should be able to assist with a relevant set of permissions if you are refering to SQL Server.
0
 
Omega002Author Commented:
So if I give the developer local admin rights on the Windows server he would be able to debug his SQL or are you saying sysadmin within SQL Server?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
EvilPostItCommented:
When you say debug his code, do you mean find out why his stored procedures are failing on a SQL database? So effectively run through his code being able to execute it.

It is completely dependant upon what they actually have to execute. But in all likelihood they only require SELECT, INSERT, UPDATE, DELETE, EXECUTE permissions within a specific database. All of which can be assigned at the schema level. So you wouldnt actually need to even grant dbo rights let alone sysadmin.
0
 
Omega002Author Commented:
All I have done thus far was to execute the GRANT EXECUTE ON sp_enable_debug procedure. He is using MSSQL 2012 management studio debug util and he gets the error "Execute permission denied on the object 'sp_enable_sql_debug' error. I do not want to grant him sysadmin at all so is there a work around or undocumented work around for this? Any options other than grant him sysadmin even another product perhaps so he can debug his code?
0
 
EvilPostItCommented:
Have you run this statement in the user database he is developing against or the master database?

I don't recognise that stored procedure either, is it a user one?

Any stored procedure which is named sp_* SQL Server will automatically look in the master database first. So in general is very bad practice to name them sp_
0
 
Omega002Author Commented:
So if he is running the MSSQL management studio utility against a user database not a system database then he should be able to use the SQL debugger utility?
0
 
EvilPostItCommented:
Sorry, which debugger? Could you post a screenshot?
0
 
ZberteocCommented:
Only sysadmins have the permission to execute that procedure. Having sayd that here is a link that could help:

http://msdn.microsoft.com/en-us/library/w1bhybwz(v=vs.80).aspx

The question is what is the developer trying to do? Debug how and what, programming language code or SQL code?

If is SQL code he better use a development environment database that could be on a local machine or a dedicated dev SQL server or at least instance.
0
 
Omega002Author Commented:
The developers are on a project server that is not production but we still do not want to grant them sysadmin role being that they are consultants so I wanted to know is there another option for them to debug SQL code without granting them sysadmin?
0
 
ZberteocCommented:
Definitely they don't need the sysadmin role but I don't know in what context they tried to run that procedure. As I said It all depends on what they need to do and what code do they need to debug. Please read the link I sent.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now