|
SQL Server Operation on Windows | SQL Server Operation | Name, Address and Identity of a 602SQL Server |
The 602sql database server for Linux can be running in the foreground (communicating with an operator through console) or as a daemon in the background (accessible only from clients and also - in a limited way - by signals ).
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.
The SQL server installation notes can be found here.
SQL server accepts these command line switches:
If the -n switch is not specified, then:
The -p switch and the password have to be specified if the database is encrypted and protected by a password.
SQL server running in the foreground can be operated by keyword and displays new entries in the basic log on the screen. SQL server is run in the foreground mainly if it's desired to turn it on and off manually according to current needs.
SQL server is executed to run in the foreground from the console by the command:
602sqlXX -nserver_nameor
602sqlXXif there's only one server registered on the computer.
A server over a local database can be run from the 602SQL Client by the Start server command from the popup menu in the server list in the Control Panel. The Linux user has to have sufficient privileges for the database file.
A server running in the foreground responses on keystrokes; a list of acceptable keys and their meanings can be displayed after pressing the "h" key. The server is terminated by the "q" key.
SQL server is run as a daemon mainly if it's desired to start the server automatically after system startup.
If you need to watch the server log on the screen, use the tail -f <log file path> command.
A SQL server is executed as a daemon, if the -d switch is specified in the command line. It's also recommended to specify the -P switch for displaying the process number. A server running as a daemon is terminated by sending the TERM signal and the kill <process number> command. You can also use the graphic interface for process control.
Another method is to use the /etc/init.d/s602sqlXX script file, that controls all servers registered in the /etc/602sql file with the AUTOSTART=1 flag. The command
/etc/init.d/s602sql11 startexecutes all these servers in the background and saves their process numbers. The command
/etc/init.d/s602sql11 stopthen terminates these server. The
/etc/init.d/s602sql11 restartcan be used to restart these servers, and the command
/etc/init.d/s602sql11 statusdisplays each server's status Only the root user may execute these operations. Multiple server controlling doesn't affect the servers without the AUTOSTART flag or if this flag has an empty or zero value.
Another method for executing server automatically on system startup can be utilized on some Linux distributions. If a distribution allows to, then you can ensure the execution of "/etc/init.d/602sqlXX start" or "/etc/init.d/602sqlXX stop" on server startup or shutdown by the chkconfig s602sqlXX -add command.
This method is used on standard installation of the rpm package on SUSE and RedHat distributions and their successors.
You can get the process list of running daemons by executing the ps program:
ps u -C 602sqlXX --forestfor RedHat 8 Linux distributions use
ps u -mC 602sqlXX --forestThere are at least 4 running processes for each running server; each tree in the displayed list corresponds to a single server.
Ports currently taken by running servers can be found using the netstat command, e.g.
netstat -npaA inet |grep 602sql
USER=<user name>then the server runs on this user account.
The user whose account is running the server has to have read and write privileges to the database files (including logs) and to the database folder. Further he has to have the privilege to read and write to the /etc/602sql file and the privilege to create files in the /etc folder.
List of topics:
SQL Server Operation on Windows | SQL Server Operation | Name, Address and Identity of a 602SQL Server |