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 2008
»
SQL Server 2008 High Availability
»
Question regarding Log issues with Mirroring...
16 posts, Page 1 of 2
1
2
»»
Question regarding Log issues with Mirroring database.
Rate Topic
Display Mode
Topic Options
Author
Message
SQLCrazyCertified
SQLCrazyCertified
Posted Friday, March 15, 2013 2:17 PM
Old Hand
Group: General Forum Members
Last Login: Today @ 12:12 PM
Points: 320,
Visits: 1,916
Hi All,
I have a database which is mirrored and the log grew to about 50GB due to log backup being failed, so the steps I am doing now is taking a full and log backup manually just to be safe.
My question is this:
Would I be able to shrink the log file after taking log backup? or it won't let you shrink since mirroring in place?
In order to fix this issue, do I need to break the mirroring and reconfigure from scratch? Please advise.
Thanks,
SueTons.
Post #1431745
Lynn Pettis
Lynn Pettis
Posted Friday, March 15, 2013 2:27 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 21,832,
Visits: 27,850
I personally never tried shrinking the log of a mirrored database. If you can, perhaps you could set this up on a test server and see what happens.
I'd be interested in knowing.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1431751
SQLCrazyCertified
SQLCrazyCertified
Posted Friday, March 15, 2013 2:53 PM
Old Hand
Group: General Forum Members
Last Login: Today @ 12:12 PM
Points: 320,
Visits: 1,916
Lynn Pettis (3/15/2013)
I personally never tried shrinking the log of a mirrored database. If you can, perhaps you could set this up on a test server and see what happens.
I'd be interested in knowing.
After taking full and log backup, I see 99% free space on log file, but when I try to shink it, it's not working. I thought it should truncate the inactive logs after logbackup\shrink are done. I am not sure since mirroring is in place, it might not allowing this? Your thought.
SueTons.
Post #1431766
GilaMonster
GilaMonster
Posted Friday, March 15, 2013 2:55 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 38,062,
Visits: 30,358
SQLCrazyCertified (3/15/2013)
I thought it should truncate the inactive logs after logbackup\shrink are done.
Just like any other database in full recovery, the logs are truncated (marked as reusable) when a log backup is run. Truncating doesn't mean shrinking. If you want to do a once-off shrink of the principal's log, you can use DBCC ShrinkFile, as normal.
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 #1431767
Lynn Pettis
Lynn Pettis
Posted Friday, March 15, 2013 2:56 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 21,832,
Visits: 27,850
When you say not working, not really sure what you mean. Is it just not doing it or are you getting an error message?
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1431768
Lynn Pettis
Lynn Pettis
Posted Friday, March 15, 2013 2:58 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 21,832,
Visits: 27,850
Also, you may have to take one or two more t-log backups. If it isn't shrinking, it could be that the active log is at the end of the log file.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1431770
SQLCrazyCertified
SQLCrazyCertified
Posted Friday, March 15, 2013 3:18 PM
Old Hand
Group: General Forum Members
Last Login: Today @ 12:12 PM
Points: 320,
Visits: 1,916
GilaMonster (3/15/2013)
SQLCrazyCertified (3/15/2013)
I thought it should truncate the inactive logs after logbackup\shrink are done.
Just like any other database in full recovery, the logs are truncated (marked as reusable) when a log backup is run. Truncating doesn't mean shrinking. If you want to do a once-off shrink of the principal's log, you can use DBCC ShrinkFile, as normal.
Yes, I was doing DBCC Shrinkfile, and I did couple of log backups before I saw the free space....however, when I run DBCC Shrinkfile, it was running without any errors, but nothing is happening.
So, is there is any known factor with SQL server 2005 with mirroring, the shrink won't work?
SueTons.
Post #1431790
Lynn Pettis
Lynn Pettis
Posted Friday, March 15, 2013 3:21 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 21,832,
Visits: 27,850
If the (or an) active VLF is at the end of the log file, the file will not shrink. All I can suggest is keep trying after each log backup.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1431792
SQLCrazyCertified
SQLCrazyCertified
Posted Friday, March 15, 2013 3:58 PM
Old Hand
Group: General Forum Members
Last Login: Today @ 12:12 PM
Points: 320,
Visits: 1,916
Lynn Pettis (3/15/2013)
If the (or an) active VLF is at the end of the log file, the file will not shrink. All I can suggest is keep trying after each log backup.
Cannot shrink log file 2 (DatabaseName_Log) because all logical log files are in use.
(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
What exactly this means?
SueTons.
Post #1431818
GilaMonster
GilaMonster
Posted Friday, March 15, 2013 4:01 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 38,062,
Visits: 30,358
Exactly what it says, all logical log files are in use, so there are no empty ones. No empty VLFs = no shrink.
Check log_reuse_wait_desc in sys.databases for why the log is not being reused.
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 #1431820
« Prev Topic
|
Next Topic »
16 posts, Page 1 of 2
1
2
»»
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.