Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Dettach Published DB

Author  Topic 

scottpt
Posting Yak Master

186 Posts

Posted - 2004-04-14 : 12:05:07
I have to move files, so I was going to do a dettach move and attach of a DB that is currently published. Is it possible to do this without having to resync?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-14 : 12:22:23
So you are just moving the location of the database on the same server and the database is part of replication? Yes I believe this can be done without having to rebuild replication.

Tara
Go to Top of Page

scottpt
Posting Yak Master

186 Posts

Posted - 2004-04-14 : 12:54:32
Will it make me drop the subscriber before I dettach?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-14 : 12:59:55
I've never detached a published or subscribed database. I do not believe that it will require you to drop it first though. If it does, you can stop the MSSQLSERVER service. Move the MDF and LDF files to the new location. Start the service. You'll see the database become suspect. Delete the suspect database, then attach the database. It would be safer to delete replication of course and just rebuild it after the move is complete.

You can easily script out replication in case you need to rebuild it. Just right click on the publication, go to generate sql script. You should generate the script for delete and create, just in case.

Tara
Go to Top of Page
   

- Advertisement -