Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Msg 14013, not enabled for publication.....

  1. #1
    Join Date
    Mar 2003
    Posts
    383

    Msg 14013, not enabled for publication.....

    Hi,
    I tried to run the following script from SQL2005 server A (publisher) from Database 'TestDB' to SQL2005 server B
    (subscriber) database 'TestDB'
    -------------------------------------------
    exec sp_addsubscription @publication = N'publish_TestDB_FromCA', @subscriber = N'subscriberTest', @destination_db = N'TestDB', @subscription_type = N'Push', @sync_type = N'automatic', @article = N'all',
    @update_mode = N'read only', @subscriber_type = 0

    with following error:

    Msg 14013, Level 16, State 1, Procedure sp_MSrepl_addsubscription, Line 252
    This database is not enabled for publication.

    Any idea?
    Thanks
    David

  2. #2
    Join Date
    Mar 2003
    Posts
    383
    oops, I point to the wrong DB. the subscription job is now generated from the sql/w. but not show up from the subscription side yet.

    After re-initialization, not show yet....

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    What kind of replication did you set?. It seems it is push subscription type, so there will be no job in subscriber, all the jobs will be in publisher.

  4. #4
    Join Date
    Mar 2003
    Posts
    383
    Hi Skhanal:
    you are right, the push jobs are created on publisher side.
    from publisher db, I ran both script of
    exec sp_addsubscription @publication 'publish_A',,,, and
    exec sp_addpushsubscription_agent @publication = N'publish_A'
    with job created on publisher, but the corresponding subscription replication was not showing up at the subscriber server B. I have met with this kind issue before. The solution is reinitilization. But for certain reason, the reinitialization did not work.
    thanks
    David

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,922
    Is this merge replication?, otherwise there will not be any jobs in subscriber for push subscription.

  6. #6
    Join Date
    Mar 2003
    Posts
    383
    Hi Skhanal:

    It is push repl. And the jobs are created in publisher server.
    However, the corresponding replication did not show up in the subscriber server replication/local subscription folder. The target db has been backuped from A and copied to the server B. Both A and B are SQL2005, and both sql server service and sql agent service are using the same domain\userTest login.

    thanks
    David

  7. #7
    Join Date
    Sep 2002
    Posts
    5,938
    Is it transactional or merge replication? Tried set replication in SSMS?

  8. #8
    Join Date
    Mar 2003
    Posts
    383
    It is transactional push repl. I have tried to add subscription with manual process. From publisher replication monitor, I could see that subscription watch list is fine. But in "Warnings and Agent" tab, job "Snapshot Agent" with error:

    Executed as user: domainName\userTest. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information. The step failed.

    The log reader agent is running fine. But I checked login domainName\userTest is running fine in both server A and B on sql server service and sql agent service. Why it is fail in the snapshot agent stage?

    thanks
    -D

  9. #9
    Join Date
    Mar 2003
    Posts
    383
    Message
    Error: 14151, Severity: 18, State: 1.

    Agent shutdown. For more information, see the SQL Server Agent job history for job 'publish_TestDB_FromA'.

    found above 2 error messages from publisher sql log.
    What caused the "Agent shutdown"?

  10. #10
    Join Date
    Mar 2003
    Posts
    383
    The agent error comes from Snapshot Agent.

  11. #11
    Join Date
    Sep 2002
    Posts
    5,938
    Any error in sql agent error log? Try set replication in SSMS to see if have same problem, you may miss some steps in setup.

  12. #12
    Join Date
    Mar 2003
    Posts
    383
    Hi:
    I dropped publication and subscriptions and from SQL Console created publication via clicking: all 4 steps successful including start snapshort agent.
    But when I check the view snapshot agent status: following error:

    Executed as user: domain\userTest. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information. The step failed.

    from sql agent error log:
    [298] SQLServer Error: 14262, The specified @job_id ('E564EAD0-A7A8-47DF-AE21-C5971BEE6A6E') does not exist.
    [SQLSTATE 42000]
    [000] Unable to retrieve steps for job publication_A-To-8
    [180] Job publication_A-B was deleted while it was executing: the outcome was Failed.

    SSMS or scription creation with the same error. How could aovid the snapshot agent failure?

    thanks
    -D

  13. #13
    Join Date
    Sep 2002
    Posts
    5,938
    What's your sql2k5 edition and sp level? Did you get correct sql instance name with 'select @@servername' on both servers? How did you set credentials when setup replication?

  14. #14
    Join Date
    Mar 2003
    Posts
    383
    publish server version
    Microsoft SQL Server 2005 - 9.00.3054.00 (X64)
    Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

    subscriber server version
    Microsoft SQL Server 2005 - 9.00.1399.06 (X64)
    Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

    both servername are correct with on '\' instance attached.

    p.s. When I create the new subscription under publication, all steps were created correctly including "start snapshot agent", then I immediately swithed to look at the 'view snapshot status" and found it was running! but 5 seconds later, it was faile with the "Executed as user: domainName\testUser. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information. The step failed."

    replication security set is with same domainName\userName which is used in both publish/subscriber, both sql server service and sql agent service. communication is via sa with same password on both server.

    thanks
    -D

  15. #15
    Join Date
    Mar 2003
    Posts
    383
    Server A
    Job Name publication_A
    Step Name Detect nonlogged agent shutdown.
    Duration 00:00:00
    Sql Severity 18
    Sql Message ID 14151

    Message
    Executed as user: domainName\testUser. Agent shutdown. For more information, see the SQL Server Agent job history for job 'publication_A'. [SQLSTATE 01000] (Message 20557) Replication-Replication Snapshot Subsystem: agent publication_A failed. Executed as user: domainName\testUser. The replication agent encountered a failure. See the previous job step history message or Replication Monitor for more information. The step failed. [SQLSTATE 42000] (Error 14151). The step failed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •