Monday, June 16, 2008

Running DAC Service in Background mode

I have been planning about running DAC Server in background mode in Solaris but did not work with nohup. I first had to change the way the confog.sh and dac_env.sh are called ("source ./config.sh" to ". config.sh") in order to start DAC Server. When I use "nohup startserver.sh &" at command prompt, it errors out immediately. nohup.out file has the error as - LD_LIBRARY_PATH=......... : is not an identifier. I mentioned in one of my earlier posts that it is one issue that I have to fix as doing Ctl+c on the Solaris session does not release the connections DAC made with the database, causing lot many Inactive sessions on the database. Also, having a windows machine just to run DAC Service on the Solaris command prompt is simply not convincing, acceptable and sounds odd.

I found the other day when I had to restart DAC Server multiple times as I was debugging an issue with parameters not getting correctly populated by DAC during the run-time, I figured that the call to run config.sh in startserver.sh is throwing the "invalid identifier" error. I commented config.sh in startserver.sh and tried "nohup startserver.sh &" after running ". config.sh" in foreground at command prompt, it just ran fine and I exited the Solaris session and logged back in to see if the service is still alive. It is indeed alive!! The conclusion is that EXPORT cannot be run in background mode.

Venkat has blogged about how to create this as a Windows service for a oc4j service and I am pretty sure that the same can be implemented for DAC Server. Visit Venkat's blog post for more details, if your DAC Server is hosted on a Windows machine.

No comments: