Partilhar via


How to: Delete a Stored Procedure (SQL Server Management Studio)

New: 5 December 2005

This topic describes how to delete a stored procedure by using Object Explorer in SQL Server Management Studio.

Important

Deleting a stored procedure can cause dependent objects and scripts to fail when the objects and scripts are not updated to reflect the changes that have been made to the stored procedure. For more information, see How to: View the Dependencies of a Stored Procedure (SQL Server Management Studio).

To delete a stored procedure

  1. In Object Explorer, connect to an instance of SQL Server 2005 Database Engine and then expand that instance.

  2. Expand Databases, expand the database in which the stored procedure belongs, and then expand Programmability.

  3. Expand Stored Procedures, right-click the procedure to remove, and then click Delete.

  4. To view objects that depend on the stored procedure, click Show Dependencies.

  5. Confirm the correct stored procedure is selected, and then click OK.

  6. Remove the stored procedure name from dependent objects and scripts.

See Also

Tasks

How to: Create a Stored Procedure (SQL Server Management Studio)
How to: Modify a Stored Procedure (SQL Server Management Studio)
How to: Rename a Stored Procedure (SQL Server Management Studio)
How to: View the Dependencies of a Stored Procedure (SQL Server Management Studio)

Concepts

Deleting Stored Procedures

Other Resources

Stored Procedure How-to Topics
DROP PROCEDURE (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance