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 123»»»

Full Transaction log Expand / Collapse
Author
Message
Posted Tuesday, March 17, 2009 10:07 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
Comments posted to this topic are about the item Full Transaction log
Post #678082
Posted Tuesday, March 17, 2009 10:13 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 12:15 PM
Points: 48, Visits: 35
Krishna - Good article. Question though. What if the logfile expanded to fill the rest of the drive. Then what?


Tom Walters
Post #678084
Posted Tuesday, March 17, 2009 10:40 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 18, 2013 7:37 PM
Points: 2, Visits: 81
What about shrinking the database with replication???




Post #678094
Posted Wednesday, March 18, 2009 3:28 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 5:26 AM
Points: 1,120, Visits: 4,909
Hi Krishna

Very clear article, but I was a bit confused about the first option of shrinking the log - if it is full now, won't shrinkign the physical size mean it is still full afterwards?

John
Post #678208
Posted Wednesday, March 18, 2009 4:42 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
Tom Walters (3/17/2009)
Krishna - Good article. Question though. What if the logfile expanded to fill the rest of the drive. Then what?


hi Tom,

Thanks for your feedback. if the log file filled the rest of the drive you can think of any one of the steps mentioned in the article.

Post #678256
Posted Wednesday, March 18, 2009 4:47 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
jts_2003 (3/18/2009)
Hi Krishna

Very clear article, but I was a bit confused about the first option of shrinking the log - if it is full now, won't shrinkign the physical size mean it is still full afterwards?

John


Hello John,

Thanks for your valuable feedback. When you shrink the log file it removes the inactive VLF's to reuse the space made available.


Post #678261
Posted Wednesday, March 18, 2009 5:58 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 19, 2009 5:46 AM
Points: 1, Visits: 8
I cannot believe that backup was the third option. The first and best option is to create proper maintenance on the database. The only transactions you need are those occuring since the last backup. This keeps the back the logs small.
Post #678308
Posted Wednesday, March 18, 2009 6:06 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
michael_sawyer (3/18/2009)
I cannot believe that backup was the third option. The first and best option is to create proper maintenance on the database. The only transactions you need are those occuring since the last backup. This keeps the back the logs small.


Hi michael,

I have pointed out options of what we can do, the preference does not go according to the options mentioned. It totally depends on what you can chose as the best method. Obviously, at the first point if we have a good backup plan, frequent transaction logs, we would definitely not land on this kind of situation.




Post #678320
Posted Wednesday, March 18, 2009 6:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 21, 2012 3:51 AM
Points: 3, Visits: 64
Hi Krisha,

in order to shrink the logfile you recommend the command:
"DBCC SHRINKFILE (transactionloglogicalfilename, TRUNCATEONLY)"

But BOL for DBCC SHRINKFILE states that:
"TRUNCATEONLY is applicable only to data files."

Would you please comment on that.

Thanks
Harald


Post #678352
Posted Wednesday, March 18, 2009 7:25 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 9:25 AM
Points: 1, Visits: 60
Here is my take on it. (in sql2005, production with recover full mode)

DBCC LOGINFO('mydatabasename')


see the status column, you can only shrink the "0" rows after the last 2 or what. Because that was what is "free". (The worse case will be something like replication has a lockup and then the transaction log can't recycle and it will fill to the end)
If your log hard drive is full. you should buy time and add an extra log file in the other HD.

do a
checkpoint
(that force transactions to write)
backup your db
change recover mode to simple that basically free up the log. (not the size)

Then you can detach the extra log file, shrink the size. turn back to Full mode.
Post #678420
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse