Getting Line Numbers for Errors Thrown in SQL Server CLR Runtime
Posted
by fetucine53
on Stack Overflow
See other posts from Stack Overflow
or by fetucine53
Published on 2008-12-10T18:56:12Z
Indexed on
2010/03/29
22:23 UTC
Read the original article
Hit count: 402
Hi all,
I've created a CLR stored procedure that I'm running on SQL 2k5 and I'm wondering if there's any way to get line numbers for exceptions thrown by the .NET code. When an Exception is thrown, I get something along the lines of
Msg 6522, Level 16, State 1, Procedure myProcedure, Line 0 A .NET Framework error occurred during execution of user-defined routine or aggregate "myProcedure": System.Exception: testing exception System.Exception: at DummyDLL.myProcedure (String dummyInput) .
Is there some way I can load the assembly to give me specific line numbers rather than just the function in which the error was thrown? The assembly itself was compiled with a .pdb, but SQL 2k5 doesn't appear to be reading it in when I load the assembly initially.
Thanks!
© Stack Overflow or respective owner