Running the SOS SQL Anywhere 11 Database as a Windows Service


The following instructions are applicable to SOS 2010 and later.


The primary reason to configure the SOS SQL Anywhere database to run as a service is that it will continue to run even if nobody is logged into the server computer. Assuming that you set the service to run automatically, it will start as soon as the server boots up. When a service starts, it uses a special system account called LocalSystem (or use another account you specify). The service is not tied to the user ID of the person starting it, and therefore is not stopped when that person logs off.

To add a new service

  1. On the computer that runs the SOS database, open a command prompt.
  2. NOTE: This must be an “administrator mode” command window, so in Server 2008, Vista, and other recent versions of Windows, be sure to right-click the Command Prompt icon and select “Run as Administrator”. In previous versions, it will be enough to log into Windows using an account that has administrator privileges.
  3. Change to the C:\SOS\SA\Bin32 directory (that is, the SA\Bin32 folder within the folder containing your SOS program files, assuming a default installation on the C: drive).
  4. Execute the Service Creation Utility using the -w option. For example, to create a database server service called “mysos”, which starts the specified engine with the specified parameters type the following command, all on one line. The options below will set the service to run under the system account, as a network service, to start automatically, to display the database icon in the system tray, and to be named “mysos”. It will appear in the Windows Services Manager as “SQL Anywhere – mysos”. If you are running the database in 64-bit Windows, using the 64-bit option is recommended, but either version of the engine will work. The 64-bit engine often provides better performance, especially for larger databases. Note that the -i option to display the icon in the system tray won’t work on Vista, 7, or Server 2008 and later, so omit that option if using one of those. Service configuration commands are case sensitive. Type your options exactly as shown (eg: “automatic” will fail but “Automatic” will work).
    32-bit Windows:
    dbsvc -as -t network -s Automatic -i -w mysos c:\sos\sa\bin32\dbsrv11.exe @c:\sos\server.prm c:\sos\data\sosdata.db
    64-bit Windows:

    dbsvc -as -t network -s Automatic -i -w mysos c:\sos\sa\bin64\dbsrv11.exe @c:\sos\server.prm c:\sos\data\sosdata.db
  5. After executing the command, you will find a new Windows service listed in Windows’ Administrative Tools > Services applet: SQL Anywhere – mysos. You can adjust the properties for the service just as you would for any other service.

Notes on adding a service:

  1. Service names must be unique within the first eight characters.
  2. If you choose to start a service automatically, it starts whenever the computer starts Windows.
  3. Choose the account under which the service will run: the special LocalSystem account or another user ID.
  4. If you want the service to be accessible from the Windows desktop, check Allow Service to Interact with Desktop. If this option is cleared, no icon or window appears on the desktop or use the -i option when creating the service.

Removing a service

Removing a service removes the server name from the list of services. Removing a service does not remove any software from your hard disk. If you wish to re-install a service you previously removed, you need to re-type the options.

To remove a service (Command line)

  1. Open an administrator command prompt. (See NOTE under item 1 in the first section of this document.)
  2. Execute the Service Creation utility using the -d option. For example, to delete the service called “mysos”, without prompting for confirmation, type the following command:
    dbsvc -y -d mysos

Notes on removing a service:

In some cases “deleting” a service just marks it for actual removal when you next reboot the system. If you want to delete a service in order to add a new one with the same name, you will have to reboot after doing the deletion, then add the new service when the system has restarted. If you use a different name for the new service, you can disable the old one using the Windows services applet, then delete it as described above so that it will be removed the next time you reboot. You can then add the new service and start it, as long as you are careful to use a different name.

Detailed Reference for the DBSVC Utility

(see also page 820 in the SQL Anywhere Database Administration manual)

Managing services using the dbsvc command-line utility

Syntax dbsvc [ options ] <svc>

dbsvc [-q] [-y] -d <svc>

dbsvc [-q] -g <svc>

dbsvc [-q] -l

