Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 2.49 KB

sp-dropextendedproc-transact-sql.md

File metadata and controls

77 lines (53 loc) · 2.49 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_dropextendedproc (Transact-SQL)
sp_dropextendedproc drops an extended stored procedure.
markingmyname
maghan
randolphwest
08/22/2024
sql
system-objects
reference
sp_dropextendedproc
sp_dropextendedproc_TSQL
sp_dropextendedproc
TSQL

sp_dropextendedproc (Transact-SQL)

[!INCLUDE SQL Server]

Drops an extended stored procedure.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_dropextendedproc [ @functname = ] N'functname'
[ ; ]

Arguments

[ @functname = ] N'functname'

The name of the extended stored procedure to drop. @functname is nvarchar(517), with no default.

Return code values

0 (success) or 1 (failure).

Result set

None.

Remarks

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.

Permissions

Only members of the sysadmin fixed server role can execute sp_dropextendedproc.

Examples

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
EXEC sp_dropextendedproc 'xp_hello';

Related content