Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    38

    Unanswered: datafile creation during recovery

    Hi

    T1-)shutdown immediate;
    T2-)Take full backup
    T3-)startup;
    T4-)move the objects in tablespace test1 to some other tablespace
    T5-)drop tablespace test1;
    T6-)create tablespace test1
    datafile 'C:\oraclexe\oradata\XE\test1.dbf' reuse;
    T7-)move the objects in tablespace test2 to some other tablespace
    T8-)drop tablespace test2;
    T9-)create tablespace test2
    datafile 'C:\oraclexe\oradata\XE\test2.dbf' reuse;
    T10-)
    alter system switch logfile;
    /
    /
    /
    .................................................. ..............................
    ........


    restore the backupset which was taken at T2.
    restore controlfile at T10.


    startup mount;
    alter database create datafile 'C:\oraclexe\oradata\XE\test1.dbf' as 'C:\oraclexe\oradata\XE\test1.dbf';
    alter database create datafile 'C:\oraclexe\oradata\XE\test2.dbf' as 'C:\oraclexe\oradata\XE\test2.dbf';
    ALTER DATABASE RECOVER automatic database until cancel using backup controlfile;


    Recovery performed succefully.


    What I wanna ask is;
    Since First I issue:
    alter database create datafile as ....
    The contents of these datafiles should be deleted with this statement.
    Why oracle doesnt give error, during appliying the statements at T4 and T7?
    I have already deleted the contents of the datafiles, how come oracle move the objects?


    I hope I am clear

  2. #2
    Join Date
    Feb 2008
    Posts
    38
    As far as I know "alter database create datafile as ...." command clears the datafile. ( so all the entry inthe datafile is deleted)
    After this statement; How can Oracle move/rebuild the segments in this datafile ? Everything should be deleted!!!!

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •