如何在不使用链接服务器方法的情况下将数据从一台服务器的视图复制到SQL server数据库中另一台服务器的数据库表中。我尝试使用以下代码:
SELECT [LogEntryID]
,[TimeStamp]
Into [server-2].[database1].[dbo].[table1]
FROM [server-1].[database1].[dbo].[view_1] 我收到错误消息“the object name 'server-2.database1.dbo.table1‘包含的前缀数超过了最大值。最大值是2。我在groovy代码中使用的复制语句。但首先我尝试在查询中使用它。
发布于 2018-06-18 17:45:42
您可以使用opendatasource代替链接服务器
insert DestinationTable
select * from opendatasource('SQLOLEDB', 'Server=SourceServer;User Id=Username;Password=Password;').SourceDb.Schema.SourceTable;https://stackoverflow.com/questions/50905911
复制相似问题