Warning: Fatal error 602 while trying to delete from linked server

  • 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

  • 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

  • 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

  • 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.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply