Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to remove Transaction Log from SQL Server 2008 R2 Expand / Collapse
Author
Message
Posted Wednesday, October 23, 2013 11:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 23, 2013 11:51 PM
Points: 9, Visits: 35
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
Post #1507876
Posted Thursday, October 24, 2013 12:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:54 AM
Points: 13,568, Visits: 10,445
Why would you want to delete a transaction log?

You can still attach a database without a transaction log.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1507890
Posted Thursday, October 24, 2013 4:43 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 12:26 AM
Points: 2,840, Visits: 3,963
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
Post #1507965
Posted Thursday, October 24, 2013 5:50 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 8:03 AM
Points: 15,637, Visits: 28,021
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
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1507985
Posted Thursday, October 24, 2013 7:14 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:54 AM
Points: 42,768, Visits: 35,867
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1508032
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse