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 |
List out some of the requirements to set up a sql server failover cluster?
How to execute function in stored procedure sql server?
What is Transaction?
Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?
What is factless fact table? : sql server analysis services, ssas
When would you use the stored procedures or functions?
what is the difference detween pairwise comparison subquary and non pairwise comparison subquary?
What is the difference function and stored procedure?
How can you hide the sql server instances?
What are transactions and its controls?
what's the difference between SQL & MY-SQl...? And what we learn from these ....?
Explain the functionalities that views support?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)