Solved

The job remains in Pending status

  • 19 October 2023
  • 6 replies
  • 53 views

Badge +4

The execute source code fails as the job indicates it cannot connect to the database. The job remains in Pending status. How can we resolve this.

icon

Best answer by Mark Jongeling 19 October 2023, 10:18

View original

This topic has been closed for comments

6 replies

Userlevel 7
Badge +23

Hi,

The Pending state indicated the Job is ready for Indicium to be picked up; in this case by the system flow for Executing source code. Can you verify the system flow is running properly? By going into IAM > Applications > SQLSERVER_SF > Scheduled system flows > system_flow_execute_source_code > Job log, new entries should occur every 5 seconds.

Badge +4

Hello Mark, this is what is running.

Userlevel 7
Badge +23

That does look okay. I would expect the job to be picked up then. Last verification question, the SF database mentioned for the SQLSERVER_SF application in IAM is the correct SF?

Otherwise we need to look at why this doesn't get picked up. 

 

The system flow executes this procedure: prc_system_flow_connect_to_db_job_exists 

If you run the following query, do you find the pending job?:

select 
j.job_id,
j.project_id,
j.project_vrs_id
from job j with (updlock)
where j.job_type = 11 -- Connect to db
and j.job_status = 1 -- Pending

 

Badge +4

can I remove it from the table ?

Userlevel 7
Badge +23

It looks it's aborted (job_status = 6). That means the system flow will no longer look at it so that should fix the process.

You can remove the job from the table, however there may be referenced data that also would need to be removed. All can be removed safely.

Badge +4

All is removed safely