Monday, March 12, 2012

How long will a database detach take?

Hello Everyone,

Does anyone know how to calculate for the time it will take for a database to get detached if a detach command is invoked?

We have an extremely large database and often the log file grows too big that the only way to reduce it is by detaching the database itself. It would be nice if we could calculate how long our database would take to finish detaching.

Thanks,

Joseph

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/

No comments:

Post a Comment