Several times, after a Control-M crash some Quantitative Ressources were no released.
There is SQL script example to list difference between QR declared and QR really used.
declare @qr varchar(15)
declare @maxqr int
declare @useqr1 int
declare @useqr2 int
select @qr='QR1'
Select QR definition
QRTOTAL is the maximum defined for the QR
QR USED is the quantity of ressources normally used by Control-M
select @maxqr=QRTOTAL, @useqr1=QRUSED from CMR_QRTAB where QRESNAME=@qr
Select QR used by Control-M Job at the plan.
Normally QR used by Control-M must be identical with QRUSED in a previous select.
select @useqr2=count(*) from CMR_QRUSE where QRESNAME=@qr
Display the result
select @qr as QR ,@maxqr as 'QR MAX', @useqr1 as 'QR USED', @useqr2 as 'QR Really USED'
Result:
QR______QR MAX __QR USED__QR Really USED
-----------------------------------------------------------
QR1_____100______3________0
In that case you must be update QR USED with 0 value to be identical with QR Really USED
Following scripts could be used to update QR table or to suppress old existing QR Used.
Be carefull, don't forget to update Control-EM database too.
Update QR in CMR_QRTAB
update CMR_QRTAB set QRUSED=value where QRESNAME='QR'
Update QR in CMR_QRTAB and released old QR in CMR_QRUSE
update CMR_QRTAB set QRUSED=0 where QRESNAME='QR'
delete from CMR_QRUSE where QRESNAME='QR'
Be carefull, don't forget to update Control-EM database too.