none
Replication Error while creating subscription using backup

    Question

  •    

    I am trying to set-up replication on SQL 2008 R2 database, copied and restored the database on subsrciber on same version, but when creating the subscription gettin this error below, any clues?

    Msg 20027, Level 11, State 1, Procedure sp_MSadd_subscription, Line 223

    The article '(null)' does not exist.

    Msg 14070, Level 16, State 1, Procedure sp_MSrepl_changesubstatus, Line 1208

    Could not update the distribution database subscription table. The subscription status could not be changed.

    Msg 14057, Level 16, State 1, Procedure sp_MSrepl_addsubscription_article, Line 383

    The subscription could not be create

    Monday, June 10, 2013 10:11 AM

All replies

  • The part of the procedure sp_MSadd_subscription that raise the error is this

    -- Check if article_id exists
            if @article_id is not NULL
            begin
                if not exists (select * from MSarticles where
                    publisher_id = @publisher_id and
                    publisher_db = @publisher_db and
                    article_id = @article_id)
                begin
                    raiserror (20027, 11, -1, @article)  (---line 223----)
                    return (1)
                end
            end

    It looks like it cannot find the article, can you run

    select * from MSarticles where
                    publisher_id = @publisher_id and
                    publisher_db = @publisher_db

    on the distribution db filtering on your publisher id and database ?

    You should be able to understand more, you get the list of your articles (objects that you want to publish) and you could find if something is missing.

    Perahps trace via profiler teh creation of the subscription so to get the exact article_id which is causing the error to even have a better understanding.

    Cheers

           Marco


    Marco Carozzi

    Tuesday, June 11, 2013 12:04 AM