Re: how to determine who/what is opening the database

  • From: Jeremy Schneider <jeremy.schneider@xxxxxxxxxxxxxx>
  • To: rhojel.echano@xxxxxxxxx
  • Date: Mon, 26 Jul 2010 09:08:47 -0500

Maybe fuser or lsof would help.  fuser should already be installed if
it's linux - and if you're interested, here's a script & example for
running it on an oracle datafile directory:
http://www.ardentperf.com/2007/05/03/whos-accessing-that-file/

-Jeremy


Rhojel Echano wrote:
> Run fuser on the file file to see the processes that has it opened
> then start your investigation from there. 
> You can easily write a shell script to periodically run this if you
> want some "monitoring".
>
> e.g. 
>
> [oracle@localhost ~]$ /sbin/fuser
> /u02/app/oracle/oradata/ORA11GR2/system01.dbf
> /u02/app/oracle/oradata/ORA11GR2/system01.dbf:  3372  3380  3382  3386
>  3390  3478  3492  3494  3496  3498  3500  3502  3504  3508  3512
>  3514  3516
>
> On Mon, Jul 26, 2010 at 12:26 AM, Stephens, Chris
> <Chris.Stephens@xxxxxxx <mailto:Chris.Stephens@xxxxxxx>> wrote:
>
>     10.2.0.4 on RHEL 5
>
>      
>
>     I’m in doing some datafile renaming for my own sanity.
>
>      
>
>     The thing is, once I mount the database and rename a few
>     datafiles, I start getting messages that the database is open.
>
>      
>
>     ERROR at line 1:
>
>     ORA-01511: error in renaming log/data files
>
>     ORA-01121: cannot rename database file 2 - file is in use or recovery
>
>     ORA-01110: data file 2: '/u01/oradata/db_name/undotbs01.dbf'
>
>      
>
>     SYS@remgt> alter database open;
>
>     alter database open
>
>     *
>
>     ERROR at line 1:
>
>     ORA-01531: a database already open by the instance
>
>      
>
>      
>
>     How would I go about figuring out what or who is opening the
>     database?  This has happened repeatedly.
>
>      
>
>     I have contact the system administrators and they can’t think of
>     any monitoring software they have configured to do thiat.
>


-- 
http://www.ardentperf.com
+1 312-725-9249

Jeremy Schneider
Chicago

Other related posts: