Tuesday, June 16, 2015

Working with Linked Servers

By creating a linked server, you can work with data from multiple sources.
Capabilities in Linked Server
·        Distributed queries can be run against this server.
·         Queries can join tables from more than one data source.
·         If the linked server is defined as an instance of SQL Server, remote stored procedures can be executed.
Permission
When using Management Studio requires CONTROL SERVER permission or membership in the sysadmin fixed server role.

To create Linked Server use any of the following:
•         SQL Server Management Studio
•          Transact-SQL

Steps

 In SQL Server Management Studio, open Object Explorer, expand Server Objects, right-click Linked Servers, and then click New Linked Server.   

        

The “New Linked Server” Dialog appears. Type the name of the instance of SQL Server that you area linking to.
[Server type]: Select [SQL Server] Option


Go to [Security] page, select [be made using this security context] option and set parameters
          Remote Login: sa

          Password:**********




Test your connection finally







Testing example to get Nintex WF Instance Name

Nintex Test WF is in my local Server ‘WSS_Content_NintexKidde’. So I have update Instance Id and Instance        Name to the Local DB table ‘Customer’.

I have connect to lenel Server using Linked Servers access Nintex DB there.






Finally I retrieve WF Instance Name from the Local Server of specific Instance WorkflowID in Nintex Server DB.