Hi,
Just a post in order to expose a solution in order to force the starting/stopping of a running job.
Force the job’s starting via DQL:
- Execute the following query:
1
UPDATE
dm_job OBJECTS
set
run_now=
true
,
set
a_next_invocation=
DATE
(NOW)
WHERE
object_name =
'[job_name]'
;
- Check the log and the automatically setting to initial value for the next invocation date by AGENT_EXEC process depending on the scheduling parameters of job :
1
SELECT
r_object_id, a_last_invocation, run_now, a_next_invocation
from
dm_job
WHERE
object_name =
'[job_name]'
;
2
## LOGS
3
SELECT
*
FROM
dm_sysobject
WHERE
folder(
'/Temp/Jobs/[job_name]'
)
ORDER
BY
r_creation_date
DESC
;
Force the job’s stopping:
- Get the process id, by running the DQL (dm_job.a_last_process_id):
01
SELECT
r_object_id, a_last_invocation, a_last_process_id, a_last_completion, a_special_app, r_lock_date, r_lock_machine, is_inactive, run_now, a_next_invocation, a_current_status, a_last_return_code, i_is_reference, i_is_replica dm_job
where
object_name=
'[JOB_NAME]'
;
02
03
04
r_object_id = 080xxxxxxxxxxxx9
05
a_last_invocation = 01/01/2016 10:00:56
06
a_last_process_id = 8976
07
a_last_completion = nulldate
08
a_special_app = agentexec
09
r_lock_date = 01/01/2016 10:00:52
10
r_lock_machine = MYSERVERDCTMCS
11
is_inactive = 1
12
run_now = 0
13
a_next_invocation = 02/01/2016 09:55:42
14
a_current_status = STARTED
15
a_last_return_code = 0
16
i_is_reference = 0
17
i_is_replica = 0
- Kill the process corresponding via the process explorer (Example: In Windows Task Manager, the process name must be “dm_agent_exec.exe”) or with a command instructions (Windows: taskkill /pid 1234).
In some cases, the job goes on to be executed despite of process killing. The job is unlock and without application specified of locker:
This situation is precised in the “a_current_status” field.
+ “a_current_status” = “The job object indicated the job was in progress, but the job was not actually running. It is likely that the dm_agent_exec utility was stopped while the job was in progress.”.
+ “r_lock_date” = nulldate
+ “r_lock_machine” = nullstring
+ “a_special_app” = ”
=> The unique solution is to restart the Java Server Method via the CMD (D:\Documentum\jboss7.1.1\server\stopMethodServer.cmd) OR Services Manager.Example of process’ stopping (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7):
01
Windows PowerShell
02
Copyright (C)
2016
Microsoft Corporation. All rights reserved.
03
04
PS C:\Users\useradmin> Get-Process -Id
13123
05
06
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
07
------- ------ ----- ----- ------ -- -- -----------
08
1923
23
252712
139328
5.77
13123
0
dm_agent_exec
09
10
PS C:\Users\useradmin> Get-Process -Id
13123
| Stop-Process
11
PS C:\Users\useradmin> Get-Process -Id
13123
12
Get-Process : Cannot find a process with the process identifier
13123
.
13
At line:
1
char
:
1
14
+ Get-Process -Id
13123
15
+ ~~~~~~~~~~~~~~~~~~~~~
16
+ CategoryInfo : ObjectNotFound: (
13123
:Int32) [Get-Process], ProcessCommandException
17
+ FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Commands.GetProcessCommand
18
19
PS C:\Users\useradmin>
- Unlock the job via the API commands:
1
dump,c,[JOB_OBJECT_ID]
2
unlock,c,[JOB_OBJECT_ID]
- Reset some execution-related job’s fields via DQL query (application/launcher of job, current status, ):
1
update
dm_job objects
set
a_special_app=
''
,
set
a_current_status=
'FAILED'
,
set
run_now=
FALSE
where
object_name=
'[JOB_NAME]'
;
- The job is unlocked now and ready to be run again.
01
SELECT
r_object_id, a_last_invocation, a_last_process_id, a_last_completion, a_special_app, r_lock_date, r_lock_machine, is_inactive, run_now, a_next_invocation, a_current_status, a_last_return_code, i_is_reference, i_is_replica dm_job
where
object_name=
'[JOB_NAME]'
;
02
03
04
r_object_id = 080xxxxxxxxxxxx9
05
a_last_invocation = 01/01/2016 10:00:56
06
a_last_process_id = 8976
07
a_last_completion = 01/01/2016 15:03:48
08
a_special_app =
09
r_lock_date = nulldate
10
r_lock_machine =
11
is_inactive = 1
12
run_now = 0
13
a_next_invocation = 02/01/2016 09:55:42
14
a_current_status = FAILED
15
a_last_return_code = 0
16
i_is_reference = 0
17
i_is_replica = 0
- Target server jobs:
01
select
distinct
target_server
from
dm_job
order
by
1;
02
....
03
target_server
04
05
06
MY_DOCBASE_TEST.MYAPP986_MY_DOCBASE_TEST@MYAPP986
07
MY_DOCBASE_TEST.MY_DOCBASE_TEST.MY_DOCBASE_TEST@myapp985
08
MY_DOCBASE_TEST.MY_DOCBASE_TEST@MYAPP998
09
MY_DOCBASE_TEST.MY_DOCBASE_TEST@MYAPP985
10
MY_DOCBASE_TEST.MY_DOCBASE_TEST@myapp998
11
MY_DOCBASE_TEST.MY_DOCBASE_TEST@myapp985
12
MY_DOCBASE_TEST.myapp900_MY_DOCBASE_TEST@myapp900
13
MY_DOCBASE_TEST.myapp986_MY_DOCBASE_TEST@MYAPP986
14
MY_DOCBASE_TEST.myapp986_MY_DOCBASE_TEST@myapp986
15
MY_DOCBASE_TEST.myapp953_MY_DOCBASE_TEST@myapp953
- All jobs:
01
select
r_object_id, method_name, is_inactive, inactivate_after_failure
from
dm_job
order
by
2;
02
....
03
r_object_id method_name is_inactive inactivate_after_failure
04
080xxxxxxxx38b dm_ACLReplication 1 0
05
080xxxxxxxx48f dm_AsynchronousWrite 1 0
06
080xxxxxxxx31d dm_AuditMgt 0 0
07
080xxxxxxxx334 dm_ConsistencyChecker 0 0
08
080xxxxxxxx32d dm_ContentReplication 1 0
09
080xxxxxxxx317 dm_ContentWarning 0 0
10
080xxxxxxxx318 dm_DBWarning 1 0
11
080xxxxxxxx330 dm_DMArchive 1 0
12
080xxxxxxxx319 dm_DMClean 0 0
13
080xxxxxxxx31a dm_DMFilescan 1 0
14
080xxxxxxxx33f dm_DataDictionaryPublisher 0 0
15
080xxxxxxxx32f dm_DistOperations 1 0
16
080xxxxxxxx3fc dm_FTCreateEvents 1 0
17
080xxxxxxxx3fe dm_FTIndexAgentBoot 1 0
18
080xxxxxxxx3fd dm_FTStateOfIndex 1 0
19
080xxxxxxxx388 dm_FederationCopy 1 0
20
080xxxxxxxx387 dm_FederationExport 1 0
21
080xxxxxxxx389 dm_FederationImport 1 0
22
080xxxxxxxx38a dm_FederationStatus 1 0
23
080xxxxxxxx386 dm_FederationUpdate 1 0
24
080xxxxxxxx32e dm_FileReport 1 0
25
080xxxxxxxx332 dm_GroupRename 1 0
26
080xxxxxxxx44e dm_GwmClean 0 0
27
080xxxxxxxx44d dm_GwmTask_Alert 0 0
28
080xxxxxxxx38d dm_LDAPSynchronization 1 0
29
080xxxxxxxx31b dm_LogPurge 0 0
30
080xxxxxxxx341 dm_MoveContent 1 0
31
080xxxxxxxx31e dm_QueueMgt 0 0
32
080xxxxxxxx340 dm_RemoveExpiredRetnObjects 1 0
33
080xxxxxxxx31f dm_RenditionMgt 1 0
34
080xxxxxxxx31c dm_StateOfDocbase 0 0
35
080xxxxxxxx32b dm_SwapInfo 1 0
36
080xxxxxxxx32c dm_UpdateStats 0 0
37
080xxxxxxxx333 dm_UserChgHomeDb 1 0
38
080xxxxxxxx331 dm_UserRename 1 0
39
080xxxxxxxx320 dm_VersionMgt 1 0
40
080xxxxxxxx3bb dm_WfmsTimer 1 0
41
080xxxxxxxx38c replicate_folder 1 0
42
....
43
080xxxxxxxed67 HUO_MyCustomJob1 1 0
44
080xxxxxxx103b HUO_MyCustomJob2 0 0
45
080xxxxxxx1f9d HUO_MyCustomJob3 0 0
46
080xxxxxxxxf6b HUO_MyCustomJob4 0 0
That’s all!!
Huseyin