Re: Not able to find data file on server but database is working fine

  • From: "Jeremy Paul Schneider" <jeremy.schneider@xxxxxxxxxxxxxx>
  • To: alever@xxxxxxxxx
  • Date: Tue, 26 Jun 2007 07:32:21 -0500

You don't need recovery if you use the method I just outlined because this
gives you the currently open inode.  You're not making a copy of the data,
you're just re-linking the inode back into a directory structure.  So you
don't need to do any recovery and you still get all the changes that are
being made while the database has the file open.

For example you could try this on a logfile and after re-linking the file
you could tail the file you just created and you'd see all the new entries
getting added.

-J


On 6/26/07, Alessandro Vercelli <alever@xxxxxxxxx> wrote:

If some data has been inserted/deleted from tables on this tablespace
after the datafile deletion, I think a recovery will be needed anyway.

Regards,

Alessandro





> Actually you can recover these files depending on your OS.
>
> On Linux you can use the /proc filesystem.  You have to be
root.  Warning:
> be VERY careful, you can really mess up your filesystem if you don't
know
> what you're doing here.
>
> # ll /proc/10785/fd
> lrwx------  1 jschneider jschneider 64 Jun 25 16:17 0 -> /dev/pts/3
> lrwx------  1 jschneider jschneider 64 Jun 25 16:17 1 -> /dev/pts/3
> lrwx------  1 jschneider jschneider 64 Jun 25 16:17 2 -> /dev/pts/3
> lr-x------  1 jschneider jschneider 64 Jun 25 16:17 3 ->
> /usr/home/jscheinder/test2 (deleted)
> # stat -L /proc/10785/fd/3
>   File: `3'
>   Size: 11              Blocks: 8          IO Block: 4096   regular file
> Device: 803h/2051d      *Inode: 246096      *Links: 0
> Access: (0664/-rw-rw-r--)  Uid: (  619/jschneider)   Gid:
(  619/jschneider)
> Access: 2007-06-25 16:18:06.000000000 -0700
> Modify: 2007-06-25 16:12:39.000000000 -0700
> Change: 2007-06-25 16:17:30.000000000 -0700
>
>
> (that dereferences the still open file and gives you the inode - even
though
> it's deleted)
>
>
> # debugfs -w /dev/sda3
> debugfs: cd /home/jschneider/fixed
> debugfs: ln <246096> test2
>
> and shazam, you've got the file back.
>
> -Jeremy
>

<cut>

> > Hi,
> >
> > On the test machine the developer created a new tablespace and I can
see
> > in the alert.log file that the command was successful. Also I can see
> > from dba_data_fies that the datafile is available and also the
> > tablespace is showing as Online in dba_tablespaces. Also I am able to
> > create and insert data into table created in this tablespace but
problem
> > is I don't see the file on server and I done search(find) as root and
> > don't see file anywhere on the system. Where the file can be and what
> > can be the possible reason for this behavior?
> > Environment: Oracle 10.2.0.3 on RHAT4
> >
> > Thanks
> > --Harvinder


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/

--
//www.freelists.org/webpage/oracle-l





--
Jeremy Schneider
Chicago, IL
http://www.ardentperf.com/category/technical

Other related posts: