简体   繁体   English

在不同服务器之间复制表时收到错误

[英]Error received while Copying a table between different servers

My server name is Server\\SQL2008 . 我的服务器名称是Server\\SQL2008 I want to copy a table from another server into my server. 我想将表从另一台服务器复制到我的服务器中。

I am using this code: 我正在使用此代码:

insert into SERVER\SQL2008.DBTiger.dbo.Sample_TBL 
   select * 
   from SERVER.DBTiger.dbo.Sample_TBL 

SQL Server doesn't recognize \\ and I get this error: SQL Server无法识别\\并且出现此错误:

Incorrect syntax near '\\'. '\\'附近的语法不正确。

What should I do? 我该怎么办?

Please make sure that the server you are trying to refer is Linked server. 请确保您要引用的服务器是链接服务器。 Below link ( http://msdn.microsoft.com/en-IN/library/ff772782.aspx ) MSDN page describes way to create linked server. MSDN页面下面的链接( http://msdn.microsoft.com/en-IN/library/ff772782.aspx )描述了创建链接服务器的方法。 Once server is linked, you can access it as [SERVER\\SQL2008.DBTiger].DBTiger.dbo.Sample_TBL . 链接服务器后,可以通过[SERVER\\SQL2008.DBTiger].DBTiger.dbo.Sample_TBL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM