Friday, February 24, 2012
Debugging SPs and triggers in VS2005
which performs a DISABLE TRIGGER ALL on table A, does some actions then
finally does an ENABLE TRIGGER ALL.
This works fine normally except, when I'm stepping through the SP code, the
entire IDE hangs when executing the DISABLE TRIGGER. Presumably this is
because the debugging process is preventing the trigger from disabling
because it is still technically executing. I guess that is understandable!
Is this expected behaviour? Likely to ever change?
Thanks in advance.
regards,
Paul Ritchie.
New Zealand.Why would you need to disable a trigger during its execution? Do you also pu
t
the database in single-user mode at the same time?
ML|||So I can insert another record in the same table.
Thanks for the sarcasm - much appreciated. If you don't know the answer
then why bother?
Paul.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:FD1BB005-A3DD-42F7-A42D-9435424D9DE3@.microsoft.com...
> Why would you need to disable a trigger during its execution? Do you also
> put
> the database in single-user mode at the same time?
>
> ML|||If recursion is the problem turn that off. I'm not being sarcastic. A
disabled trigger will allow other users to insert data into the table while
by-passing your procedure.
ML
Friday, February 17, 2012
Debug tsql
only few actions i could able to perform on the code,like execution,set break points.
step in and step out is not enabled.Is there any option to enable it..There is no "debug" of stored procs or in query analyzer. You will need to cut it down, exectue it line by line and use print statements, etc to see what is going on.
Are you getting an error?
If you post the stored proc here, someone might help you.|||
>>There is no "debug" of stored procs or in query analyzer
Are you sure?
Hit F8 this will open up the Object Browser, navigate to the proc, right click on the proc and select debug
Denis the SQL Menace
http://sqlservercode.blogspot.com/
Also, I might be wrong, but I think he said in one of the prior questions, he was using SQL 2000.|||
I am talking about query analyzer (SQL 2000)
Here I took a screen shot of it
http://tinypic.com/view/?pic=44hvq7a
Right click on the procedure and the last thing in the menu should be debug
Denis the SQL Menace
http://sqlservercode.blogspot.com/
|||Ohhhh. You are correct. I had never tried that method.That does give a simple debugger version that might do what he wants.|||Even if you were wrong about the existance of the debugger, I far prefer your original technique :)|||what is the solution for my problem..