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

Log shipping and shrinking data file Expand / Collapse
Author
Message
Posted Thursday, February 3, 2011 4:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 12:21 AM
Points: 7, Visits: 168
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?
Post #1057931
Posted Tuesday, April 1, 2014 4:17 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 6:31 AM
Points: 215, Visits: 444
Hi

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

Thanks


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I see stupid people
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Post #1556884
Posted Tuesday, April 1, 2014 4:36 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 21, 2014 2:56 AM
Points: 2,603, Visits: 2,061
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."
Post #1556899
Posted Tuesday, April 1, 2014 10:11 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, September 11, 2014 2:28 PM
Points: 1,194, Visits: 2,219
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
Post #1557086
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse