• Home
  • About iGeek
  • Contact Me
  • SMS Alert WordPress Plugin
  • Submit News
  • Entertainment
    • Accommodation
    • Babes
    • Cape Town
    • Cars
    • Cuisine
    • Gaming
    • Humor
    • Movies
    • Music
    • Promotions
    • Sexy
    • Sport
    • Television
  • My Life
    • People
    • Personal
    • Work
  • News
    • Local News
    • World News
  • Technology
    • Android
    • Applications
    • Blogging
    • Broadband
    • Code
    • Gadgets
    • Internet
    • Linux
    • Mobile
    • Pay-TV
    • SEO
    • Social Networking
    • Telecoms
    • Wireless




MSSQL 2005 Drop all database connections

Posted on June 16, 2009 in Code by Gerhard | No Comments » 

So after some struggling with Microsoft SQL Server 2005 not allowing me to run a script that drops a database and recreates it again because there is still active connections on the database I came up with this solution.


USE master
GO
ALTER DATABASE database name
SET OFFLINE WITH ROLLBACK IMMEDIATE
ALTER DATABASE database name
SET ONLINE

Liked this post? Share it!
Publish MSSQL 2005 Drop all database connections to muti Tweet MSSQL 2005 Drop all database connections Stubmle MSSQL 2005 Drop all database connections Share MSSQL 2005 Drop all database connections on Facebook Submit MSSQL 2005 Drop all database connections to reddit Email MSSQL 2005 Drop all database connections to a friend

Article by Gerhard

Gerhard is the owner and founder of iGeek, most of his time he spends writing poetic PHP code, spreading technology news and thinking of new tech startup ideas.

Gerhard has written 398 awesome articles.

Related Posts

None

Leave a Reply

  • Vote for iGeek Blog
  • iGeek on Facebook
  • Competition SMS Alerts

    Mobile Number
    +

    Change Country

      Unsubscribe
    No spam or subscription fees
  • Tag Cloud

    2010 action movies adsl Afrihost Aggregation Amatomu Android Apple babe blog blogging Blogs Cape Town cheap dstv facebook film reviews free google Google Buzz HTC Hero Internet iPad iPhone launch live microsoft Mobile movie reviews multichoice MyScoop rain samsung Sexy Smartphone Social Networking South Africa twitter Uncapped video Vodacom weather win WordPress World Cup

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • What the readers say

    • Craig on Goodbye Resume, Hello Blog
    • Craig on 5 of the Best SEO WordPress Plugins
    • Craig on Salt Review
    • darylhb on Salt Review
    • ROI_Media (ROI Media) on 5 of the Best SEO WordPress Plugins
    • Craig on Salt Review
    • Mike Hunt on Telkom 10Mbps ADSL Line Upgrade in Progress
    • Simone on Salt Review
    • Gerhard on Uncapped Internet now affordable in South Africa
    • shamiel mohamed on Uncapped Internet now affordable in South Africa
  • Blogroll

    • 2OceansVibe
    • Captain Awsome
    • iMod
    • Jonathan Carter
    • Nick Duncan
    • Pieter Malherbe
    • Stu's take on…
    • ZEF
  • Most Popular

    • HTC Desire and Legend confirmed for South Africa
    • SMS Alert WordPress Plugin
    • MultiChoice launches new cheaper HD PVR decoder
    • Uncapped Internet now affordable in South Africa
    • Who wants a Google Wave invite?
About iGeek | Contact Me | SMS Alert WordPress Plugin

Copyright 2009-2010 www.igeek.co.za
myScoop Afrigator