Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8122437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:50:01+00:00 2026-06-06T05:50:01+00:00

Im using sql server 2012 and its replication feature. Here im trying to manually

  • 0

Im using sql server 2012 and its replication feature. Here im trying to manually create a publication and adding articles to it using script. I was able to create the publication successfully, but i have problems adding articles to it.

This is my script to add articles

EXEC ScriptDB.dbo.sp_addarticle 
            @publication = 'PublicationOne',
            @article = 'Departments',
            @source_object = 'Departments',
            @source_owner = 'dbo',
            @type = N'logbased',
            @schema_option = 0x000000000803509F,
            @identityrangemanagementoption = N'manual',
            @pre_creation_cmd = N'none'

The most important thing is, Departments table is in PublisherDB database and im runing this script from ScriptDB database. As i will be having many publishers, i will pass these values dynamically.

When i execute the above script, i get the following error

Msg 14027, Level 11, State 1, Procedure sp_MSrepl_addarticle, Line 590  [dbo].[Departments] does not exist in the current database.

Departments table does not exist in ScriptDB, but it is in PublisherDB database. So i changed the script to

EXEC PublisherDB.dbo.sp_addarticle 
            @publication = 'PublicationOne',
            @article = 'Departments',
            @source_object = 'Departments',
            @source_owner = 'dbo',
            @type = N'logbased',
            @schema_option = 0x000000000803509F,
            @identityrangemanagementoption = N'manual',
            @pre_creation_cmd = N'none'

now it says,

Msg 20026, Level 11, State 1, Procedure sp_MSreinit_article, Line 40 The publication 'PublicationOne' does not exist.

Tell me something, can’t i run the script on another database to create a publication.

For example, consider this case, I have a master database and two publisher databases. I want to create two separate publication (one for each publisher database). Now can i execute the above script in master database to create publishers (using two publisher databases). Is this possible to implement.

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:50:03+00:00Added an answer on June 6, 2026 at 5:50 am

    sp_addarticle must be executed at the Publisher on the publication database. If you wish to publish the PublisherDB database then create the publication for PublisherDB and call sp_addarticle on the PublisherDB database to add articles to the publication.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using SQL Server 2005 and Visual Studio 2005, I'm trying to create a SSIS
Using SQL Server 2012 Express. I have a table which represents key/value pairs. keycol
Using SQL Server 2000 Table1 Id date --- ---------- 001 23/01/2012 002 25/01/2012 003
Using SQL Server 2000 Table1 ID Date Value1 Value2 001 01/01/2012 100 0 001
I am using a JDBC driver for Microsoft SQL Server 2012 (sqljdbc_4.0) and although
I'm using entity framework 4.1 (VS 2010, SQL Server 2012) for inserting data into
I'm trying to login to my local SQL Server 2005 installed on Windows7 using
Using SQL Server/SSRS 2008. With SQL Server Profiler, I've been unsuccessfully trying to trace
I am using SQL Server 2012 RC0 + EF 4 + MVC 4. 90%
I need to create a report using SQL Server 2008R2 Stored procedure that will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.