Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Not able to update table using linked server.

Author  Topic 

vaidyanathanpc
Starting Member

24 Posts

Posted - 2002-04-29 : 05:34:57
Hi,
I am working on the database DB1 and have created a linked server to a database DB2. I have the login and password to access the remote server. The user has access to insert, update and delete data on the remote server. When I connect to the linked server and try to update an existing row I get the following error. What could be the problem??
Server: Msg 7306, Level 16, State 2, Line 1
Could not open table '"PWALLET"."DBO"."PW_TBL_REDEEMPOINTS"' from OLE DB provider 'SQLOLEDB'. The provider could not support a row lookup position. The provider indicates that conflicts occurred with other properties or requirements.
[OLE/DB provider returned message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]
The SQL I'm trying to execute is
UPDATE DB2.remoteuser.DBO.tablename
SET column1 = column1 + 200,
UPDATED_DATE = GETDATE()
WHERE colume2 = 2181
Please help.
Regards,
P.C. Vaidyanathan

efelito
Constraint Violating Yak Guru

478 Posts

Posted - 2002-04-29 : 10:47:22
Does the table you are trying to update have a unique index? It is a requirement for linked servers.

BOL Says:
quote:
Note The Microsoft® OLE DB Provider for SQL Server supports these interfaces only on a table that has a unique index. Because of this UPDATE or DELETE statements are permitted against a remote table in another Microsoft SQL Server™ only when the table has a unique index.


Jeff Banschbach
Consultant, MCDBA
Go to Top of Page

vaidyanathanpc
Starting Member

24 Posts

Posted - 2002-04-30 : 01:20:11
Thanks Jeff. That worked.
Regards,
P.C. Vaidyanathan
Go to Top of Page
   

- Advertisement -