DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Recovery- problem

  1. #1
    Join Date
    Jan 2001
    Posts
    642
    Hi,
    I was trying to test out few things with the datafiles on the test database.
    THe database is not in the archiving mode. As I have one of the tablespaces with only one datafile and only one table in that.

    As there are no activites going on that table,

    I did the following:

    1) When the database was running, I copied the datafile issuing
    copy ora_data01.dbf ora_data01_bkp.dbf

    2)I shutdown the database
    shutdown immediate

    3) I deleted the datafile ora_data01.dbf and copied back ora_data01_bkp.dbf
    ie del ora_data01.dbf
    move ora_data01_bkp.dbf ora_data01.dbf

    4) Tried to restart the database

    I get the following
    ORA-01588: MUST USE RESETLOGS...

    SVRMGR> ALTER DATABASE OPEN RESETLOGS;
    ora-01152:file 1 was not restrored from a sufficiently old backup
    0ra-01110 data file 1: 'c:\oracle\oradata\orcl\system01.dbf'

    How can I recover this database now



  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    When the instance is running in NOARCHIVE mode, you can't copy (backup) the data file. The data file will be in inconsistent state.

  3. #3
    Join Date
    Jan 2001
    Posts
    642
    So does it mean, I cannot bring up my database.
    badrinath

  4. #4
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    the problem is that your control files are more recent than your datafile ... if you do not have the archived redo logs, I do not see how you could reopen your database ...
    maybe (i am not sure at all of what it will make) you should try to recreate a controle file (here is an example of script) :

    CREATE CONTROLFILE REUSE set DATABASE "GNRX" RESETLOGS ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 80
    MAXINSTANCES 1
    MAXLOGHISTORY 100
    LOGFILE
    GROUP 1 '/data/GNRX/log1GNRX.dbf' SIZE 20M,
    ...
    GROUP 4 '/data/GNRX/log4GNRX.dbf' SIZE 20M
    DATAFILE
    '/data/GNRX/dbsGNRX.dbf',
    '/data/GNRX/datGNRX2.dbf',
    ...
    '/data/GNRX/idxGNRX31.dbf'
    ;


    then you
    1) startup nomount
    2) play the script above
    3) alter database open resetlogs
    4) shutdown / startup to make it clean ...

  5. #5
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    That's correct. You need to restore from a full backup.
    Seems like you are on Windows environment (c:\oracle\...)
    How could you delete a datafile when the database was running. NT will not let you do that. Just curious.

    By the way the correct way to copy the datafile is to run in Archivelog mode and then bring the tablespace in backupmode and copy the datafiles underneath.

    - Rajeev
    Rajeev Suri

  6. #6
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    note to rsuri :
    the file was just copied while the DB was running, it was deleted after the DB was stopped

  7. #7
    Join Date
    Jan 2001
    Posts
    642
    Thanks
    Are the logfile names and the datafile names given here
    should be the name of the existing redo*.log files and datafiles.

    I have the following files in my c:\oracle\oradata\orcl

    control01.ctl
    control02.ctl
    control03.ctl
    dr01.dbf
    indx01.dbf
    orcl_data1.dbf ( this was the datafile which was copied back)
    orcl_data2.dbf
    rbs01.dbf
    redo01.log
    redo03.log
    system01.dbf
    temp01.dbf
    tools01.dbf and users01.dbf


  8. #8
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    duh...Thanks pipo !!!
    Rajeev Suri

  9. #9
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    The reason

    Hi, 20th April 2001 20:22 hrs chennai

    The reason may be due to this.

    When you tried to copy the datafile while it was running the
    the datafile header would have had CHECKPOINT_CHANGE#
    at that particular point in sync with control file header CHECKPOINT_CHANGE# .

    while you shutdown the DB CHECKPOINT_CHANGE# would had been updated or chaged in the control file headers as well as in the datafile header.

    Now you are trying to do a incomplete recovery by restoring from the back up datafile with different CHECKPOINT_CHANGE# so its asking for a reset logs.

    Since your DB is running in NoArchive log mode you had the problem since the incomplete recovery cannot be done with NoArchive log mode.

    if you have a full DB back up restore to work.

    If i am wrong please correct me.

    Cheers

    Padmam


    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

  10. #10
    Join Date
    Mar 2000
    Location
    Chennai.Tamilnadu.India.
    Posts
    658

    Pipo

    Hi PIPO, 20th april 2001 20:36 hrs chennai

    Even if recreate the control file it cannot be of any use.

    Because the DB is in NOArchive mode.

    There is no incomplete recovery at all.

    The only way is restore from the last backup.

    cheers

    padmam
    Attitude:Attack every problem with enthusiasam ...as if your survival depends upon it

Posting Permissions

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


Click Here to Expand Forum to Full Width