I need to do a join across two different database servers (IPs 10.0.0.50 and 10.0.0.51). What's the best way?
The solution I found:
1) Run a stored proc
exec sp_addlinkedserver @server='10.0.0.51'
2) Verify that the servers were linked (lists linked servers)
exec sp_linkedservers
3) Run the query using the format
[10.0.0.51].DatabaseName.dbo.TableName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With