Running CatBase Server as a Service on Windows

Running CatBase Server as a service

Why run CatBase Server as a Service?

You may be asking yourself: what is a Service? But more importantly, you may be asking yourself, why should I run CatBase as a service? Let’s start by first looking at what a Service is.

What is a Service?

On Microsoft Windows operating systems, a Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. Windows services can be configured to start when the operating system is booted and run in the background as long as Windows is running, or they can be started manually when required. They are similar in concept to a Unix daemon.

Source: http://en.wikipedia.org/wiki/Windows_service

Why run CatBase Server as a Service??

The main benefit of using CatBase Server as a Service is a greater integration with the operating system such as:

  • Automatically start when the operating system boots up
  • Automatically stop when the operating system shuts down

In addition to automatically starting and stopping, services can also be configured to perform specific actions in the event of a failure such as:

  • Restarting the Service
  • Run a program or script
  • Reboot the computer
  • Take no action 

How to run CatBase Server as a Service

Note: We assume that you have a certain amount of knowledge about managing your Windows operating system.

  1. You must be logged on to the server as an Administrator.
  2. If the CatBase Server is running, Quit.
  3. Right-click on the executable (catbase.exe), or on the CatBase Server shortcut if you have created one (this may have been created on your Desktop when you installed the software).  and choose Run as Administrator. The executable will be found in the CatBase Server folder on your C: drive.
  4. If necessary, select a database to open.
  5. When you see the Server Administration window, go to the File menu and choose Register current database as service.
  6. Quit the CatBase Server.
  7. Open the Services app..
  8. You should see 4D Server: CatBase 10 listed as a service.
  9. Right-click on 4D Server: CatBase and choose Properties.
  10. Change the Startup Type to Automatic.
  11. Go to the Log On tab.
  12. Select the This account: radio button.
  13. Click the Browse ... button.
  14. In the Enter the object name to select area, type in the user name that you're logged in with.
  15. Click the Check Names button.
  16. The text you entered will be replaced with a pathname such asa "ThisComputer\username", or you'll get an error message if you have entered the username incorrectly.
  17. Click OK.
  18. Now you will need to enter the user's password (twice), then click Apply. Note: It will check tat you've entered the passwork in the same way twice, but it doesn't check if the password is correct!
  19. Click Apply, then go back to the General tab.
  20. Under Service Status, click Start.
  21. Shortly the Service Status should change to Running. You might want to keep an eye on it for a few minutes to make sure it continues running. If the Service Status changes to Stopped, there's a problem! Please contact CatBase Tech Support for help.
  22. CatBase Server will now be running as an automatic service.

What to do when you have a program or database update

When running as a service, the application is "headless" - it doesn't have an interface. So you will not see any messages, such as a message asking you to select a database to open. When you try to log in via a CatBase Client, you may get an error message because the CatBase Server has not finished booting up, but you cannot see a message telling you so! Therefore you must follow the following procedure:

To install a CatBase Server program update:

  1. Make sure all users are logged off.
  2. Open the Task Manager.
  3. Click the  Services service in the Services tab
  4. Right-click on 4D Server: CatBase and choose Stop.
  5. Close the Services window.
  6. The 4DS catbase service should now show as Stopped.
  7. Locate the OLD CatBase Server .exe
  8. Right-click on it and choose Run as Administrator
  9. When the Server Administration window appears, go to the File menu and choose Unregister current database.
  10. Quit.
  11. Install the program update.
  12. Locate the new CatBase.exe and right-click on it; choose Run as Administraotr..
  13. If it asks you to create or open a database, choose Open.
  14. Locate your database and open it.
  15. When the Server Administration window appears, go to the File menu and choose Register Current Database as Service.
  16.  Quit
  17. Now go back to the Task Manager
  18. Right-click on the 4D Server: CatBase item and choose Start

It's ready to go.

Updating a Database

If you need to open a different database - for example, if we have done some work on your database and sent you an update - follow these steps:

  1. Move or copy or unzip the database into your preferred folder.
  2. Make sure all users are logged off.
  3. Open the Task Manager.
  4. Click the  Services service in the Services tab
  5. Right-click on 4D Server: CatBase and choose Stop.
  6. Close the Services window.
  7. The 4DS catbase service should now show as Stopped.
  8. Delete your old database, or move it into a backup folder.
  9. Locate the CatBase Server .exe
  10. Start it up manually (by double-clicking on it)
  11. It will ask you to Create or Open a database: choose Open.
  12. Locate your new database and open it.
  13. When the Server Administration window appears, Quit.
  14. Now go back to the Task Manager
  15. Right-click on the 4D Server: CatBase item and choose Start

You're good to go!

Go to CatBase.com