Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

How to list Extended stored procedure for public

09 August,2017 by Tom Collins

Extended stored procedures are used by developers to create routines. One of the main benefits of extended stored procedures is the ability to make  them appear as regular stored procedures.

i.e input parameters can be sent by the calling application , and result sets are returned.

SQL Server is installed with a bunch of extended stored procedure with permissions granted to public. You’ll recognise quite a few including : sp_cursor, sp_cursor_open ,sp_executesql . There are about 80 of them installed  with public permissions.

Microsoft announced to extended stored procedures will be deleted in future versions , so if you’re a developer think of using CLR integration . Also, you’ll need to start planning of converting the extended stored procedure to CLR Integration method.

This query lists extended stored procedures with permissions granted to public


SELECT AS [Extended Stored Procedure]
             , USER_NAME(SPO.grantee) AS [Grantee]

    FROM    master.dbo.sysobjects AS SO
            INNER JOIN master.dbo.syspermissions AS SPO

    WHERE   (SO.type = 'X')



Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on How to list Extended stored procedure for public | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer