Re: systemstate dump; keep user connected in background

  • From: Barbara Baker <barb.baker@xxxxxxxxx>
  • To: Egor Starostin <egorst@xxxxxxxxx>
  • Date: Tue, 19 Jul 2005 13:11:59 -0600

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@xxxxxxxxx> 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
>
--
//www.freelists.org/webpage/oracle-l

Other related posts: