Getting data on separate sql servers

We have a situation where our application calls some stored procedures on the sql 2000 server. Now we need to get some data from another sql 2000 block related to vpn.

What would the syntax look like for performing CRUD operations from one sql server to another sql server?

Both database servers are SQL 2000 and are running Windows 2003.

+1


source to share


2 answers


You can use Linked SQL Server.

A linked server configuration allows Microsoft SQL Server to execute a command against OLE DB data sources on different servers. Linked servers offer the following benefits:

  • Remote Server Access

  • The ability to issue distributed queries, updates, commands, and transactions across heterogeneous data sources throughout the enterprise.

  • Ability to access different data sources in the same way.



The request might look like this:

   SELECT * FROM MyRemoteServer.MyDB.dbo.MyTable

      

+4


source


You simply refer to the data on the linked server using fully qualified names, that is: SELECT columns FROM server_name .DatabaseName.dbo.TableName

http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1155184,00.html



On a side note -

Verify that the Distributed Transaction Coordinator service is running on clients and on DTC servers.

+1


source







All Articles