Monday, September 23, 2013

Hi, can you grant me the permission to use the Transact-SQL Debugger?....... NO.

This post was formerly published at my beloved old blog "On the quest of a DBA's adventure......"

One day, a developer comes over to my desk. He starts with

Developer: Hi there, it would be nice if I can use the Transact-SQL Debugger built inside the Management Studio. Can I have that?

Me: What is stopping you from using it? it works fine at my end....

Developer: Well, the server compliant on EXECUTE permission on the stored procedure called "sp_enable_sql_debug".

Me: Really? let me have a look......

My friends, Transact-SQL Debugger is a good tool for developer to debug their TSQL work; And yes, it is a tools designed for developer, for development. The idea that to use the tool in the production is quite evil indeed because of the requirement in order to use it. Here is the link listed the Microsoft's requirement for the debugger to work: Configuring the Transact-SQL Debugger

Look at the bottom, it said:

Requirements for Starting the Debugger

All attempts to start the Transact-SQL debugger must also meet the following requirements:

  • SQL Server Management Studio or SQL Server Data Tools must be running under a Windows account that is a member of the sysadmin fixed server role.
  • The Database Engine Query Editor window must be connected by using either a Windows Authentication or SQL Server Authentication login that is a member of the sysadmin fixed server role.
  • The Database Engine Query Editor window must be connected to an instance of the Database Engine from SQL Server 2005 Service Pack 2 (SP2) or later. You cannot run the debugger when the Query Editor window is connected to an instance that is in single-user mode.

Well, it may be because Microsoft's design principal dictates that no debugging should happen in production. Now, thanks to Microsoft, I can't make friend with developers.

No comments:

Post a Comment