Control-M/Server fails to start, and the following message is displayed:
Another instance of this script is running now, or may have previously ended abnormally
solution :
1. Connect to the Control-M/Server database using the command "SQL" then run the following query:
select count(*) from CMR_RESOURCELOCK where RESOURCE_NAME='server_started';
2. If no record is returned, run the following SQL insert command to insert the missing record into the CMR_RESOURCELOCK table:
insert into CMR_RESOURCELOCK (resource_name,resource_type,lastend) values ('server_started','7','0');
commit;
3. If one record is returned, run the following SQL command to verify what value is set for the "lastend" column for this record in the CMR_RESOURCELOCK table:
select resource_name, resource_type, lastend from CMR_RESOURCELOCK;
If the "lastend" value is not "0", set it as follows:
update CMR_RESOURCELOCK set lastend=0 where resource_name='server_started';
commit;
4. Confirm that the row was successfully inserted:
select count(*) from CMR_RESOURCELOCK where RESOURCE_NAME='server_started';
The command will return one record
5. Exit from the SQL prompt and run the following commands to reinitialize and start Control-M Server:
init_prflag
start_ctm