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) and choose Run as Administrator. The executable will be found in the CatBase Server folder within the Programs (x86) 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 Task Manager.
  8. Go to the Services tab.
  9. Click the Services button at the bottom of the window.
  10. This will open another window listing all the running services. At the top of the list you should see 4D Server: CatBase. The Startup Type will show Manual.
  11. Right-click on 4D Server: CatBase and choose Properties.
  12. Change the Startup Type to Automatic.
  13. Click Apply, then OK.
  14. 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