Link to home
Start Free TrialLog in
Avatar of jasonbrandt3
jasonbrandt3

asked on

SQL debugging question

I created a large SQL procedure.  I've found a few errors I need to correct.  Is there a way to step through line by line in SQL Server 2005.  If not, how can I debug line by line to see what is causing an error.  SQL Server Profiler?  Thanks!!!
Avatar of Aneesh
Aneesh
Flag of Canada image

sql 2005 wonrt support debugging feature. you have use print statements for each and every line
When you run the procedure you should be getting bunch of error messages in the result pane/message window below. It points on which line the error occured. You can go through that to look at the errors line by line.
P.
Avatar of jasonbrandt3
jasonbrandt3

ASKER

I'm using some cursors, I'm trying to figure out which record is causing a foreign key error, that's why I would like to step through.  So there is no way to step through the sql code?
ASKER CERTIFIED SOLUTION
Avatar of pssandhu
pssandhu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial