DevPinoy.org
A Filipino Developers Community

>>> First two to make 3 wins! <<<

Debugging stored procedures on SQL Server 2005

My current task in our project is majorly in MSSQL.  I wanted to debug a chain of stored procedures and I have just found out that MS has removed debugging tools out of SQL Server 2005 client tools and relied more on visual studio's.  I have experienced debugging both from SQL Server 2005 Query Analyzer and from VS 2003 and I favor that of visual studio.  Back then the stored proc was constructing a dynamic sql statement (don't ask! ;p)  and visual studio watches can cater for long strings (yeah it sounds messy) compared to query analyzer which just truncates it to its max capacity.

Our usual setup in my past companies is we usually have a local sql server database (developer edition) on our boxes and the build server also has its own.  Of course we are administrators of our local databases so debugging is not an issue. 

Stored procedure debugging for SQL Server 2000 needs execute permission on master.sp_sdidebug.  However for SQL Server 2005, they have renamed it to sp_enable_sql_debug.  And guess what, you have to be a member of sysadmin role in order for you to debug SQL Server 2005 stored procedures, wth! 

We can't have sysadmin roles in our current setup where development databases are in a farm and we usually are just dbo's of just our project databases.  <sigh>

More info here: http://blogs.msdn.com/sqlclr/archive/2006/07/07/659332.aspx

 


Posted 09-26-2007 12:41 PM by jokiz
Filed under: , ,

Comments

Raja wrote re: Debugging stored procedures on SQL Server 2005
on 11-12-2007 9:43 AM

I found a good step wise tutorials on "Debugging Stored Procedures in SQL Server 2005"

See it

www.dotnetfunda.com/.../article27.aspx

Lipitor. wrote Lipitor.
on 07-17-2008 10:43 PM

Generic lipitor. Is lipitor best for brain lesions. Lipitor dosage morning or night. Generic version of lipitor. Lipitor.


Copyright DevPinoy 2005-2008