Moving files of a database with replication

  • Does anyone know if the files of a database that has replication can be moved? and what the best practice is to get that done?  I don't think I can remove the replication. 

    Thanks for the help

     

    Steve

  • If you can quiesce *all* replication agents.

    Backup and Restore WITH MOVE can be used!


    * Noel

  • How would I quiesce *all* replication agents.  Just make sure there are no changes in the publications or disable jobs

  • I'm doing the same thing this weekend. I'm planning on stopping replication, unmarking the DB as used for replication by setting  CATEGORY = 0 is sysdatabases, detaching the DB, moving the files, attaching the files, setting CATEGORY back to 1, and re-enabling the replication jobs. .... hope it works.  This is on a test DB, so if I have to drop and recreate a couple of replication jobs, it won't be a huge deal.

    I'm sure that messing with CATEGORY in sysdatabases is unsupported, but I've used it as a workaround in the past for various things.

  • Both. At restore time you won't be able to execute if there are connections to the DB.


    * Noel

  • Maybe Noel's method would be better, as long as replication will be unaffected.  

    Is your database a publisher or a subscriber ??    Mine's a subscriber, so I will just dis-able the pull subscription job.

  • If your database is subscriber you can freely detach-attach. I have used the method I posted in the past successfully.

    Note that is all on the "SAME SERVER" though.


    * Noel

  • It is a publisher

     

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply