How to Debug Store Procedure in Sql Server 2005

  • Hello All,

    Greetings.

    I have serious problem while dealing with Stored Procedure in Sql server 2005. I knew how to debug the SP in sql server 2000. in Query Analyzer right clicking the SP name and selecting the Debug option. But i don't know about how to debug it in Sql Server 2005. Can anyone please tell me in detail how to do it.

    Please tell me urgently.

    Thanks in Advance

    Abhay

  • Hi, You can using the Visual Studio.

    Bye...

  • Thanks for your coments.

    can you please tell me how to debug it in Visual studio. As i don't have any idea relating to it. Please guide me.

    Thanks in Advance

    Abhay

  • To get started, you might try:

    Make a new project in Vis Studio, choose other project types, then database. (Note I am using VS 2005)

    Create a database reference when prompted (or right click on database reference in Solution Explorer)

    Fill in the dialogue boxes to specify the sql server and database you want to use.

    Then look in the Server Explorer, expand Stored Procs container, and pick the stored proc you want. Right click on that and Step Into proc.

    That should get you started.

    For some reason I suddenly have the paranoid feeling that everyone will now post better replies which need less mouse clicks or whatever! 🙂

  • Well thanks Paul. I have been waiting for this reply since last 2 months. thanks a lot.

    Abhay

  • Hi,

    I dont see the 'step into' option and I also dont see the database in th e'other projects' when I try to create new project in VS2005. Obviously I am missing stuff. Can you tell what?

    Sandeep


    Kind Regards,

    Sandeep Kataria

  • Hi,

    Login as Windows Authentication then try for Debug.

  • Thanks Kumar but I am logging in with windows authentication...

    Sandeep


    Kind Regards,

    Sandeep Kataria

  • Hi Sandeep,

    You can Click on "View" menu and can select "Sever Explorer" option from it. From there you can connect to your Server by giving correct credentials. After that the Server Explorer will appear at the left side of the window.

    You can select any "Blank Solution" and can follow the steps. After getting the "Server Explorer" you can expand the "Stored Procedure" option and can select the specific Stored Procedure and right click the mouse and select "Open" option. Which will open your Stored Procedure in Editable window. After that you can select "Debug" menu option and click on "Start Debugging".

    Hope this can solve your problem.

    Bye

    Abhay

Viewing 9 posts - 1 through 8 (of 8 total)

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