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:
@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.
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.