dbsvc [-q] [-y] <creation options-w <svc> <details>

Option Description
-a Account name to use (used with -p)
-as Use local system account
-d <service name> Delete a service
-i Allow service to interact with the desktop. Displays an icon that you can double-click to display the database server messages window.
-g <service name> Get details of a service
-l List all SQL Anywhere services
-p Password for account (used with -a)
-q Do not print banner
-rg dependency Specify group dependencies when creating a service
-rs dependency Specify service dependencies when creating a service
-s startup Startup option (default is manual). You must specify Automatic, Manual, or Disabled.
-sd <description> Use this option to provide a description of the service. The description appears in the Windows Service Manager.
-t <type> Type of service, eg: Network
-u <service name> Starts the service named service_name
-w <executable parameters> Creates a new service, or overwrites one if one of the same name exists. If you supply -y, the existing service is overwritten without confirmation.
-x <service name> Stops the service named service_name
-y Delete or overwrite service without confirmation

A service runs a database server or other application with a set of options. This utility provides a comprehensive way of managing Adaptive Server Anywhere services on Windows. The Service Creation utility provides the same functionality as the Service Creation wizard in Sybase Central.

You must be a member of the Administrators group on the local machine to use the Service Creation utility.

Exit codes are 0 (success) or non-zero (failure).

This utility accepts @filename parameters.

(all executed from the c:\sos\sa\win32 command prompt, even if creating a 64-bit service)

Create a personal (not networked) database service called mypersonaldb, which starts the specified standalone engine with the specified parameters. The engine runs as the LocalSystem user:

dbsvc -as -w mypersonaldb c:\sos\sa\bin32\dbeng11.exe @c:\sos\server.prm c:\sos\data\sosdata.db
dbsvc -as -w mypersonaldb c:\sos\sa\bin64\dbeng11.exe @c:\sos\server.prm c:\sos\data\sosdata.db

Create a network database service called mynetdb. The server runs under the local account, and starts automatically when the machine is booted (all on one line):

dbsvc -as -s Automatic -t Network -w mynetdb c:\sos\sa\bin32\dbsrv11.exe @c:\sos\server.prm c:\sos\data\sosdata.db
dbsvc -as -s Automatic -t Network -w mynetdb c:\sos\sa\bin32\dbsrv11.exe @c:\sos\server.prm c:\sos\data\sosdata.db

List all details about service myserv:

dbsvc -g myserv

Delete the service called myserv, without prompting for confirmation:

dbsvc -y -d myserv

How-To Easily Determine Which Date-of-Service is Outstanding on an Account

How-To Easily Determine Which Date-of-Service is Outstanding on a Patient Account

SOS Product: Office Manager for Windows


You may get a call from a client wanting to know which dates of service are still outstanding on his/her account as well as how much is outsanding on each date. easisert way to tell is to bring up the  By-Charge Ledger for the client.

Here’s the process:

  1. Go to the Active Patient List
  2. Highlight the client, then click on the Ledger icon (Little Book.) located at ?
  3. Click the ledger by charge icon (Dollar Sign.)
  4. If the view is not collapsed, click on the Collapse All icon (3 to 1 square.) This will show only the charges. Any charges in black are fully paid and anything in red has an outstanding balance.
  5. If you need to know which payers have a balance, click on the plus sign (+) in front of the date-of-service and it will show you which payers have an outstanding balance and how much.


While you are on the phone or the client is at the window, the data is quickly accessed and it will save you time.

Investigating Database Locks

Whenever a user initiates an action that asserts an exclusive lock on a table, or even a single row in a table, it will cause other users trying to change or save data to the locked table or row to be “blocked” — forced to wait until the first user concludes the action. While blocked, users will experience an ongoing “hourglass” or spinning circle icon. Often that condition will be misinterpreted as a program crash. To determine if there is a locking/blocking situation, the administrator can run a simple query in DBISQL while the blocking is still on-going to show the condition of the user connections.

