I have problem in creating a publication in SQL Server 2017.
The following error was shown from the Replication Monitor for the Snapshot agent. Both publisher and distributor are on the same computer. But for some reason, it thinks that it is a remote server.
Can someone please help?
Error messages:
Message: Could not connect to server 'MYCOMPUTER' because 'MYCOMPUTER' is not defined as a remote server. Verify that you have specified the correct server name. .
Command Text: sp_MSactivate_auto_sub
Parameters:
@publication = PUB1
@article = %
@status = initiated
Stack: at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.SetPublisherTranSequenceNumViaAutoSub(PublicationActivationState publicationActivationState, SqlConnection connection)
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ActivateCSSPublicationAndSetTranSequenceNums(PublicationActivationState publicationActivationState, SqlConnection connection)
at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoConcurrentPreArticleFilesGenerationProcessing()
at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoPreArticleFilesGenerationProcessing()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 18482)
Get help: http://help/18482
Server MYCOMPUTER, Level 14, State 1, Procedure , Line 1
Could not connect to server 'MYCOMPUTER' because 'MYCOMPUTER' is not defined as a remote server. Verify that you have specified the correct server name. . (Source: MSSQLServer, Error number: 18482)
Get help: http://help/18482
select * from sysservers
srvid
srvstatus
srvname
srvproduct
providername
0
1152
MYCOMPUTER SQL Server
SQLOLEDB