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

DB transaction log file on a shared hosting service Expand / Collapse
Author
Message
Posted Thursday, July 24, 2014 9:07 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 3:44 PM
Points: 2,266, Visits: 3,419
>> 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)

Carl Sagan said: "There is no such thing as a dumb question." Sagan obviously never watched a congressional hearing!
Post #1595927
Posted Saturday, July 26, 2014 2:30 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 PM
Points: 97, Visits: 206
dupe post
Post #1596534
Posted Saturday, July 26, 2014 2:34 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 PM
Points: 97, Visits: 206
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
Post #1596535
Posted Sunday, July 27, 2014 11:18 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 12:45 PM
Points: 17,947, Visits: 15,941
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
Post #1596635
Posted Monday, July 28, 2014 11:39 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 PM
Points: 97, Visits: 206
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
Post #1597148
Posted Tuesday, July 29, 2014 5:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:12 PM
Points: 5,615, Visits: 6,413
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1597217
Posted Tuesday, July 29, 2014 5:03 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:12 PM
Points: 5,615, Visits: 6,413
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1597218
Posted Tuesday, July 29, 2014 9:10 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 3:44 PM
Points: 2,266, Visits: 3,419
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)

Carl Sagan said: "There is no such thing as a dumb question." Sagan obviously never watched a congressional hearing!
Post #1597348
Posted Wednesday, July 30, 2014 5:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 2:39 AM
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
Post #1597657
Posted Wednesday, July 30, 2014 5:40 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:12 PM
Points: 5,615, Visits: 6,413
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1597663
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse