Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 5th, 2004, 10:04 AM
Authorized User
Join Date: Apr 2004
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default linked server

SQL 2000 Servers: DB1 & DB2

DB1 --> replicates a database to DB2
DB1 has DB2 as a remote server (not a linked server)

I need to run a query on DB1 that references a db table in DB2

Adding DB2 on DB1 as a linked server fails because it say's it's already there.

what do I have to do to make this work ?

  #2 (permalink)  
Old June 5th, 2004, 07:20 PM
Friend of Wrox
Join Date: Nov 2003
Location: Lehigh Acres, FL, USA.
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc

you can use
your select state as

SELECT *FROM [servername\instancename.]databse.dbo.tablename.

FROM OPENQUERY(linkedservername, 'SELECT * FROM databasename.tablename')

  #3 (permalink)  
Old September 30th, 2004, 08:16 AM
Authorized User
Join Date: Sep 2004
Location: Delhi, Delhi, India.
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Lalit_Pratihari


Alternatively you can link the remote server to your local server.
In SQL server you can link the remote server through:

EXEC sp_addlinkedserver 'SEATTLESales', N'SQL Server'


Life Means More...;)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Server Question realgone_ SQL Server 2000 4 December 14th, 2005 02:48 PM
Linked server with Identity_insert on b_amit76 SQL Server 2000 2 February 22nd, 2005 12:35 PM
Linked Server w/ VFPOLEDB pjconrad SQL Server 2000 2 November 17th, 2004 07:27 PM
Update - Linked Server venkatpala SQL Server 2000 3 August 25th, 2003 11:45 AM
Linked Server to Oracle ioates SQL Server 2000 3 June 10th, 2003 02:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.