March 5, 2014 at 12:41 am
Situation:
I need to create the replications scripts for the deployment of Transactional replication. I had run the below scripts for configuring the distributor.
sp_adddistributor 'NameofDistributorServer';
sp_adddistributiondb N’NameofDatabaseBeingReplicated’;
sp_adddistpublisher @publisher = ‘NameofDistributorServer’, @distribution_db = N’NameofDatabaseBeingReplicated’;
Upto the above scripts, it is working fine. But When I am enabling the database using the below script,
--use master
exec sp_replicationdboption @dbname = 'Publisher_database', @optname = N'publish', @value = N'true';
GO
I am getting the following error.
Msg 20028, Level 16, State 1, Procedure sp_MSpublishdb, Line 56
The Distributor has not been installed correctly. Could not enable database for publishing.
I done some initial checking of distributor configuration with the following commands,
sp_helpdistributor - No result
sp_helpdistributiondb – Given the details about distribution database
sp_helpdistpublisher – Given the details about Publisher
I think no issues with Distributor configuration. Does anyone know the solution for the above error?
March 7, 2014 at 9:07 am
Varun R (3/5/2014)
Situation:I need to create the replications scripts for the deployment of Transactional replication. I had run the below scripts for configuring the distributor.
sp_adddistributor 'NameofDistributorServer';
sp_adddistributiondb N’NameofDatabaseBeingReplicated’;
sp_adddistpublisher @publisher = ‘NameofDistributorServer’, @distribution_db = N’NameofDatabaseBeingReplicated’;
Upto the above scripts, it is working fine. But When I am enabling the database using the below script,
--use master
exec sp_replicationdboption @dbname = 'Publisher_database', @optname = N'publish', @value = N'true';
GO
I am getting the following error.
Msg 20028, Level 16, State 1, Procedure sp_MSpublishdb, Line 56
The Distributor has not been installed correctly. Could not enable database for publishing.
I done some initial checking of distributor configuration with the following commands,
sp_helpdistributor - No result
sp_helpdistributiondb – Given the details about distribution database
sp_helpdistpublisher – Given the details about Publisher
I think no issues with Distributor configuration. Does anyone know the solution for the above error?
How did you configure your distributor? Is it running on the same server as the Publisher or is it dedicated on a different server/instance.
I would suggest you review the security settings for the distributor and re-do if needed. Once the distribution database is created start with the replication set up again.
The_SQL_DBA
MCTS
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
June 10, 2014 at 12:51 pm
I came across this post in google results. A warning to anyone that does the same: Do not use NameofDatabaseBeingReplicated for replication_db. It will cause all kinds of problems that are difficult to recover from. The replication_db is a system DB that's automatically created for you when you set things up in the UI. It is NOT the DB you're wanting to replicate. Don't start running scripts like this without really knowing what you're doing. It took some major undoing to get things right. I recommend just taking good notes and going through the process manually if you're setting up replication in a new environment. Otherwise, do a lot of homework and and try out your scripts in an environment that you can scrap.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply