|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 2:45 PM
Points: 135,
Visits: 408
|
|
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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 2:45 PM
Points: 135,
Visits: 408
|
|
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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Monday, June 17, 2013 10:19 AM
Points: 1,910,
Visits: 1,606
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 2:45 PM
Points: 135,
Visits: 408
|
|
| 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.
|
|
|
|