Answered by:
Extract data from internet

Question
-
Hi,
is there a way to link two SQL servers over internet ? I am trying to extract some data(should be live always) from one server which is hosted in one state to another.
When user request for price, it should take product code and get results from another server.
Thursday, May 15, 2014 11:32 AM
Answers
-
Yes we can connect two SQL Server over internet using linked server.
Refer this link http://technet.microsoft.com/en-us/library/ms175483(v=sql.105).aspx
For linked server, http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0ac7c29e-256f-46fe-b3ef-bf42a0755a0a/linked-server-over-internet-using-sql-server-2005?forum=sqldatabaseengine
Regards, RSingh
Thursday, May 15, 2014 2:11 PM
All replies
-
Yes we can connect two SQL Server over internet using linked server.
Refer this link http://technet.microsoft.com/en-us/library/ms175483(v=sql.105).aspx
For linked server, http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0ac7c29e-256f-46fe-b3ef-bf42a0755a0a/linked-server-over-internet-using-sql-server-2005?forum=sqldatabaseengine
Regards, RSingh
Thursday, May 15, 2014 2:11 PM -
Use a web serviceFriday, May 16, 2014 1:53 AM
-
You have to create Linked Servers (Database Engine) to connect to one other database, to retrieve data from that.
Many Thanks & Best Regards, Hua Min
- Edited by Jackson_1990 Friday, May 16, 2014 2:05 AM
Friday, May 16, 2014 2:04 AM -
Hello,
Just as other post above, you can configure the remote server as linked server on the local SQL Server instance, and then use Linked server four part query(Distributed query) or OPENQUERY to get data from remote server. For example:
Distributed query: SELECT product_code,price FROM [Linked_server].[DB_name].[Schema].[Table]
OPENQUERY: SELECT * from OPENQUERY(linked_server, 'SELECT product_code,price FROM [DB_name].[Schema].[Table]')
Reference:
Distributed Queries - http://msdn.microsoft.com/en-us/library/ms188721.aspx
OPENQUERY - http://msdn.microsoft.com/en-us/library/ms188427.aspx
Regards,
Fanny LiuFanny Liu
TechNet Community SupportFriday, May 16, 2014 7:57 AM -
If you truly meant "over the internet", then in addition to the other answers provided, be absolutely sure to involve a networking person who knows what they are doing to set up a site to site VPN or equivalent. Leaving a SQL port exposed on the internet is begging for trouble, and at the very least will cause lots and lots of people to try to break in.Friday, May 16, 2014 11:56 AM