Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Warning: Fatal error 602 while trying to delete from linked server Expand / Collapse
Author
Message
Posted Wednesday, January 30, 2008 1:33 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 11:21 AM
Points: 135, Visits: 440
Hello!

This is not directly data corruption related post, but I am hoping someone is able to assist.

I was trying to troubleshoot problem with sp call that came done to 'Warning: Fatal error 602...' while trying to delete entry from table on linked server.

delete from SPRStrata.SBMSData.sro.MediaPlanAdMap_Staging

This is executed from SQL Servr 2005. Linked server is SQL 2000.

I create test table using schema sro.MediaPlanAdMap_Staging and was able to run DELETE against it. I have also verified permissions of the remote user linked server is using. Also, I can run UPDATE against SPRStrata.SBMSData.sro.MediaPlanAdMap_Staging table. The problem appears to be with DELETE statement only.
Table in question has identity and PK defined. SBMSData participates in replication.
Error log on linked server has following error:

Could not find row in sysindexes for database ID 5, object ID 86291367, index ID 0. Run DBCC CHECKTABLE on sysindexes..

I ran DBCC CHECKDB and verified sysindexes, but found no problems.
Any ideas what might be causing this fatal error?

Thanks,
Igor
Post #449663
Posted Wednesday, January 30, 2008 3:59 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 11:21 AM
Points: 135, Visits: 440
As strange as it might seems:


delete from SPRStrata.SBMSData.sro.MediaPlanAdMap_Staging - error

delete from SPRStrata.SBMSData.sro.MediaPlanAdMap_Staging where mediaplanid = mediaplanid - works, although logically similar to previous one (assuming there are no NULLs)

delete from SPRSTRATA.sbmsdata.sro.MediaPlanAdMap_Staging - works

insert into SprStrata.SBMSData.sro.MediaPlanAdMap_Staging ( MediaPlanId, AdId )
values ( 1, 1 ) - fails - 'The statement has been terminated.
Msg 16933, Level 16, State 1, Line 1
The cursor does not include the table being modified or the table is not updatable through the cursor.
'
insert into SprStrata.sbmsdata.sro.MediaPlanAdMap_Staging ( MediaPlanId, AdId )
values ( 1, 1 ) - works


It looks like that making database lowercase(d) make query works in all scenarious. That doesn't make much sense to me.

Igor

Post #449734
Posted Wednesday, January 30, 2008 6:47 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, September 11, 2014 3:05 AM
Points: 2,039, Visits: 1,665
Is the linked server case sensitive?

Paul Randal
CEO, SQLskills.com: Check out SQLskills online training!
Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #449770
Posted Thursday, January 31, 2008 12:25 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 11:21 AM
Points: 135, Visits: 440
It is not. Actually, you don't event have to make database name in lower case. DELETE FROM [SPRSTRATA].[SBMsdata].[sro].[MediaPlanAdMap_Staging] also works.
Post #450127
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse