Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

Detach and Offline for moving databases

02 February,2015 by Tom Collins

Detach or Offline : Which is better?    

Some   SQL Server DBA use offline , others Detach in moving databases. I use either , depending on the situation.

If replication is involved I use the Offline method. Others I use Detach\Attach.

Be mindful that both methods will attempt to close the database cleanly , and close the handles. And if using the Detach method – the file ACLs can be changed

Detaching removes the SQL Server registration of the database .  One of the consequences is locations will need to be stated when reattaching.

The offline method leaves the registration unaffected, resetting to Online – allows operations to continue.

Read More on Database object management

SQL Database Status with sys.databases - SQL Server DBA

SQL Schedulers disabled - SQL Server DBA

Database server : Monitoring versus reporting - SQL Server DBA

 


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Detach and Offline for moving databases


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer