Moving the Distribution database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Moving the Distribution database

Does anyone know how to do this? I move the system databases as a matter of course whenever I install SQL but haven’t found anything on moving Distribution. An additional confusion is that the mdf and ldf files are in the MSSQLDATA folder by default even though they are not attached at start up. If I could specify their locations at install time that would solve the need to move the files.
If the user databases are not participating in the replication then there is no need to move this distribution database. In general when you remove distribution, SQL Server attempts to remove the physical files. However, if other clients are using the distribution database or if there is a sharing violation when the file is being deleted, the file will not actually be removed from the hard disk. If the physical file is not removed and you try to install distribution again, a new name will be used for the distribution database. And you can move the files as usual and refer to this KBA;en-us;224071 for more information. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.