Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Backups
»
sql 2005 and logshipping
40 posts, Page 1 of 4
1
2
3
4
»
»»
sql 2005 and logshipping
Rate Topic
Display Mode
Topic Options
Author
Message
didi77
didi77
Posted Monday, August 06, 2012 2:44 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, August 16, 2012 7:55 AM
Points: 18,
Visits: 44
hi,
I have a basic question since years ago now, I did not find any solution.
One database on one server name SQL1.
I active the logshipping on this database, witch forced me to pass the recovery model simple to full. (logshipping wont be active if I didnt made this change).
The secondary server witch will receive my logshipping database name SQL2.
All work perfectly, my logshipping is set up with no problem, and work very well.
But i have now a hudge problem... space disk probleme, because the .LDF of by database are now very big.
And all the option in SQL to stop the file grow break the logshipping, if I use it. Like "shrink or anything else".
Is there a solution to fixe that ? or it's a normal issu when we active the logshipping?
thanks for your help
Post #1340412
derek.colley
derek.colley
Posted Monday, August 06, 2012 2:53 AM
SSC-Addicted
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 3:40 AM
Points: 496,
Visits: 583
The transaction log will be kept in check by a regular full backup schedule. If you're using a full recovery model, you should be prepared for a greater transaction log space requirement. Consider speaking to your SAN admin / person responsible for storage to get more disk space allocated to the LUN housing the transaction logs. Monitor your transaction log sizes before and after backups.
---
Note to developers:
CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
So why complicate your code AND MAKE MY JOB HARDER??!
Want to get the best help? Click here
http://www.sqlservercentral.com/articles/Best+Practices/61537/
(Jeff Moden)
My blog:
http://uksqldba.blogspot.com
Visit
http://www.DerekColley.co.uk
to find out more about me.
Post #1340416
anthony.green
anthony.green
Posted Monday, August 06, 2012 2:54 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
This is standard behavour, the log will become larger than what you are used to as it is not marking the log as re-usable until a log backup occurs.
How often have you set logshipping up to backup the log?
Also check this link out on managing the transaction log
http://www.sqlservercentral.com/articles/Administration/64582/
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1340418
didi77
didi77
Posted Monday, August 06, 2012 3:03 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, August 16, 2012 7:55 AM
Points: 18,
Visits: 44
Hi Derek,
thanks for your reply.
But, every night we did a full backup this should free the transaction log space isnt it ? But unfortunatly in my case it wont... but maybe the full backup didnot free the transaction log and my knowless are wrong ?
We also once by week make a reorg index task.
no other solution to make more space? what happends in few years? For a little database 5 giga, I have 20giga of transation log... And what about in one years? 40 ? It's not for me a normal issu isnt' ?
Post #1340428
anthony.green
anthony.green
Posted Monday, August 06, 2012 3:06 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Full backups do not do anything to the transaction log. Only a transaction log backup can mark the log as re-usable.
How often is the log backup taking place?
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1340435
didi77
didi77
Posted Monday, August 06, 2012 3:12 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, August 16, 2012 7:55 AM
Points: 18,
Visits: 44
anthony.green (8/6/2012)
This is standard behavour, the log will become larger than what you are used to as it is not marking the log as re-usable until a log backup occurs.
How often have you set logshipping up to backup the log?
Also check this link out on managing the transaction log
http://www.sqlservercentral.com/articles/Administration/64582/
thanks Anthony for your reply.
I'm not sure about the question of the backup log ? When I set up the logshipping It ask me When I want to delete the older filer (in my case we keep it 6hours)
And the 3 ls job (backup, copy and restore) are schedule every 30mn.
I know that the backup log are the best way to free the space, but it's not compatible with the logshipping. If I did a backup log with a tsql, the lsrestore will be break, with an error message like this : "Message
2012-06-21 16:50:26.66 *** Error: Could not apply log backup file 'E:\TRNSECONDAIRE\db_20120621144913.trn' to secondary database 'db_bis'.(Microsoft.SqlServer.Management.LogShipping) ***
2012-06-21 16:50:26.66 *** Error: This log cannot be restored because a gap in the log chain was created. Use more recent data backups to bridge the gap.
RESTORE LOG is terminating abnormally.(.Net SqlClient Data Provider) ***
"
I tried so many thing... every one break my logshipping...
Post #1340441
anthony.green
anthony.green
Posted Monday, August 06, 2012 3:17 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
If you have such a big log after 30 minutes, then change it to 15 minutes.
You can shrink the log in full recovery, but you will have to wait until the log reuse description is set to nothing, which in full recovery you have to be pretty quick.
select log_reuse_wait_desc from sys.databases where name = ''
You can also take a manual backup of the log in Logshipping, the
ONLY
caviat, is that the TRN file must go into the same directory which is used in logshipping so that it can be copied and restored as normal.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1340445
didi77
didi77
Posted Monday, August 06, 2012 3:38 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, August 16, 2012 7:55 AM
Points: 18,
Visits: 44
anthony.green (8/6/2012)
If you have such a big log after 30 minutes, then change it to 15 minutes.
You can shrink the log in full recovery, but you will have to wait until the log reuse description is set to nothing, which in full recovery you have to be pretty quick.
select log_reuse_wait_desc from sys.databases where name = ''
You can also take a manual backup of the log in Logshipping, the
ONLY
caviat, is that the TRN file must go into the same directory which is used in logshipping so that it can be copied and restored as normal.
"If you have such a big log after 30 minutes, then change it to 15 minutes."
I dont understand what you mean.
My ldf file are big, and I think it take bigger maybe everyweek, perhaps month ? It's no every 30mn when my logshipping running.
The shrink option have every time we tried with a lot of option "truncate, truncate only etc etc" break the logshipping sequence.
"You can also take a manual backup of the log in Logshipping, the
ONLY
caviat, is that the TRN file must go into the same directory which is used in logshipping so that it can be copied and restored as normal"
I tried also to made a manual backup of the log, and then it's the error message 2 post away. But I will tried to set up into the logshipping folder... maybe it's the issu!
I run to test it, and I come back here.
Post #1340464
didi77
didi77
Posted Monday, August 06, 2012 3:59 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, August 16, 2012 7:55 AM
Points: 18,
Visits: 44
So on my sql test server,
I create a quick logshipping, with a data base witch have already a hudge LDF file.
I made a tsql backup log like that :
"BACKUP LOG database
TO DISK = 'E:\TRNLOCAL\test.trn'
GO"
Work fine, BUT the LDF file are still hudge. What shall I do now to down the file? Shrink it ? (pretty sure it's will break my logshipping ... ?)
Post #1340478
anthony.green
anthony.green
Posted Monday, August 06, 2012 4:01 AM
SSCertifiable
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:51 AM
Points: 5,075,
Visits: 4,831
Shrink the file, but dont use truncate only.
You will need to ensure that the reuse desc is set to nothing to shrink it down as low as possible, otherwise it will only shrink to the last active part of the log.
Remember, a backup be it a full / diff / log
will not
shrink a file, shrinking is an expensive process and causes lots of issues especially around index fragmentation in the MDF. The file has grown to that size as it needs to be that size to handle all the transactions you have within the 30 minute backup window.
If you set the log backups to 15 minutes, you will
potentially
end up with a smaller log, but all depends how big the file needs to be to handle 15 minutes of transactions.
Read the article on managing the transaction log, and size your log accordingly.
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1340479
« Prev Topic
|
Next Topic »
40 posts, Page 1 of 4
1
2
3
4
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.