602SQL Documentation Index  

602SQL Server Operation on Windows

The 602SQL database server for Windows can be run either as a simple task or as a service.

For central startup and termination of 602SQL servers since version 11, serves a utility called Server Manager. We describe here only the control of servers without Server Manager that is also possible, or general principles of service registration etc.

Running SQL Server as a Task

SQL server is run as a task mainly if it's desired to turn it on and off according to current needs.

Executing Server as a Task

The server is housed in the 602sqlXX.exe program. You can specify these switches to the command line:
Switch Meaning
-n database_name Specifies database to work with
-p password Specifies a password in case of password protected (encrypted) database
-N Runs the TCP/TP protocol regardless of the server communication options; not used frequently in the current version.
-Q Disables executing of system triggers - used only for solving critical errors, when a procedure run by a system trigger on server startup blocks further work.

You can set a slash instead of a dash (i.e. /N and -n are considered the same switches)

If the parameter specifying database name is missing, then the server behavior depends on the count of local databases. If only one database has been registered, the server logs in to it (till version 10, it started to provide its services in the network, since version 10, it is controlled by the setting in the Protocols and Ports dialog). If there are multiple databases, it is necessary to select one from the displayed list.

If the database is located on the same computer as the 602SQL Client, then the server may be executed by the client from the Control Panel.

All modes of server startup (i.e. using Server Manager, using client environment or directly by double-click to the EXE file or from the shortcut-calling EXE) are equivalent.

Indication of a Running Server

The running server is either displayed in the Windows toolbar among other running tasks or marked by a small icon in the system tray. You can select the way of indicating server runtime simply by assigning the Tray Icon server property value of 0 or 1 (simply in the Runtime parameters dialog).

The server console will open when clicking on the server icon.

Terminating a Server Running as a Task

Running SQL Server as a Service

SQL server is run as a service mainly if it's desired to be executed automatically on Windows startup. An advantage of a service is that the server may be run on a computer in a closed room. It's usually run on a system account, therefore nobody has to be logged in to the computer.

The SQL server service has to be registered in the system under a specific name. If you want to run more SQL servers on a single computer you have to register them under different names.

Service Registration and Configuration

Service registration and configuration is done in the 602SQL Client. Choose a local server that is not running from the registered server list in the control panel for which you want to register the service. Execute the Database management action from the popup menu and switch to the Service / Daemon tab in the window that appears. Assign the service a name (e.g. "602SQL Server") and register it with the appropriate button. You can further specify whether the service will be executed automatically on each Windows startup or executed manually. Automatic execution is not recommended if you have to specify the password for the database file. The way of executing the server can also be setup from the Windows Control Panel, Services utility.

You have to have administrator privileges in Windows to register a server as service.

Executing SQL Server as a Service

A service can be executed automatically on Windows startup if it's configured to, or can be run manually. Services are being executed by the Start button from the Windows Control Panel for services. You can execute the service in the Database management window by clicking the Start button.

SQL server running as a service works over the database specified in the configuration (see above). If the communication protocols are not explicitly set, the network access is provided by TCP/IP.

If an error occurs when starting a service, this event is written in the Windows event log into the Application section. The error description can be analyzed using the system event viewer.

Indication of a Running Service

The running service is not indicated on Windows desktop at all (only as an item within the process list in Task Manager). Therefore it is also not possible to open the server window. Information about the sever can be obtained only using the 602SQL Client after login or using the Server Manager.

Terminating a Server Running as a Service

A server running as a service can be terminated:

If some user is connected to the server a warning message appears in case of attempt to stop the server.

What You Should Keep in Mind when Running a Service

Because the service runs on a system account, it's necessary to grant the operating system privileges for everything the server works with, mainly the database file. These privileges are not usually granted automatically.

In the case when a client program accessing 602SQL server runs as a service it's necessary that the 602SQL server runs as a service too, otherwise the request processing is unbearably slow.

Inspecting and Controlling the Server Runtime

The basic server runtime information is displayed in the server console. The console is opened by clicking on the server runtime indicator.

The console doesn't have many controls, server runtime is controlled from the client. Information about server version, used network protocols (or the N/A sign when running local server), number of currently connected clients and the maximum number of allowed clients is displayed in the upper part of the window.

The so-called basic server log is displayed in the console. The log contents may be also configured from the client. You can enable or disable the error monitoring of individual client operations.

Clients Who Don't Logoff

If a client who is logged in a 602SQL server crashes, it may block those data on the server, that it previously locked but didn't unlock afterwards. When a server recognizes critical client failure, it frees everything the client blocks.

If the client and the server run on the same computer, the server recognizes critical client failure usually immediately. If they're running on different computers, then the time it takes the server to recognize the failure depends on the network protocol configuration, usually not more than a few minutes.

In rare cases the client may still remain logged in. You may disconnect the client manually or restart the server (in some extreme case).