SQL Server 2005 | Database won’t go Offline

I needed to copy a database from SQL Server 2005. To copy it, you need to put the database offline but sometimes it takes too long to go offline and even fails.

The problem might be that the database would still have active connections. Thus to solve this problem you need to:

  • Right click on Database
  • Select Tasks
  • and click Detach

In the message part you’ll notice that there are a number of active connections. Click on the Active Connections link and a list of all connections is loaded.. right click each connection and click kill process. Make sure that tell the people of whom you’re killing their process to save everything else they might lose some work.

Now try again putting the database offline and it should work immediately.

Happy Database Copying 🙂

Ps. To take the database offline

  • Right Click on Database
  • Select Tasks
  • and Click Take Offline
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s