Re: t-sql to drop database unconditionally
From: John Grandy (johnagrandy-at-yahoo-dot-com)
Date: 05/05/05
- Next message: Michael C#: "Re: Please Help: Someone is hacking my server!"
- Previous message: Mike Epprecht \(SQL MVP\): "Re: SQL2K domain auth fails on Win2K3/SP1"
- In reply to: Mike Epprecht \(SQL MVP\): "Re: t-sql to drop database unconditionally"
- Next in thread: Cindy Gross: "Re: t-sql to drop database unconditionally"
- Reply: Cindy Gross: "Re: t-sql to drop database unconditionally"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 4 May 2005 15:27:37 -0700
But I don't care, because as soon as I kill ALL the databases (distribution,
publishers, subscriber) -- no matter what state they are in -- I am going to
re-create/re-deploy ALL databases from scratch.
I don't care about losing any data. I just want to nuke everything.
How do I kill the users?
"Mike Epprecht (SQL MVP)" <mike@epprecht.net> wrote in message
news:e%23xkaaPUFHA.3840@tk2msftngp13.phx.gbl...
> Hi
>
> Cope all those into your code. There is not direct way to do this. The
> checks are in place to protect the database.
>
> In the case of replication, the distribution DB would be a total mess if
> you just removed a DB that was involved in replication.
>
> Run the replication removal SP's
> Kill the users
> etc
>
> --
> --------------------------------
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
>
> IM: mike@epprecht.net
>
> MVP Program: http://www.microsoft.com/mvp
>
> Blog: http://www.msmvps.com/epprecht/
>
> "John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:eQ4h7APUFHA.3636@TK2MSFTNGP14.phx.gbl...
>> does anyone know the T-SQL to drop a database unconditionally -- even if
>> it is participating in replication, has uncommitted transactions, has
>> users with open connections, etc.
>>
>
>
- Next message: Michael C#: "Re: Please Help: Someone is hacking my server!"
- Previous message: Mike Epprecht \(SQL MVP\): "Re: SQL2K domain auth fails on Win2K3/SP1"
- In reply to: Mike Epprecht \(SQL MVP\): "Re: t-sql to drop database unconditionally"
- Next in thread: Cindy Gross: "Re: t-sql to drop database unconditionally"
- Reply: Cindy Gross: "Re: t-sql to drop database unconditionally"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|