Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| 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 February 22nd, 2005, 01:44 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linked server with Identity_insert on

I am having a strange problem with linked servers. Let's say I have two SQL servers Server-A and Server-B. Further,
Server-A has a database called db1. If I create a linked server on Server-B to Server-A.db1, everything at
that point works fine. While connected to only Server-B, I can issues queries to tables, views what ever I want within db1.
The problem occurs when I try to insert records in a DB1.table1 from DB2.table2 via linked server. DB1.table1 has an IDENTITY column so I need to fire the query in a format like "SET IDENTIY_INSERT ON Server-A.db1.UserName.Table1;<INSERT QUERY>". When I run this query I get the error like as-

Table 'Server-A.db1.UserName.Table1' does not exist or cannot be opened for SET operation.

Any ideas are welcome......

  #2 (permalink)  
Old February 22nd, 2005, 03:54 AM
Authorized User
 
Join Date: Feb 2005
Location: Pune, Maharashtra, India.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this..... SET IDENTIY_INSERT ON [Server-A].db1.UserName.Table1

Cheers,
Pooja Falor

  #3 (permalink)  
Old February 22nd, 2005, 12:35 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

hi Pooja

wht exactly u want to do with this code ?????????



Similar Threads
Thread Thread Starter Forum Replies Last Post
IDENTITY_INSERT happygv SQL Server 2000 4 November 27th, 2006 02:10 PM
Linked Server Question realgone_ SQL Server 2000 4 December 14th, 2005 02:48 PM
Linked Server w/ VFPOLEDB pjconrad SQL Server 2000 2 November 17th, 2004 07:27 PM
linked server ginoitalo SQL Server 2000 2 September 30th, 2004 08:16 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.