How to configure replication? - This database is not included for publication

I am trying to configure replication on SQL Server 2005. I can do this using the wizard. But when I try to run the generated scripts by this wizard, an error message appears:

Msg 14013, Level 16, State 1, Procedure sp_MSrepl_addpublication, Line 159
This database is not enabled for publication.
Msg 18757, Level 16, State 1, Procedure sp_MSrepl_addpublication_snapshot, Line 66
Unable to execute procedure. The database is not published. Execute the procedure in a database that is published for replication.
Msg 14013, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 168
This database is not enabled for publication.
Msg 14294, Level 16, State 1, Procedure sp_verify_job_identifiers, Line 25
Supply either @job_id or @job_name to identify the job.

This is a little strange, because when I run this query in the database, where I clicked and then deleted the publication, everything happens well. The problem is that I am using my query in a new database. Moreover, I use the sp_replicationdboption stored procedure. When I try to run it, it says:

The publishdatabase replication option is ReplicationTest00already set to true.

Please help me solve this problem.

+3
3

, . tring snapshor script SQL-, .

script conctext , , .:)

+1

, ?

, .

, , script . , T-SQL, / .

+2

Before running the script, enable Use [publication_db_name]

this will set the database context

+1
source

Source: https://habr.com/ru/post/1736079/


All Articles