Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can we Use Linked Server? Uses of Linked server



How can we Use Linked Server? Uses of Linked server..

Answer / samba shiva reddy . m

A linked server configuration enables SQL Server to execute commands against OLE DB data sources on remote servers.
Linked servers offer the following advantages:

Remote server access.
The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.
The ability to address diverse data sources similarly.
How to link another server in SQL Server 2005?
Go to Server Objects-->Linked servers
Right click on linked Servers it will give option to create new server give the remote server name
or
Basically – all I needed to do what set up a linked server by using the following system stored procedures:
sp_addlinkedserver '<Server Alias>', '', 'SQLNCLI', NULL, NULL, 'SERVER=<IP>', NULL
sp_addlinkedsrvlogin '<Server Alias>', 'false', NULL, '<username>', '<password>'

To remove the linked server once done then just call

sp_dropserver '<Server Alias>', 'droplogins';

example : u have another data base is running in different server(System) u need some tables,columns from that Server to write some query in that query u need that columns so u have to link with that server using above scenario then u can use those columns in your query.

for instance set up a linked server called myRemoteServer, then I would be able to access a table in the remote database using:
myRemoteServer.<DatabaseName>.dbo.<TableName>

It makes it relative much easier to map data between sources compared to having to backup/restore the remote source database to the target server.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is the system function to get the current user's user id?

2 Answers   HCL,


Can we call stored procedure in trigger?

0 Answers  


What is user-defined inline table-valued function?

0 Answers  


what is difference between nchar and char in Sql server ?

3 Answers  


How to execute multiple stored procedures at one time in sql server?

0 Answers  


Do you know how to make remote connection in database?

0 Answers  


What are out-of-range errors with date and time literals?

0 Answers  


What is hot add cpu in sql server 2008?

0 Answers  


Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?

3 Answers   Apple,


What is used to replicate sessions between instances in coldfusion clusters?

0 Answers   HCL,


How to rename databases in ms sql server?

0 Answers  


which one will take 1st priority in case of insert statement and select statement???

2 Answers   HCL,


Categories