Restore the
DBCleanUp task:
Step 1 - Take a backup of the ePO database before making any changes. For instructions to back up the SQL database, see one of the following articles:
Step 2 - Confirm that you are experiencing the issue described in this article.
- Log on to the Microsoft SQL Server Management Studio.
- Expand Databases.
- Right-click the ePO database (where the default name is ePO_) and select New Query.
- Paste the following SQL statements into the query window and determine which clean up tasks exist in the OrionTaskQueueMT table:
SELECT
SUBSTRING(TaskDescription, LEN(LEFT(TaskDescription, CHARINDEX ('<name>', TaskDescription))) + 6, LEN(TaskDescription) - LEN(LEFT(TaskDescription, CHARINDEX ('<name>', TaskDescription))) - LEN(RIGHT(TaskDescription, LEN(TaskDescription) - CHARINDEX ('</name>', TaskDescription))) - 6) as 'Task Name',
CONVERT(datetime, SWITCHOFFSET(CONVERT(datetimeoffset, OrionTaskQueueMT.RunTime), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS 'Local Start Time',
CONVERT(datetime, SWITCHOFFSET(CONVERT(datetimeoffset, OrionTaskQueueMT.EnqueuedTime), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS 'Local Queued Time',
CASE WHEN State=0 THEN 'Queued' WHEN State=1 THEN 'INVALID' WHEN State=2 THEN 'Pending/Waiting' WHEN State=3 THEN 'Running' ELSE 'Unknown' END as 'State'
FROM OrionTaskQueueMT
where taskdescription like '%db clean%'
- Click Execute.
The results are different depending on the version of ePO you are using.
Expected results:
ePO 5.9.x
Task Name |
Local Start Time |
Local Queued Time |
State |
DB Clean-up Task |
<date> |
<date> |
Queued |
ePO 5.10
Task Name |
Local Start Time |
Local Queued Time |
State |
DB Clean-up Task |
<date> |
<date> |
Queued |
DC DB Clean-up Tasks |
<date> |
<date> |
Queued |
IMPORTANT:
- If the results you see on your server, are like the examples above (One row returned on an ePO 5.9.x database, or two rows returned on a 5.10 database), you are experiencing a different issue. Stop here and contact support. See the Related Information field for details.
Step 3 - Determine the ID of the task that is missing from the above results
If you
do not see the above expected results, and there is a missing task, run the following query to show the task identifiers from the
OrionSchedulerTaskMT table:
SELECT Id, name, UniqueKey, Enabled FROM OrionSchedulerTaskMT WHERE name like '%db clean%'
NOTE: The script above determines the IDs of the missing tasks.
Expected results:
ePO 5.9.x
ID |
Name |
UniqueKey |
Enabled |
6 |
DB Clean-up Task |
DBCleanupTask |
1 |
ePO 5.10.x
ID |
Name |
UniqueKey |
Enabled |
7 |
DB Clean-up Task |
ClientTaskCleanupTask |
1 |
87 |
DC DB CleanUp Task |
DbCleanupTask |
1 |
Compare the above results with the results from the previous query, and determine the
ID of the task that is missing.
For example: If you are using ePO 5.10, and the query from
step 2 only returns the DB Clean-up Task, and
not the
CD DB Clean-up Task. Then based on the above results from the OrionSchedulerTaskMT table, the task with ID
87 is missing from the first set of results
Step 4 - Verify the issue is resolved.
- Run the following command using a web browser:
https://<ePO_server_name>:8443/remote/scheduler.updateServerTask?taskId=<ID_from_Step_3>&status=disabled&isHidden=true
- When prompted for credentials, type in an ePO user with Global Administrator permissions. For example, the original administrator user.
If there is any reply other than the following, provide the full error message with the current orion.log files to Technical Support and stop here. For contact details, see the Related Information section below.
OK
True
- Run the SQL query from 'Step 3' again, to show the results from the OrionSchedulerTaskMT table. The result shows that the task is disabled now (Enabled =0).
- Delete records in OrionSchedulerTaskQueueEntryMT using the ID of the missing task found in 'Step 3':
DELETE FROM OrionScheduledTaskQueueEntryMT WHERE SchedulerTaskID = < ID_from_Step_3>
NOTE: You might see a message that states, "0 rows affected". If so, this message does not indicate a problem. Continue to the next step.
- Run the following command using a web browser:
https://<ePO_server_name>:8443/remote/scheduler.updateServerTask?taskId=<ID_from_step_3>&status=enabled&isHidden=true
If there is any reply other than the following, provide the full error message with the current Orion.log files to Technical Support, and stop here. For contact details, see the Related Information section below.
OK:
True
- Run the SQL queries from Step 2 and 3 again. The first query must now return the expected results as shown in the example in Step 2. The second query is expecteed to now show that the task is enabled again (Enabled =1)