Process Management
I have a number of Unix servers each running Warehouse. Is there a way to check on the status of the WHSERV processes beyond invoking ps via remsh?
Running Warehouse with the –c option causes Warehouse to enter into a special mode for checking availability of and connections to WHSERV processes running on any remote platforms.
When my production Solaris server is active and I run ps –aef on it, I notice that there are multiple copies of the WHSERV processes running. What is this all about?
This is normal behavior. What you are seeing is the manner by which the Warehouse server handles remote client requests for service in Unix.
The primordial WHSERV listens on a well-known port (default 1610) and will fork/exec a copy of itself for every remote connection request it receives from a Warehouse client. WHSERV then hands off the socket connection associated with this request to the newly-created child process. The child WHSERV process transacts with the remote client and gracefully terminates when the client closes the connection.
Tip: based on the ps command, a quick way to distinguish the primordial WHSERV from its child processes is that the former runs as root whereas the latter run under a client login id.
How does the Warehouse server handle a remote login in a Unix environment?
When a Warehouse client parses a OPEN … REMOTE statement while processing a script, it uses the information contained in that OPEN statement to place a remote connection request to the Warehouse server listening on the specified remote machine. For example,
open remotedb remote unixmachine user=qa password=homer &
oracle scott/tiger home=/b/u01/oradata/ora sid=ora8
The Warehouse server on unixmachine thenspawns a copy of itself. The spawned Warehouse server process inherits the connection request and is sent the system user and password (in this case qaand homer) from the remote Warehouse client.
The server then checks the Warehouse authorization file, AUTHFILE, to determine whether the client computer/user and server/user combination are authorized for service.
If authorized, the server reads /etc/passwd to check the validity of the user and password onunixmachine.
Finally, if the user is valid, the server changes the working directory to the directory listed in /etc/passwd and SETUID’s itself to the user id. At this point the Warehouse can open the database described in the OPEN statement