Start adTempus service with database unavailable

Janco (9 posts)
May 19, 2014 02:05 AM
Accepted Answer

We have our adTempus database running on a separate dedicated SQL Server. On corporate maintenance weekends, all servers are restarted, with the adTempus server starting up before the SQL server.

adTempus then doesn't start up, and the following is recorded in the event log: (Note that the actual server name was removed for security)

The adTempus service cannot be started due to a database problem: adTempus is unable to connect to database 'AdTempus' on server xxxxxxx. Please verify that adTempus is configured with the correct database name. Cannot open database "AdTempus" requested by the login. The login failed. (-2147467259; native error=4060; SQL state=42000) (DBERROR358).

According to this page: https://www.arcanadev.com/support/kb/K00000326.aspx, issue CR00000600 was fixed in 3.0.5. We're running 3.0.8 and still have this problem.

Any ideas?

Bill Staff (604 posts)
May 19, 2014 06:50 AM
Accepted Answer

The change you referenced was intended to handle scenarios where SQL Server is on the same computer as adTempus, so the time adTempus waits for a database connection is only about 50 seconds. It's not possible to extend this wait much, because there's a limit to how long Windows will wait for the adTempus service to start.

If you can't coordinate the restarts so the database server starts first, the best solution I can think of would be to have a script or program registered to run at startup on the computer, that would retry the adTempus service until it starts.

Janco (9 posts)
May 19, 2014 07:46 AM
Accepted Answer

Thanks. I assume this is also the case for adTempus 4?

Bill Staff (604 posts)
May 19, 2014 12:07 PM
Accepted Answer

The behavior is the same in adTempus 4. However, we could look into changing version 4 to support a longer wait period.

How long after the database server is the adTempus server generally being started? You could also try changing the startup type for the adTempus service to "Automatic (Delayed Start", which would cause Windows to delay for 2 minutes or so before it tries to start adTempus. That plus the built-in retries would get you to 3 minutes.

Janco (9 posts)
May 20, 2014 12:54 AM
Accepted Answer

Once adTempus is running, how does it handle database connectivity issues?

Let's say for example, the adTempus service is running, and then the database becomes unavailable for a short period of time. Does the service stop, or does it continue running and resume normal operation once the database becomes available again?

Bill Staff (604 posts)
May 20, 2014 09:15 AM
Accepted Answer

adTempus was not designed to operate without a database connection, and does not handle the situation well.

In version 3, you will get an error message logged in the Application log in the Windows Event Viewer, but adTempus will continue trying to operate. Jobs may not be started, and status/history updates for executing jobs will be lost because they cannot be saved to the database.

Version 4 handles things a little better by retrying database operations, but this is intended to address very brief connection failures or timeouts (< 1 minute).

If you cannot count on the database server being always available for adTempus, you should consider installing SQL Server Express on the same computer as adTempus and using that to host the adTempus database. This is the default configuration for adTempus.

Janco (9 posts)
May 21, 2014 02:12 AM
Accepted Answer

Thanks for the responses, it made our options clearer.

Replies are disabled for this topic.