1, How to create a linked server in SQL Server database

  • Only SQL Server version has the ability to create a linked server
  • Expand to the "Server Objects" Node, and there is a node named "Linked Servers"
  • Right click on the "Linked Servers"
  • Select the "New Linked Server..." from the pop-up menu
  • There are three items on the left hand side of the screen
  • Click on the "General" item, and input the "Name" & the "Provider"
  • If you want to link to a special type of database, e.g. GE Historian, InSQL... you should install the specific database provider onto the machine first, then you can create the link,otherwise you can not find the specific "Provider" in the drop-down list. 
  • Input product name, e.g. "iHistorian"
  • Input Data source, it's the server name where the specific database resides on, e.g. ES**HIST
  • Click on the "Security" item, if you need special authority to log onto the database, then you should add the necessary users into the list.
  • Click on the "Server Options" item, you can leave them with the default values.

 

2, If you encount the following error, when you are running a SQL code which retrives data from another database through the linked server:

   "Execution terminated by the provider because a resource limit was reached.Msg 7399 or Msg 7200."

   It might be a timeout expired issue, to solve it you can refer the article in MS support website: http://support.microsoft.com/kb/314530/zh-cn

 Or the result set returned from other database exceeded, in this case you should change your code.