跨服务器SQL [英] Cross-server SQL

查看:106
本文介绍了跨服务器SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据从一台服务器的数据库移植到另一台服务器的数据库. 这些数据库都位于不同的mssql 2005服务器上. 复制可能不是一种选择,因为目标数据库是在[时间间隔]基础上从头生成的.

I want to port data from one server's database to another server's database. The databases are both on a different mssql 2005 server. Replication is probably not an option since the destination database is generated from scratch on a [time interval] basis.

最好我会做类似的事情

insert *
from db1/table1
into db2/table2
where rule1 = true

很明显,连接凭据将在此脚本中存储.

It's obvious that connection credentials would go in somehwere in this script.

推荐答案

我认为您要按照

I think what you want to do is create a linked server as per this msdn article. You would then select using a 4 part object name eg:

Select * From ServerName.DbName.SchemaName.TableName

这篇关于跨服务器SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