Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 将SQL server DB表从一台服务器复制到另一台服务器_Sql Server_Copy_Database Table - Fatal编程技术网

Sql server 将SQL server DB表从一台服务器复制到另一台服务器

Sql server 将SQL server DB表从一台服务器复制到另一台服务器,sql-server,copy,database-table,Sql Server,Copy,Database Table,我正在尝试将表从实时远程服务器复制到本地开发机器。我试过: select * into mmm from [sqlb8.webcontrolcenter.com].[1photo].[kelraie].[pix] 但我犯了这个错误: Msg 7202, Level 11, State 2, Line 1 Could not find server 'sqlb8.webcontrolcenter.com' in sys.servers. Verify that the correct ser

我正在尝试将表从实时远程服务器复制到本地开发机器。我试过:

select * 
into mmm 
from [sqlb8.webcontrolcenter.com].[1photo].[kelraie].[pix]
但我犯了这个错误:

Msg 7202, Level 11, State 2, Line 1 Could not find server 'sqlb8.webcontrolcenter.com' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
如何链接服务器?还是有更简单的方法? 谢谢
Khaled

您是否尝试过备份-还原?您也可以使用导出,但导出不会编写任何主键或外键的脚本

别忘了BCP


要链接服务器,请使用存储的proc sp_addlinkedserver

链接服务器可以使用系统上的其他提供程序驱动程序,允许您从SQL server中直接从该源进行查询。在您的情况下,可能看起来您正在尝试连接到基于web的SQL版本,这可能不像设置链接服务器那么简单。根据您访问数据的方式,您可能需要创建备份或使用其他方法传递凭据才能访问源。

如果您使用的是SQL Server 2008 Express或更高版本,它会附带一个“导入/导出”向导将执行此操作。

如果OP只需要一个表,可能是因为它的容量为10MB,但备份可能是100GB。因此,备份/恢复可能不实用。