0

I'm using MS SQL server 2019 on Linux. I'm trying to create a transactional replication. The problem is that when I create a publication, the snapshot agent can not start. Basically, I'm getting this message: enter image description here

When I check under SQL agent server jobs, I see the following messages:

2023-03-22 01:55:25.724 Status: 0, code: 20015, text: 'Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.'.
2023-03-22 01:55:25.724 Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.

And also this:

2023-03-22 01:50:32.33 Connecting to Distributor 'TEST-DB1.MYDOMAIN.COM'
2023-03-22 01:50:32.81 The replication agent had encountered an exception.
2023-03-22 01:50:32.81 Source: Replication
2023-03-22 01:50:32.81 Exception Type: Microsoft.SqlServer.Replication.ConnectionFailureException
2023-03-22 01:50:32.81 Exception Message: Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
2023-03-22 01:50:32.81 Message Code: 18452

Here is the publication SQL in case it's needed:

use [testdb]
exec sp_replicationdboption @dbname = N'testdb', @optname = N'publish', @value = N'true'
GO
-- Adding the transactional publication
use [testdb]
exec sp_addpublication @publication = N'testdb-publication', @description = N'Transactional publication of database ''testdb'' from Publisher ''test-db1.mydomain.com''.', @sync_method = N'concurrent', @retention = 0, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true', @enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false', @repl_freq = N'continuous', @status = N'active', @independent_agent = N'true', @immediate_sync = N'true', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @allow_queued_tran = N'false', @allow_dts = N'false', @replicate_ddl = 1, @allow_initialize_from_backup = N'false', @enabled_for_p2p = N'false', @enabled_for_het_sub = N'false'
GO


exec sp_addpublication_snapshot @publication = N'testdb-publication', @frequency_type = 1, @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 = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1


use [testdb]
exec sp_addarticle @publication = N'testdb-publication', @article = N'users', @source_owner = N'dbo', @source_object = N'users', @type = N'logbased', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N'manual', @destination_table = N'users', @destination_owner = N'dbo', @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_dbousers', @del_cmd = N'CALL sp_MSdel_dbousers', @upd_cmd = N'SCALL sp_MSupd_dbousers'
GO

Is this some kind of bug, or am I missing something?

I would really appreciate your help!

5
  • 1
    No bug, "Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication." Look for the 18456 in the errorlog. You're using Windows auth to connect: @publisher_security_mode = 1. Fix your windows auth issues. Mar 22 at 8:33
  • @SeanGallardy Thank you for the reply. I have already added to @publisher_security_mode = 1 to exec sp_addpublication_snapshot @publication = N'testdb-publication', @frequency_type = 1, @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 = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1 or should I add it somewhere else? Also, the login mode is mixed.
    – iRakic
    Mar 22 at 9:19
  • You didn't read what I wrote. You're getting a login failed. Fix that issue. Mar 22 at 16:01
  • @SeanGallardy I understand that login is failing, but I'm unsure what I'm doing wrong. If you have any advice on what should I do or check, please let me know. Thank you in advance!
    – iRakic
    Mar 22 at 22:44
  • I would check your environment, which is using Windows Auth, as to why you're getting the login is from an untrusted domain. Typically an SPN issue, but doesn't have to be. Again, look into and fix the login failure, I don't understand how this is controversial. Mar 23 at 13:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.