22,209
社区成员
发帖
与我相关
我的任务
分享
Possible Solutions
1. Must use drop trigger before dropping the database
Example:
---Dropping of myTempDB database
USE master
GO
--Drop thhe Trigger
DROP TRIGGER Trg_Temp ON ALL SERVER
--Drop the database
DROP DATABASE myTempDB
GO
2. If we don't give the Drop Trigger, we cannot login to the sql server database.
3. The fix is to use DAC (Using a Dedicated Administrator Connection to Kill Currently Running Query.)
4. Using windows authentication do the following
a. Connect to sql server using windows authentication
b. Goto command prompt
c. Type the following
C:\Documents and Settings\Manager> sqlcmd -S LocalHost -d master -A
DROP TRIGGER Trg_Temp ON ALL SERVER
GO
The -d option will enable us to directly login to the database