if we have two servers on different pc's on a LAN, say server1 and server2. if we have to get data of server 1 on server2 we have to create a linked server on server2.
First we'll create a remote login on server1 then a linked server on server2.
For remote login on server1- Open sql server1 and expand security tab.
- Right click on Logins and select Newlogin.
- In new window enter name of login and select SQL server authentication wrote password and uncheck UER MUST CHANGE PASSWORD option and click ok
- Now Expand your database and then expand security tab. Now right click on Users and select add new user.
- Now click on ok button. You remote login created. Dont forget to turn off firewall.
Crete linked server2
- Open SQL Server2 and expand server objects.
- Right click on Linked server and select new .a new window will appear.
- Enter name of you server1 in linked server box. here our server name is server1
- Now click on security tab and click on add button below box. In locallogin option in box enter your local server name here our local server is SERVER2 . In Remote user option enter Login name we created in Server1. Here we created it with name aims and in next box write password of that user.
- In Server Option Tab change RPC and RPC OUt to TRUE.
- Click on ok
No comments:
Post a Comment