Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
if database1 in the another server ,can i call its function in the database2?

SQL
Select Database1.dbo.GetName(Code ) as name1
From Database2.dbo.tableA
Posted

1 solution

No. The connection to SQL server is server specific, and you would need a separate connection to connect to the other SQL server instance. The only exception to this is when you have a database farm, but then the database is effectively distributed across multiple physical servers, but counts as a single SQL Server instance.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900