2018年9月19日 星期三

sql 2008 reportdb detach

What does “Drop Connections” and “Update Statistics” in the “Detach Database” dialog do?

Drop Connections will force the database into Single User mode before detaching the database, thereby forcing all users to disconnect. If you don't check-mark that option, and users are connected to the database, the database will not be detached.

Update Statistics will refresh any out of date statistics before detaching the database. If you leave this option un-checked, statistics objects will remain as they were at the time you detached the database

在 SQL Server 中如何成功卸離資料庫


同場加映

How long will a database detach take?

Pareng Joseph...musta na?ang dbWizards?

A detach time depends on how big the database is.  In our environment (average 50-100GB database size) we don't do detach regularly as it takes on the average 5-20 mins.  You mentioned that your transaction log files grow very big.  There are a lot of reasons why the database files grow very big.  A few of them are:

• Uncommitted Transactions
• Extremely Large Transactions
• Operations: DBCC DBREINDEX and CREATE INDEX
• While Restoring from Transaction Log Backups
• Client Applications Do Not Process All Results
• Queries Time Out Before a Transaction Log Completes the Expansion and You Receive False 'Log Full' Error Messages
• Unreplicated Transactions

What we do is we monitor the databases on what is causing the transaction log file of a database to grow unexpectedly.  After finding the root cause, we resolve accordingly.  A recent issue in our environment indicates that the application codes are not committing transactions properly.  So we asked our application vendor to modify the application which eventually solved the problem.

For more details on transaction log files growing unexpectedly, see http://support.microsoft.com/kb/317375/