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 2005 Forums
 Transact-SQL (2005)
 Warning: Fatal error 602 while trying to delete

Author  Topic 

imarchenko
Yak Posting Veteran

57 Posts

Posted - 2008-01-30 : 15:30:56
Hello!

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

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-01-30 : 17:57:36
Did you run this on the linked server (which is what the message indicated you should do) ?
DBCC CheckTable (sysindexes)

Be One with the Optimizer
TG
Go to Top of Page

imarchenko
Yak Posting Veteran

57 Posts

Posted - 2008-01-30 : 18:00:22
Yes, I did run it on linked server.

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

Go to Top of Page
   

- Advertisement -