| title | sp_dropextendedproc (Transact-SQL) | ||
|---|---|---|---|
| description | sp_dropextendedproc drops an extended stored procedure. | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.reviewer | randolphwest | ||
| ms.date | 06/23/2025 | ||
| ms.service | sql | ||
| ms.subservice | system-objects | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server]
Drops an extended stored procedure.
Note
[!INCLUDE ssNoteDepFutureAvoid] Use Common language runtime (CLR) integration instead.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_dropextendedproc [ @functname = ] N'functname'
[ ; ]
The name of the extended stored procedure to drop. @functname is nvarchar(517), with no default.
0 (success) or 1 (failure).
None.
Executing sp_dropextendedproc drops the user-defined extended stored procedure name from the sys.objects catalog view, and removes the entry from the sys.extended_procedures catalog view. This stored procedure can be run only in the master database.
sp_dropextendedproc doesn't drop system extended stored procedures. Instead, the system administrator should deny EXECUTE permission on the extended stored procedure to the public role.
sp_dropextendedproc can't be executed inside a transaction.
Only members of the sysadmin fixed server role can execute sp_dropextendedproc.
The following example drops the xp_hello extended stored procedure. This extended stored procedure must already exist, or the example returns an error message.
USE master;
GO
EXECUTE sp_dropextendedproc 'xp_hello';