DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: database recovery

  1. #1
    Join Date
    May 2009
    Posts
    24

    database recovery

    Hi,

    i have cold backup at the end of month say 30th november. and the database is running in archivelog mode. on dec 13th i have added datafile to tablespace. after that archives are generating. after that i dont have any backup

    now here 2 conditions. if 1) newly added datafile is corrupted
    2) if other than new datafile is corrupted.

    in these 2 conditions how v can recover database?

    help is appreciated.

    thanks in advance.

    regards,

    rashad

  2. #2
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    Recovery is possible in both cases.
    lucky

  3. #3
    Join Date
    May 2009
    Posts
    24
    thanks for your reply, in second case i understood. by removing corrupted file and copy datafile from backup and fire recover command.

    but in 1st case i confused. can u explain how i can do as i dont have newly created datafile in backup.

    thanks

    regrds
    rashad

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Assuming you are using cooked file systems...
    Assuming you have restored database from cold backup including controlfile...
    Assuming you have available all archivelogs...

    alter database create datafile... this command will both create your datafile - empty - and add it to controlfile.
    recover database using backup controlfile;
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    May 2009
    Posts
    24
    okay, i have copied all datafiles, controlfiles and redolog files from cold backup,
    i have all available archive logs. and i fired command

    startup mount
    then
    alter database create datafile datafile_name size 800m as tablespace_name;

    here i recieved error that, ora-02000 missing AS keyword. i have properly added AS keyword. still same error. how can i move further?

    thanks
    regards,

    Rashad

  6. #6
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Talking Read The Fine Manual.

    If your new file belongs to a TABLESPACE, then the syntax may be different.

    You can allways refer to the fine OracleŽ Database SQL Language Reference for the correct 'CREATE/ALTER TABLESPACE' syntax:
    Code:
    CREATE TABLESPACE {new tablespace}
       DATAFILE '{the datafile name}' SIZE 800M
       -- Etc --;  
    
    -++ OR ++-
    ALTER TABLESPACE {old tablespace}             
      ADD DATAFILE '{the datafile name}' SIZE 800M REUSE 
      -- Etc ---;
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  7. #7
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    Like this:

    alter database create datafile 'old_name' as 'new_name';
    lucky

  8. #8
    Join Date
    Oct 2008
    Location
    Chandigarh, India
    Posts
    322
    How can we recover from this situation?

    1. DB in archivelog mode.
    2. Cold backup taken.
    3. A new tablespace added with a new datafile.
    4. Disk crash occured and all controlfiles and datafiles are gone. (Only redo log files, all archives and previously taken cold backup is there.)
    5. Database is closed.

    I tried as follows:
    1. Restore cold backup. This restored datafiles and controlfiles (in controlfile, there is no description of newly added tablespace).
    2. SQL> startup mount
    3. SQL> alter database create datafile 'd:\test01.dbf' as 'd:\oracle\test01.dbf';
    alter database create datafile 'd:\test01.dbf' as 'd:\oracle\test01.dbf'
    *
    ERROR at line 1:
    ORA-01516: nonexistent log file, datafile, or tempfile "d:\test01.dbf"

    The description is not in the controlfile.

    create tablespace won't work because database is not open.


    How can I proceed further?
    lucky

  9. #9
    Join Date
    May 2009
    Posts
    24
    hi,

    tablespace is old one which having datafiles about 7. these datafiles exist in the cold backup. then i added new datafile to this tablespace. now count is 8. but this new added datafile is not in the backup.

    thanks

    regards,

    rashad.

  10. #10
    Join Date
    May 2009
    Posts
    24
    now i got the same situation as mahajanakhil198 got.

    non existing file

    regards

    rashad

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