如何从同一服务器上的两个数据库中获取价值. [英] how can get value from two database on same server.

查看:132
本文介绍了如何从同一服务器上的两个数据库中获取价值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友

我想从同一服务器上具有不同用户名和密码的同一台服务器上的两个不同数据库中获取同一页上的值,我该怎么做..?

Dear friends

i want to fetch the value on same page from two different database on the same server with different username and password for database,how can i do that..?

推荐答案


如果要从中获取值的两个数据库位于两个不同的数据库实例上(在同一服务器上),则需要编写一个使用每个实例的端口号的数据库连接字符串的脚本.
如果两个数据库位于同一数据库实例上,则需要使用数据库名称来访问数据库.
希望这会有所帮助:)
戴安娜(Diana)
Hi there,
If the two databases from which you want to get values from are on two different DB instances (on the same server), then you need to script a database connection string that uses each instance’s PORT number.
If the two databases are located on the same DB instance, then you need to use the database name to gain access to the database.
Hope this helps :)
Diana


SELECT * FROM databaseA.schema.table
SELECT * FROM databaseB.schema.table


这篇关于如何从同一服务器上的两个数据库中获取价值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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