Transactional Replication. snapshot Agent not picking up Creation Script

  • I'm working on some custom transactional replication as part of a partial database/application upgrade. Table definitions have changed in the publisher, but not in the subscribers. I need to run a custom creation script to modify the subscriber and the distribution agent is not picking it up. Here's the article creation script:

    EXEC sp_addarticle

    @publication = N'WB_to_opls_character',

    @article = N'Employee',

    @source_owner = N'dbo',

    @source_object = N'Employee',

    @type = N'indexed view logbased manualboth',

    @description = N'',

    @creation_script = 'F:\Data\Cleanup tbl_Employee.sql',

    @pre_creation_cmd = N'delete',

    @schema_option = 0x00,

    @identityrangemanagementoption = N'manual',

    @destination_table = N'tbl_EMPLOYEE',

    @destination_owner = N'dbo',

    @status = 0,

    @vertical_partition = N'false',

    @ins_cmd = N'CALL [sp_MSins_dboEmployeeCustom]',

    @del_cmd = N'CALL [sp_MSdel_dboEmployeeCustom]',

    @upd_cmd = N'SCALL [sp_MSupd_dboEmployeeCustom]',

    @sync_object = N'vEmployee',

    @sync_object_owner = N'sync'

    And yes I'm jumping through some hoops here to make replication work. I was given the option of replication (which was already being used) or linked servers, synonyms, and other hoops and chose replication. SSIS may have been a better choice, but they want near real-time and once I learned I could jump through some hoops with replication to make the source look like the destination I decided to go with it.

    Thanks.

    P.S. I had it working, forgot to save the script and now for some reason the creation script is not getting picked up by the snapshot agent.

  • Did you solve the problem?

    I got the same issue. Creation script is not picking up. As a result - table not created and replication failed.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply