問題描述
我需要做以下查詢(例如):
I need to do the following query (for example):
SELECT c1.CustomerName FROM Customer as c1
INNER JOIN [ExternalServer].[Database].[dbo].[Customer] as c2
ON c2.RefId = c1.RefId
出于某種安全原因,我的客戶端不允許我創建鏈接服務器.我在其下執行此查詢的用戶可以訪問這兩個表.是否可以在不使用鏈接服務器的情況下使其工作?謝謝.
For some security reason my client doesn't allow me to create a linked server. The user under whom I execute this query has access to both tables. Is it possible to make it work without using linked server? Thanks.
推薦答案
您可以使用 OPENROWSET,這將需要連接信息、用戶名和密碼...
You could use OPENROWSET, which'll require the connection info, username & password...
雖然我理解客戶認為始終在線連接到他們的數據是有風險的,但這就是您鎖定帳戶的原因.OPENROWSET 表示以純文本形式包含連接信息.
While I understand that the client believes that having an always-on connection to their data is risky, that's why you lock down the account. OPENROWSET means including the connection info in plain text.
這篇關于SQL Server:是否可以在不設置鏈接服務器的情況下從另一個 SQL Server 獲取數據?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!