What does ;1 in the query sp_executesql;1 mean?

Posted on 2009-04-29
Last Modified: 2012-05-06

We're currently troubleshooting one of our SQL 2000 databases due to a significant amount of deadlocks. One of the transactions that keeps popping up in the logs is SP_EXECUTESQL;1.

What does the semicolon and 1 mean in this statement?


Question by:Aico
    LVL 40

    Expert Comment

    can you provide the comeplete statement? or script?
    LVL 51

    Accepted Solution

    You are probably seeing that as a trace or profile result (let us know where you are seeing it)...

    sp_executesql executes dynamic sql statements. The semicolun is the end of that statement and we often see a statement terminated with ;1 in the traces. It has nothing to do with the actual sp_executesql command itself.

    sp_executesql in actual usage looks like :

    sp_executesql [ @stmt = ] stmt   [, [@params=] N'@parameter_name data_type [ OUTPUT ] , [ @param1 = ] 'value1' [ ,...n ]  ]

    So, you need to look at the details for the PID of whatever process was running.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now