Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DB transaction log file on a shared hosting service


DB transaction log file on a shared hosting service

Author
Message
ScottPletcher
ScottPletcher
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3946 Visits: 6686
>> and restricted the log size to 30mb <<

That seems a little low, given that you might have a situation where one transaction takes a while to complete. Would another 10-15mb really crimp the data size that much :-)?

SQL DBA,SQL Server MVP('07, '08, '09)

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."
matt6749
matt6749
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 Visits: 216
dupe post
matt6749
matt6749
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 Visits: 216
Looks like limiting the transaction log size to 30mb is not the answer:

Message = "The transaction log for database 'Customers' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"

UPDATE: I asked the hosting company to remove the size limit on the transaction log. I'm hoping that because the recovery model is Simple, the log won't grow too much even if it's infrequently backed up by the hosting company.

Thanks,
Matt
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21093 Visits: 18259
matt6749 (7/26/2014)
Looks like limiting the transaction log size to 30mb is not the answer:

Message = "The transaction log for database 'Customers' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"

UPDATE: I asked the hosting company to remove the size limit on the transaction log. I'm hoping that because the recovery model is Simple, the log won't grow too much even if it's infrequently backed up by the hosting company.

Thanks,
Matt


FYI, they won't be able to do tlog backups in simple recovery mode. Keep an eye on the database and see what the largest transaction seems to be and grow the log to that size.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

matt6749
matt6749
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 Visits: 216
One followup. (Hope I'm not annoying everybody):

With the Simple recovery model I'm using, would BEGIN TRANS and COMMIT statements help free up space in the log when used as follows:

instead of using this:

delete from x ...
update x ...
insert into x ...

use something like this below (that way the log space might be reused) ?

BEGIN TRAN
delete from x ...
COMMIT
BEGIN TRAN
update x ...
COMMIT
BEGIN TRAN
insert into x ...
COMMIT
Brandie Tarvin
Brandie Tarvin
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7802 Visits: 8745
So far as I know, explicit transactions vs implicit transactions will not affect how the transaction log grows. Here are a few links to read up on.

Transaction log basics
Managing the transaction log
Why the log may not get truncated

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Brandie Tarvin
Brandie Tarvin
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7802 Visits: 8745
matt6749 (7/23/2014)
I think it's ok because the data is not mission critical and I back it up myself also with a console app I wrote. ?


Matt,

How is your console app actually backing up the transaction log? Is it just making a copy of the .ldf file?

In Simple recovery mode, transaction logs cannot be backed up. The fact that you think you are backing it up worries me that you might be misunderstanding how backups work and might be depending too much on a file that will not be readable if you should happen to need it.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
ScottPletcher
ScottPletcher
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3946 Visits: 6686
matt6749 (7/28/2014)
One followup. (Hope I'm not annoying everybody):

With the Simple recovery model I'm using, would BEGIN TRANS and COMMIT statements help free up space in the log when used as follows:

instead of using this:

delete from x ...
update x ...
insert into x ...

use something like this below (that way the log space might be reused) ?

BEGIN TRAN
delete from x ...
COMMIT
BEGIN TRAN
update x ...
COMMIT
BEGIN TRAN
insert into x ...
COMMIT


That might (should?) allow the log file to be truncated (freed up for reuse) earlier, particularly if the delete, update and inserts are large-volume transactions.

SQL DBA,SQL Server MVP('07, '08, '09)

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."
samanta0rodriges
samanta0rodriges
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 6
Thanks Jason - why won't Shrinkfile help? How often is "regular" transaction log backups?

daily deals, online shopping sites, hot deals, best deals
Brandie Tarvin
Brandie Tarvin
SSCertifiable
SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)SSCertifiable (7.8K reputation)

Group: General Forum Members
Points: 7802 Visits: 8745
samanta0rodriges (7/30/2014)
why won't Shrinkfile help?


If you are not regularly backing up the transaction logs, the log won't free up any space. It will hold onto all the space it has (and can get) and keep the transactions in there. Therefore, a shrinkfile operation will look just look at the log and say "no free space to shrink" and finish without actually doing anything.

samanta0rodriges (7/30/2014)
How often is "regular" transaction log backups?


That depends on your system setup. Is it an OLTP or a data warehouse? How often are transactions getting pushed into the database? How much data can be lost if the system goes down?

Depending on those factors, a "regular" transaction log backup can be anything between once a day to once an hour to once every 15 minutes. At my workplace, we have some DBs that have a once an hour log backup during business hours only, some DBs (Simple mode) that have no log backups at all, and some DBs that have a log backup once every 4 hours during the 24 hour day. It just depends on what the databases are doing, how often updates happen, their recovery mode, etc.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search