What Is a linked Server in SQL Server?
The SQL Linked Servers allows us to connect to other database on another machine or another remote server’s database tables, procedures or other instances.
The Following Steps To Create and Configure a Linked Server -
ü In SQL Server Management Studio
ü Open Object Explorer
ü Expand Server Objects
ü Right click Linked Servers
ü And then click “New Linked Server” link
o After clicked on New Linked Server, Select General Tab
o In the Linked Server Box
o Type the name of the Instance of SQL Server
ü After clicked on New Linked Server, Select Security Tab
o Add the local server login to remote server login mappings
o Select the local login and checked to impersonate check box
o And Select Be made without using the security context
o Press OK
ü Finally Right click on CREATED linked Server and Select Test Connection
ü If everything is OK, then return a success popup message - “The test connection to the linked server succeeded”.
SQL Query Looks like –
-- Creating Linked Servers (SQL Server Database Engine)
-- SQL QUERY
SELECT TOP 1000 [APP_LOG_ID]
,[DATE_TIME]
,[HOST_NAME]
,[HOST_ADDRESS]
,[BROWSERS]
,[MESSAGE]
FROM [VIASERVER\SS_DE_2014].[DEMO_DEV].[dbo].[APP_LOG]
-- Linked Server Name - [VIASERVER\SS_DE_2014]
-- Database Name - [DEMO_DEV]
-- Table - [dbo].[APP_LOG]
See and learn the Steps in the below Video –
I hope you are enjoying with this post! Please
share with you friends!! Thank you!!!