After creating a replication publication, I go ahead and create a subscription using the script below:
-----------------BEGIN: Script to be run at Publisher 'MY_PUBLISHER_SERVER'--------------use [MY_PUBLICATION_DB]exec sp_addsubscription @publication = N'MY_PUBLICATION', @subscriber = N'MY_SUBSCRIBER_SERVER', @destination_db = N'ORCA_Repl_Sub', @subscription_type = N'Push', @sync_type = N'automatic', @article = N'all', @update_mode = N'read only', @subscriber_type = 0exec sp_addpushsubscription_agent @publication = N'MY_PUBLICATION', @subscriber = N'MY_SUBSCRIBER_SERVER', @subscriber_db = N'ORCA_Repl_Sub', @job_login = N'MY_COMPANY\sqlrpl', @job_password = N'MYP455w0rd', @subscriber_security_mode = 1, @frequency_type = 64, @frequency_interval = 0, @frequency_relative_interval = 0, @frequency_recurrence_factor = 0, @frequency_subday = 0, @frequency_subday_interval = 0, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 20190423, @active_end_date = 99991231, @enabled_for_syncmgr = N'False', @dts_package_location = N'Distributor'GO--------------END: Script to be run at Publisher 'MY_PUBLISHER_SERVER'-----------------
to my surprise I get all the following errors when running the second procedure:
Msg 50000, Level 16, State 1, Procedure msdb.dbo.sp_add_jobstep_internal, Line 255 [Batch Start Line 14]The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.Msg 3931, Level 16, State 1, Procedure sys.sp_MSadd_repl_job_unsafe, Line 376 [Batch Start Line 14]The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.
Image may be NSFW.
Clik here to view.
Basically Replication Scripts Stopped Working..
How could be a solution for this?where to find more information about these errors?