Removes a procedure.
drop proc[edure] [owner.]procedure_name [, [owner.]procedure_name] ...
drop procedure showind
drop procedure xp_echo
drop procedure drops user-defined stored procedures, system procedures, and extended stored procedures (ESPs).
The SAP ASE server checks the existence of a procedure each time a user or a program executes that procedure.
drop proc orderproc
drop procedure orderproc;2
You cannot drop extended stored procedures as a procedure group.
sp_helptext displays the procedure’s text, which is stored in syscomments.
sp_helpextendedproc displays ESPs and their corresponding DLLs.
Dropping an ESP unregisters the procedure by removing it from the system tables. It has no effect on the underlying DLL.
drop procedure drops only user-created stored procedures from your current database.
See also sp_depends, sp_dropextendedproc, sp_helptext, sp_rename in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for drop procedure differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the procedure owner or a user with drop any procedure privilege. |
Disabled | With granular permissions disabled, you must be the procedure owner or a user with sa_role. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 28 |
Audit option | drop |
Command or access audited | drop procedure |
Information in extrainfo |
|