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: Delete Datafile and Recover DB Without Using Backup?

Re: Delete Datafile and Recover DB Without Using Backup?

From: Jeremiah Wilton <jeremiah_at_ora-600.net>
Date: Fri, 25 Feb 2005 01:11:16 +0000
Message-ID: <W932501012305431109293876@webmail2>


What a great question.

Here's an untested idea:

  1. Find a running session (SQL*Plus?) that has the deleted datafile open = (Unix lsof <file>), or if you are running Shared Server (MTS) just log in= and hope to get a server process that has the file open.
  2. In that session, run: declare a varchar2; b number; c number; begin sys.dbms_backup_restore.copydatafile ( DFNUMBER=3D>file#, FNAME=3D>'datafile copy name', FULL_NAME=3D>a, RECID=3D>b, STAMP=3D>c ); end;

Can anyone think of a way to force this PL/SQL to be run in any open sess= ion without *being* that session?

People please correct me if necc. on my PL/SQL and use of dbms_backup_res= tore.

--
Jeremiah Wilton
ORA-600 Consulting
Emergencies - Seminars - Hiring
http://www.ora-600.net



> -----Original Message-----
> From: mkb [mailto:mkb125_at_yahoo.com]
>
> If a Oracle datafile is removed from a file while the
> instance is still running and the database is open, is
> it possible to recover without using a backup before
> shutting down the database?
-- http://www.freelists.org/webpage/oracle-l
Received on Thu Feb 24 2005 - 20:14:20 CST

Original text of this message

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