February 3, 2011 at 4:03 am
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?
April 1, 2014 at 4:17 am
Hi
Did you solve this problem as I am having the same issue.
Thanks
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Do not reinvent the wheel.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
April 1, 2014 at 4:36 am
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."
April 1, 2014 at 10:11 am
jesinj (2/3/2011)
HiHave 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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply