Saturday, March 27, 2010

Using the Resource Queue Cleanup


The Resource Queue Cleanup is a utility that unlocks a record.  A locked record occurs when two users input facility information into a class and save the record at the same time.  Though it happens infrequently, you may receive a message that the record or resource is locked.  To clear the locked record, you will have to cancel out of the class (you will not be able to save your changes), go to this utility and follow this process. Once the record is unlocked, you will be able to go back into the class.

Query the resource Queue record:  RESOURCE_QUEUE
 
SELECT COUNT (*) FROM PS_RESOURCE_QUEUE WHERE RESOURCE_NAME =:1
If the count is greater than zero, then the resource is locked and no further process can happen.
 
If the resource is not locked then, lock it the object for further transformation
INSERT INTO PS_RESOURCE_QUEUE VALUES (Resource Name, Operator, Resource Lock Datetime)

0 comments:

Post a Comment

Total Pageviews

Copyright © Tech & Management Notes