跨服务器SQL

编程入门 行业动态 更新时间:2024-10-26 10:27:11
本文介绍了跨服务器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.

推荐答案

我认为您要按照这篇 msdn文章.然后,您将使用4部分对象名称进行选择,例如:

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

本文发布于:2023-10-24 13:26:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524072.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!