Hi All,
We had replication set up for a database, which we removed few days back and now we want to rename the database, when I tried with
USE master;
GO
ALTER DATABASE abc
Modify Name = zabc
GO, which is throwing an error as Msg 18855, Level 11, State 1, Line 1
Can not rename the database name because it is published or it is a distribution database used by replication.
I verified the publisher server under replication>> publications, no database as such being replicated and verified subscriber server>> replication>> under subscribers no database as such participating in replication.
When I googled I got this :
Can not rename the database because it is published or it is a distribution database used by replication. (Error 18855)
One reason for this to occur is because your database is being replicated. To rename the database you need to disable the replication and then reinstate it afterwards (if required).
To disable replication:
Right click the Servername -> Replication node in Management Studio and Click Disable Distribution. Run through the wizard. Once the database is renamed right click the Replication node node again and select Configure Distribution. You should be able to accept the defaults if Replication was previously configured.
But if we disable distribution,whole replication setup for all databases will be down, please correct me if I am wrong.
SQL version is
Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
May 14 2014 18:34:29
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
Please help me how to proceed with this.
Thanks.