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

Move MDF to another drive VS adding an NDF file Expand / Collapse
Author
Message
Posted Sunday, March 16, 2014 7:56 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:12 AM
Points: 750, Visits: 1,556


I have a sql server 2000 instance where the MDF for one of the databases is on the C: drive and we are running out of space.

The Database is a transactional replication subscriber - the Replication logging and Replication PUSH jobs are running on the Publisher.

If I add a Datafile (.NDF) on another Drive and then set the .MDF file to NOT autogrow, will the .MDF stop growing altogether and data will be written to the .NDF going forward?

Or am I better served to detach the database and just move the MDF file to another drive??



Post #1551561
Posted Sunday, March 16, 2014 8:22 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:41 AM
Points: 42,814, Visits: 35,937
Jpotucek (3/16/2014)
If I add a Datafile (.NDF) on another Drive and then set the .MDF file to NOT autogrow, will the .MDF stop growing altogether and data will be written to the .NDF going forward?


Yes. If you set the file not to grow, the file won't grow. SQL will still write a little to that file until it's full but it won't grow any further.



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 #1551564
Posted Sunday, March 16, 2014 8:33 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:12 AM
Points: 750, Visits: 1,556
Thank you Gail!

I'm thinking I should just move the MDF file using detach/attach and be done with it : )

I do not have an environment to test this in where the DB Is a replication subscriber. Do you know if I will have a problem detaching the Database?

I believe that if I just stop the replication PUSH job on the publisher while I am performing the detach/attach I should be OK.



Post #1551565
Posted Sunday, March 16, 2014 2:33 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:41 AM
Points: 42,814, Visits: 35,937
Jpotucek (3/16/2014)
I do not have an environment to test this in where the DB Is a replication subscriber. Do you know if I will have a problem detaching the Database?


Yes. You won't be able to.



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 #1551593
Posted Monday, March 17, 2014 2:42 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:12 AM
Points: 750, Visits: 1,556
I ended up stopping the Replication Push job at the publisher, detached the DB (subscriber), moved the files, reattached the DB and then re enabled the the replication push job.

Thanks for your help!



Post #1551662
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse