Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

what is the difference between "alter database datafile offline" and "offline drop"

user11994122Mar 5 2014 — edited Mar 5 2014

i have a single instance database,and i backup the database with rman  by  excluding a tablespace .

RMAN> show exclude;

RMAN configuration parameters are:
CONFIGURE EXCLUDE FOR TABLESPACE 'SOA';

then i recover the backup on another OS

i restore the database, then recover the database with "skip tablespace soa" ,success.

then i  offline all the datafile of tablespace soa with 'alter  database  datafile  7  offline'

but when i open database with ' alter  database open resetlogs ',it failed with the message

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 03/05/2014 08:46:57
ORA-01245: offline file 7 will be lost if RESETLOGS is done
ORA-01110: data file 7: '+MESDG/jfmes/datafile/soa.434.808329373'

the error message of 01245 is:

$ oerr ora 01245

01245, 00000, "offline file %s will be lost if RESETLOGS is done"

// *Cause:  Attempting to do an OPEN RESETLOGS with a file that will be lost

//          because it is offline. The file was not taken offline with the

//          FOR DROP option.

// *Action: Either bring the file online and recover it, or take it offline

//          with the FOR DROP option.

so  i  offline the datafile with "alter database datafile 7 offline drop"

then open database with " alter database open resetlogs" , success.

when i restore,recover,offline datafile,open resetlogs , the database is in mount status.

as the database is not open, it can not write to the system tablespace, so only the control file can been wrote.

i check the v$datafile,v$datafile_header ,there is no difference between "alter database datafile 7 offline" and "alter database datafile 7 offline drop"

can someone tell me  what is the different between "offline " and "offline drop",

and what the error message " Attempting to do an OPEN RESETLOGS with a file that will be lost because it is offline "meaning?

thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2014
Added on Mar 5 2014
6 comments
2,594 views