Problem:
How to configure P6 to run background jobs.
How to check that background jobs are running correctly.
How to run DAMON and SYSMON processes
The database has not been configured to run background jobs.
When logging into Project Management 6.0 the following error is received:

"The database has not been configured to run background jobs. To correct this problem, please contact your System Administrator or see the Primavera’s Administrator Guide."

**Also included in the error are the last run times for each background job

Error: "The database has not been configured to run background jobs."

Version(s):
PM 6.0, 6.0 Beta

Cause:
Background Processes and Cleanup in Versions prior to P6:

Prior to P6, the task of cleaning up the database was initiated by the PM (Project Manager) client application. Depending on the cleanup task, these tasks were automatically initiated by the PM client when users logged in and out of individual sessions or when the task was manually initiated via an option on the Admin menu.

Background Processes and Cleanup in P6:

Because cleanup tasks can be resource intensive and time consuming, in P6 these tasks are initiated by two background processes that run on the database server:

  • SYMON (System Monitor), responsible for running procedures that take less than a few seconds to complete.
  • DAMON (Data Monitor), responsible for running procedures that take longer than a few seconds to complete.

Both of these processes are pre-configured with default settings. Since the default settings are optimal for most environments, you generally do not need to tune them. However, if further optimization is required, you can change the settings to tune the behavior of the background processes for specific environments.

NOTE: SQL sever 2005 EXPRESS version does not include a background process scheduler component. Primavera provides a process scheduler service for use with SQL server 2005 EXPRESS ONLY.

Fix:
For similar issues in SQL 2005 Express, please refer to: Solution Id: prim66581 – "Error: "The database has not been configured to run background jobs." connecting to SQL 2005 Express"

Fix1:
NOTE – If you have just installed Primavera 6.1 Standalone on a new machine that did not previously have Primavera 5.0 or Primavera 6.0 installed on it, a driver file for the background agent may not have been installed automatically.
P
lease see: prim65691 – Error: "The database has not been configured to run background jobs." after installing Primavera 6.1 Standalone

Fix2:

Background Process Tracking

When troubleshooting issues with background processes there are two places where data is stored to check when the background processes were last run and what the outcome was:

1. Database System:  Records on the last activity of the processes are stored by the database system (in this case Oracle and SQL 2000/2005).  See details below for each database type.

2. Primavera Database Tables:  Logs of background process activity are stored in tables within the Primavera database.

2.1 SETTINGS table:

Each time a job runs it will update the settings table with a record. A job may update this table several times during execution.

The settings table it also updated with a HeartBeatTime record for both the symon and damon processes. This is a record that is regularly refreshed by the background processes to indicate that they are still running. On startup Primavera checks for HeartBeatTime records in the settings table and if the stored HeartBeatTime records are absent or old then Primavera will issue a warning �The database has not been configured to run background jobs� when starting.

By default Primavera will issue the warning on startup if:

the database.background.Damon HeartBeatTime record has a value in the "setting_value" field older than 15 minutes

or

the database.background.Symon HeartBeatTime record has a value in the "setting_value" field older than 10 minutes.

You can query the database to check the values with the following query.

SQL> select namespace, setting_value FROM settings WHERE setting_name = ‘HeartBeatTime’

2.2 BGPLOG table:

This table holds a detailed log of the execution of background jobs  such as:

log_time: Time when the log entry was made by the background process

source: Process generating the log entry (e.g. data_monitor)

type: Type of message

description: Message from the background process

To check the logs stored in the BGPLOG table issue the following command:

ORACLE:

SQL> select log_time, source, type, description from admuser.bgplog;

SQL Server 2005 Express:

Log into Microsoft SQL Server Management Studio Express and run the following command:

select log_time, source, type, description from dbo.bgplog;

Fix3:

Oracle 9i and 10g

SCHEDULER:

P6 uses DBMS_JOB system to schedule jobs in Oracle. Provided the main oracle database service is running the DBMS_JOB system should also be active.

NOTE: You may also have an additional OracleJobScheduler service – this is external and unrelated to DBMS_JOB.

JOBS:

You can check what jobs exist on the oracle database by logging in as a user with SYSDBA privileges and issuing the following SQL command:

SQL> select JOB, LOG_USER, LAST_DATE, NEXT_DATE, WHAT from DBA_JOBS;

If the Primavera job processes (system_monitor and data_monitor) are not listed then these can be reinitialized by running the following command:

SQL> exec admuser.initialize_background_procs;

JOB_QUEUE_PROCESSES

The Oracle parameter JOB_QUEUE_PROCESSES defines how many background processes can be run at a time by DBMS_JOB. This should be set to a minimum of 2 for a primavera instance (for the two processes system_monitor and data_monitor). It may be necessary to set JOB_QUEUE_PROCESSES to a greater value than two if other DBMS_JOB processes are present on your system.

To check the value of JOB_QUEUE_PROCESSES issue the following command:

SQL> show parameter job_queue_processes

And to change the value if necessary use:

SQL> ALTER SYSTEM SET job_queue_processes = 10;

Fix4:

SQL Server 2000 or 2005 (NOT 2005 EXPRESS)

SCHEDULER:

The SQL Server 2000 and 2005 jobs use the SQL Agent to schedule jobs. If you are using SQL Server 2000 or 2005, verify that the SQL Server Agent service is started on the server and has a startup type of automatic.

Logs for this service can be found (by default) at:

C:\Program Files\Microsoft SQL Server\<INSTANCE_NAME>\LOG\SQLAGENT.x

This log includes information on when the service was stopped/started

JOBS:

You can check what jobs exist on the SQL Server 2000 or 2005 database by issuing the following command through SQL Query Analyzer (2000) or through Microsoft SQL Server Management Studio:

select * from msdb.dbo.sysjobs

If the Primavera background processes (SYMON and DAMON) are not listed then these can be reinitialised by running the following command:

exec initialize_background_procs