Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: systemstate dump; keep user connected in background

Re: systemstate dump; keep user connected in background

From: Barbara Baker <barb.baker_at_gmail.com>
Date: Tue, 19 Jul 2005 13:11:59 -0600
Message-ID: <47a6f72b05071912116208dcb5@mail.gmail.com>


I'm really liking this idea! (keeping a connection at all times) Since this can happen at any time, I'd like to script this. What I'm trying to do is connect a user in a ksh script and keep the user connected all day. That way I can query the database to get that user's pid.

However, the user keeps exiting from the database.

Anyone know how to keep the user connected?

I'm running a script called persist.sh Must use sudo. SA's say so

    sudo su - oracle persist.sh

persist.sh connects to oracle in background   sqlplus scott/tiger @${SQL_DIR}/connect_persist.sql &

but after running connect_persist.sql (which does select sysdate from dual) the sqlplus job exists.

Again, this is Solaris 9

Thanks for the tip, Egor!

On 7/19/05, Egor Starostin <egorst_at_gmail.com> wrote:

> If this (db hangs) happens regularly then it's better to have one idle
> dedicated connection from sqlplus to be able to run smth like
> "oradebug dump systemstate 10" when database is freezing. Or you can
> attach to this process, call ksudss() and run in sqlplus 'select 1
> from dual' (just to awake process from sleep). No matter that select
> will not return anything -- call to ksudss() should be succesfull in
> such case.
>
>
> --
> Egor
> http://www.oracledba.ru/orasrp/
> Free Oracle Session Resource Profiler
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jul 19 2005 - 14:14:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US