October 23, 2013 at 11:11 pm
Hi,
Kindly advice the same How to remove/ Delete Transaction Log from SQL Server 2008 R2. as previously we are using SQL Server 2000 Detach database and remove log file then attach. But in SQL Server 2008 R2 not able to do the same.
Regards,
Sanjay Thakur
Database Administrator
October 24, 2013 at 12:50 am
Why would you want to delete a transaction log?
You can still attach a database without a transaction log.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 24, 2013 at 4:43 am
Sanjay Thakur-488205 (10/23/2013)
Hi,Kindly advice the same How to remove/ Delete Transaction Log from SQL Server 2008 R2. as previously we are using SQL Server 2000 Detach database and remove log file then attach.
You basically you want to manage the log.
YOu should spend time here http://www.sqlservercentral.com/articles/Stairway+Series/98295/
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
October 24, 2013 at 5:50 am
All databases must have a transaction log, even on SQL Server 2000. Are you trying to remove a log file you are no longer using, but there will still be another log file available? If so, you may have transactions in the log you're trying to detach. If your database is in Simple recovery, try running the command CHECKPOINT and see if you can then detach the log. If your database is in FULL recovery you'll need to run a log backup, then run CHECKPOINT and then, probably, run another log backup. But, that all assumes you're trying to remove one of many log files, not the only log file on the database.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 24, 2013 at 7:14 am
Sanjay Thakur-488205 (10/23/2013)
Kindly advice the same How to remove/ Delete Transaction Log from SQL Server 2008 R2. as previously we are using SQL Server 2000 Detach database and remove log file then attach. But in SQL Server 2008 R2 not able to do the same.
Short answer. Don't.
The transaction log is not an optional part of the database, it's critical and it's what ensures transactional and structural integrity. Deleting the log could easily result in a database that's transactionally inconsistent, structurally inconsistent or completely unusable.
Deleting a log is one of the worst things you can do to a database
http://sqlinthewild.co.za/index.php/2009/06/09/deleting-the-transaction-log/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply