What are Extended Stored Procedures? RRS feed

  • Question

  • Can some one help me in understanding the concept of Extended SPs?

    Thanks in advance


    Monday, June 7, 2010 6:14 AM


  • Books Online says it best (http://msdn.microsoft.com/en-us/library/ms175200.aspx):


    Extended stored procedures let you create your own external routines in a programming language such as C. The extended stored procedures appear to users as regular stored procedures and are executed in the same way. Parameters can be passed to extended stored procedures, and extended stored procedures can return results and return status.

    Extended stored procedures are DLLs that an instance of SQL Server can dynamically load and run. Extended stored procedures run directly in the address space of an instance of SQL Server and are programmed by using the SQL Server Extended Stored Procedure API.


    Typically, these extended stored procedures are prefixed with xp_, but this is not mandatory.  Many DBAs have an aversion to running code directly in SQL Server's memory space, as poorly written code can destablise the SQL Server instance.

    CLR integration is the replacement for XPs.

    • Proposed as answer by TiborKMVP Monday, June 7, 2010 6:59 AM
    • Marked as answer by Sankar Reddy Friday, June 11, 2010 5:04 AM
    Monday, June 7, 2010 6:22 AM