Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Enterprise
Expertise: Advanced
Feb 1, 2001



Application Security Testing: An Integral Part of DevOps

Create a Linked Server in SQL Server

You can establish a link to the remote SQL Server using this code:
Syntax :

server:         Name of the linked server to create
product_name:   Product name of te OLE DB data source
Provider_name:  The unique,friendly name for the OLE DB provider
corresponding to this data source
data_source:   Name of data source
location:      location of database
provider_string: The OLE DB provider string
catalog:   The Catalog name (In SQL Server is database name)
example :
Connecting to remote SQL Server

If you are connecting to a server that is running SQL Server 7.0, the only arguments that must be provided are the 'provider_name' and 'server' arguments. Other arguments are used automatically.
EXEC sp_addlinkedserver 'Accountingserver','SQL server'

'Accountingserver' is the server name and 'SQL server' is the provider name.
Mahyar Ghasemali
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date