Drops an extended stored procedure.
|Applies to: SQL Server (SQL Server 2008 through current version).|
sp_dropextendedproc [ @functname = ] 'procedure'
[ @functname =] 'procedure'
Is the name of the extended stored procedure to drop. procedure is nvarchar(517), with no default.
0 (success) or 1 (failure)
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.
In SQL Server 2016sp_dropextendedproc does not drop system extended stored procedures. Instead, the system administrator should deny EXECUTE permission on the extended stored procedure to the public role.
sp_dropextendedproc cannot 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.
USE master; GO EXEC sp_dropextendedproc 'xp_hello';