SOS has worked hard to prevent locks that last more than a split-second, but even with mature software like SOS, it is possible that something slipped through. If you are able to identify a persistent locking situation, be sure to report it as soon as you can.

After opening DBISQL and logging in with a SUPER level account, execute the following query:

SELECT number, userid, blockedon, lockrowid, locktable FROM sa_conn_info()

The results will look something like the figure below:

We have highlighted the row that shows the user connection that is being blocked. The “blockedon” column value is the number of the connection that is responsible for the block. Matching that number to the row with the same value in the “number” column tells us that it is the user SUPER who is creating the lock that is blocking the highlighted user. Other columns in the highlighted row show us the id of the specific row that is locked, as well as the name of the database table in which that row is found. Until this lock is released, the blocked user “OM_MF” will not be able to proceed.

In practice, the user setting the lock will generally be in the form <module-prefix>_<UserID>. For example, “SC_MF” would indicate user MF connecting from module Scheduler (SC). Other prefixes are OM for Office Manager, CM for Case Manager, and AD for the Admin module. In our example above, we used DBISQL to create the lock, which is why there is no prefix.

Once you know the UserID of the responsible user, ask the user to complete the operation, return to the indicated module’s main menu, or exit that module altogether. Doing so will immediately remove the lock, and any blocked users will return to normal operation.

If you should repeatedly run into a scenario the you can identify and reproduce, please report your findings to SOS tech support as soon as possible, so that our developers can diagnose the problem and roll out a fix.

How to enable BitLocker even if your computer does not have TPM

TPM is a chip that is included on higher end business-oriented computers. If present, it is used by BitLocker.

If you don’t have TPM in your computer, you can still use BitLocker if you follow the steps below (from a post on ).

How to Configure Computer to Enable BitLocker without Compatible TPM:

Administrators must follow the steps below to configure their Windows 8 computers to allow enabling Bit Locker Drive Encryption without compatible TPM:

a. Log on to Windows 10 computer with an account that has administrative privileges.

b. Assuming that the computer has been configured to display the classic start menu, click Start (or the Windows icon) and at the bottom of the menu in search box type GPEDIT.MSC command and press enter key.

c. On the opened Local Group Policy Editor snap-in, from the left pane expand Computer Configuration > Administrative Templates > Windows Components > Bit Locker Drive Encryption and from the expanded list click to select Operating System Drives.

d. From the right pane double-click “Require additional authentication” at startup.

e. On the opened box click to select Enabled radio button and ensure that under Options section Allow Bit Locker without a compatible TPM checkbox is checked.

f. Once done, click Ok button to allow the changes to take effect and close Local Group Policy Editor snap-in.

VeraCrypt (TrueCrypt) won’t let me encrypt my system drive

SOS users are often reminded of the importance of disk encryption to keep their precious data safe in the event of computer loss or theft. For many years we have been recommending use of TrueCrypt, which now has been re-born as VeraCrypt, or Microsoft’s BitLocker feature (Available in Pro and Enterprise versions of Windows).

Here’s an article that explains how to upgrade from Windows 10 Home to Windows 10 Pro.

For those using non-commercial versions of Windows such as Windows Home, VeraCrypt is a free, proven, reliable, and effective option, and full disk encryption is recommended. There can be a hitch, however. At present You can only encrypt the boot (main) drive in your computer if it is partitioned with the older MBR method. There are several YouTube videos and articles on the web that show various techniques that can be used to convert a drive from GPT to MBR, after which you can use all the features of VeraCrypt. It is possible to lose ALL your data converting from GPT to MBR, so it is ESSENTIAL that you back up your entire C drive before proceeding with any of those tools. If your drive is partitioned as GPT, GUID, UEFI, or EFI, and you are not technically oriented, you might be better off just upgrading Windows to the Pro version and using Microsoft’s BitLocker feature. 

How to enable BitLocker even if your computer does not have TPM