Debugging SP Issues with Dynamic SQL

  • I've been tasked with using a new stored procedure in one of our third-party provided databases. It's not our code and has never been used before. It's also 7000 lines (yey! :-D). The procedure simply takes data from source tables and dumps them into tables in the third-party DB. I'm working on creating data in those source tables and then running it with the necessary parameters. Unfortunately, it's a huge and ugly stored procedure with a massive amount of parameters for error checking, logging, etc. It's also poorly commented on.

    While I understand what the SP does, and I believe I have the data inserted correctly, the data is not being moved to the tables as expected. My guess is that I may have a parameter inserted incorrectly. I'm attempting to determine where exactly the problem is so I am using the debugger. Unfortunately, when it gets to a section which executes another SP with dynamic SQL, it freezes. Is this a common occurrence? Does anyone have any recommendations as to how to deal with this? Keep in mind that when I run the stored procedure, it does complete.

  • So, no resolution yet guys so I've decided to just Step Over those dynamic sql statements for now. It's not a resolution but at least it doesn't freeze.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply