Link to home
Create AccountLog in
Avatar of ct7777777

asked on

SQL 9010 Error after abend on submitted file copy due to incorrect trigger

I did rstobj of from a production library to a test library and created a trigger that I did not realize existed.  The next submitted copy I tried to do to the file that had this incorrect trigger over it caused the copy job to lock up with many "Access Plan not Updated" errors since the trigger was firing for every record copied.  I abended that copy due to the errors and since it was using 25% of our CPU as our workday was starting.  
Now the file is locked so that I cannot delete the trigger but when I try WRKOBJLCK, DSPRCDLCK listed in the help no jobs are listed.  
What can I do to get rid of the file lock so I can delete the trigger(the trigger is disabled, but i cannot delete) and once again copy data into it?
Avatar of Member_2_2484401
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
BTW, "Access Plan not Updated" is actually an informational message, not an error.
Avatar of ct7777777


Thank you for your replies.  We do have an iSeries.  We see no locks when we try WRKOBJLCK.  The system did let me rename the file with the incorrect trigger, however.  Now my incorrect trigger points to this renamed file that is not actually part of the database.  I then renamed the file that the restore had created with text "Old name FILENAME ..." so it would be the correct database FILENAME and now I am in the middle of a restore from tape to the day before i started this mess!  i hope this will clean this test environment up so that we can use it again.  I am using RSTOBJ with MBROPT(*all) and alwobjdif(*all).  The first restore i did was from a different library name(and i also used those two options) so I hope I'm heading back in the right direction.  i did make a mistake calling the "Access Plan not Updated" an error.  I got that message thousands of times and killed the job because it was using so much CPU so it just felt like an error message!  i think you are right that we will have to IPL before we can delete the trigger so i'm accepting your solution.