Patch Tuesday, Database Connectivity, and Service Dependencies
Develop | Posted February 11, 2010

Roughly once a month, in the days following Microsoft's Patch Tuesday, we receive a number of tech support requests complaining that Code Collaborator lost its connection to the database. The Code Collaborator server had previously been working, but when everyone got to work on Wednesday morning, the server was reporting that "Name jdbc is not bound in this Context". What happened?

The most likely answer is that the server rebooted as part of installing the Patch Tuesday patches and the Code Collaborator server came back online before the database did. When the database is on the same machine as the Code Collaborator server, this can be easily prevented by setting up a service dependency. This will ensure that Windows starts the database before starting Code Collaborator.

Creating a service dependency is easy using the 'sc' command. To create a dependency between the Code Collaborator service and a local MySQL instance (assuming the default service names for each application), just run the following command:

sc config ccollab-server depend= mysql

For other databases, or if you've changed service names, you'll need to modify the command accordingly. That's it, no more database outages on server reboots. Note: the space between depend= and mysql is intentional and required.


By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox