SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Log shipping and shrinking data file


Log shipping and shrinking data file

Author
Message
jesijesijesi
jesijesijesi
SSC-Enthusiastic
SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)

Group: General Forum Members
Points: 175 Visits: 401
Hi

Have a question on shrinking datafile when its log shipped.

When the secondary database is setup in standby mode and i shrink the data file on the primary the change is carried over to the secondary database and the secondary database is also shrunk. I could see the file has reduced in size when i go to the file path through explorer.

But when the secondary database is in norecovery mode the shrink on the primary does not seem to be applied at the secondary database. The file size does not change at the secondary server.

However when i recover the database on the secondary the file does shrink.

Any idea why this happens?
OomBoom
OomBoom
Say Hey Kid
Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)Say Hey Kid (705 reputation)

Group: General Forum Members
Points: 705 Visits: 514
Hi

Did you solve this problem as I am having the same issue.

Thanks

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Do not reinvent the wheel.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
free_mascot
free_mascot
SSCertifiable
SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)

Group: General Forum Members
Points: 7569 Visits: 2250
No body can do any operation on database which is in norecovery mode i.e. restoring. While when database is in standby mode it is available to people to read the data hence it able to reduce the data file but same is not possible when database is in norecovery mode.

HTH

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
sqlbuddy123
sqlbuddy123
SSCertifiable
SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)

Group: General Forum Members
Points: 6234 Visits: 2243
jesinj (2/3/2011)
Hi

Have a question on shrinking datafile when its log shipped.

When the secondary database is setup in standby mode and i shrink the data file on the primary the change is carried over to the secondary database and the secondary database is also shrunk. I could see the file has reduced in size when i go to the file path through explorer.

But when the secondary database is in norecovery mode the shrink on the primary does not seem to be applied at the secondary database. The file size does not change at the secondary server.

However when i recover the database on the secondary the file does shrink.

Any idea why this happens?


Only one operation at a time on the DB files. As they are locked in the No Recovery mode, Shrink operation doesn't get applied.

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