Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would appreciate if someone could help me with the following problem:

We use two SQL Server 2008 R2 databases under transactional replication: transactional publication with updatable subscriptions. because we run out of disk space we need to move the database files into a new drive. But I don't want to break the replication.

What I'm looking for are the required steps that will help me to move the files to the new drive.

Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted
  1. alter database [publisher] modify file (name = 'logical_name', filename = 'new_path')
  2. alter database [publisher] set offline
  3. physically move the files from the old location to the new
  4. alter database [publisher] set online

Keep in mind that the logreader agent will hold a connection open to the publisher. You can stop the agent w/o breaking anything. Just remember to start it back up again. :)

share|improve this answer
    
Everything worked as you describe above! Thanks Ben! –  ileon Apr 10 '12 at 18:00
add comment

You need to make sure there are no other active SQL sessions to the publisher database or setting it to offline will fail.

-GFT

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.