exiting out of the terminal kills the DB process

subrat13
subrat13 used Ask the Experts™
on
Hi,

I start dbsrv7 in the startup script of my application. Now after I start the application, when all processes are running., if I exit from the terminal, the next time log in to the machine, I find the dbsrv7 got killed with  my application processes.

I am in Solaris2.8 and I run my application as:
        login as user
        su root
        start.sh

dbsrv  is started as :
    dbspawn dbsrv7 "...  "  <dbservername>  <databse>

exit from shell i.e root, then exit from terminal causes the problem.

I also tried with nohup, but same problem pesisted.

Can anyone please lt me know the cause and the solution?

Any help in this regard is highly appreciable.

Thanks
Subrat



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You need to start the process in the background.  This can be done by adding the amphersand to the startup line

start.sh &

Author

Commented:
I did that also.

But same problem persisted.

The dbsrv is getting killed always.

Commented:
nohup really should do the trick.  How exactly did you use nohup in the syntax to start the server?

-bret
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Author

Commented:

In start up script I started DB with the following approaches.

1.  nohup dbspawn dbsrv7 -sb 0 -n $dbserverName -ti 0 -m $DBOPTIONS <db name>

or
2. nohup dbspawn dbsrv7 -sb 0 -n $dbserverName -ti 0 -m $DBOPTIONS <db name> & ( i.e. back ground)

or
3. nohup dbsrv7 -sb 0 -n $dbserverName -ti 0 -m $DBOPTIONS <db name> &
( i.e. without dbspawn and background)

Author

Commented:
Hi,

Any more comments or views.

Thanks
Subrat

Author

Commented:
Hi,

Any more comments or views.

Thanks
Subrat

Can you humor me on this for a while,
 Can you confirm,  when you logoff as root, but not from the terminal, is the database still running.  If yes, is there something in your profile - or system wide that kills off zombie processess (ie cleans up any processess a user may have started but left running when they logged off).  
Commented:
All of these answers are wrong.

What you are seeing is expected behaviour.  Try this with xload for example and you'll see the same thing.

What you want to do to run the server as a background task is use the -ud switch.

dbsrv7 -ud <blah blah blah>

Author

Commented:
With -ud option it is working fine i.e start the process as a daemon.

Thanks
Subrat

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial