Create a new Trace In the “Events Selection” tab, click on “Show all events” and select these… Stored Procedures -> RPC:Starting Stored Procedures -> RPC:Completed TSQL -> SQL:BatchStarting TSQL -> SQL:BatchCompleted In the “Events Selection” tab, make sure the “TextData” is selected and click on “Column Filters” In the TextData column add a filter: Like %uspMySP01%... » read more
Note: Bring database OFFLINE / ONLINE should be a fast process, even for a large database. Users must be disconnected from database before setting the database to offline. Else, use ROLLBACK IMMEDIATE clause. If you run into problem with bring the database back ONLINE, try restarting SQL Server service. If part of Availability Group, need... » read more
Problem: Solution: When you have tried everything to drop the database but nothing works. Stop the SQL Server service. Manually remove the data files from drive. Restart the SQL Server service. Delete database.