7 Replies Latest reply: Jul 15, 2013 1:19 AM by PrathameshPitale RSS

    Recovering a database from .DBF files in Oracle 10g XE

    780860
      Hi all.

      Recently, the HD of my computer was having problems. My oracle 10g xe was installed and running in this HD.

      But I performed a copy of the DBF files in the folder "oradata\XE", before the HD stop functioning. These files are:
      CONTROL.DBF
      SYSAUX.DBF
      SYSTEM.DBF
      TEMP.DBF
      UNDOTBS1.DBF
      USERS.DBF

      I wonder if is possible to recover my data from these files. Or, if is possible to import the data in this files to a new installation of Oracle 10g.
      I have all users and passwords.

      Can someone help me?

      Thank you in advance.
      Best Regards.
        • 1. Re: Recovering a database from .DBF files in Oracle 10g XE
          Balazs Papp
          if i understand it right, the database was still running in open mode, while you simply copied the above files

          in this case, those files are inconsistent and cannot be used alone to recover the database
          • 2. Re: Recovering a database from .DBF files in Oracle 10g XE
            780860
            The HD stoped working after I performed the copy. Thus, the database was stoped. I lost this database together with my HD. I have only the copy of these files.

            What are the other things (excepting these files) that I would need to restore/recover my database?
            • 3. Re: Recovering a database from .DBF files in Oracle 10g XE
              Paul M.
              the database was stoped.
              That is, you did shutdown it cleanly (normal or immediate, not abort) ? If so, and only if so, then yes, those files can be used to restore your database. You'll also need some init file, but that could be a minor problem.
              What are the other things (excepting these files) that I would need to restore/recover my database?
              A backup of some type.
              • 4. Re: Recovering a database from .DBF files in Oracle 10g XE
                780860
                Yes. My case is the first alternative that you presented. I did shutdown.
                Which (init) files I need in order to restore my database? How can I do it?
                Is there some tutorial about this?

                Thank you in advance.
                Best Regards.
                • 5. Re: Recovering a database from .DBF files in Oracle 10g XE
                  Paul M.
                  Which (init) files I need in order to restore my database? How can I do it?
                  Well, I assume that Oracle software was on the lost disk, if so you'll have to reinstall it. Do it, and the installation will create everything needed for you.

                  At that point connect as sysdba at Sql command line and shutdown the database
                  SQL> conn / as sysdba
                  Connected.
                  SQL> shutdown immediate
                  Database closed.
                  Database dismounted.
                  ORACLE instance shut down.
                  SQL>
                  copy all your files over actual ones, then execute
                  SQL> startup mount
                  ORACLE instance started.
                  
                  Total System Global Area  264241152 bytes
                  Fixed Size                  1286916 bytes
                  Variable Size             205524220 bytes
                  Database Buffers           54525952 bytes
                  Redo Buffers                2904064 bytes
                  Database mounted.
                  SQL> recover database until cancel;
                  Media recovery complete.
                  SQL> alter database open resetlogs;
                  
                  Database altered.
                  
                  SQL>
                  • 6. Re: Recovering a database from .DBF files in Oracle 10g XE
                    976439

                    PaulM, just wanted to find out, would recovery be possible if database was not shutdown, as the hard drive failed and computer switched off?

                     

                    I managed to copy the files across but when running 'recover database until cancel', I get the following error:

                     

                    ORA-00279: change 11195773257831 generated at 06/22/2013 20:23:07 needed for
                    thread 1
                    ORA-00289: suggestion :
                    C:\ORACLEXE\APP\ORACLE\FAST_RECOVERY_AREA\XE\ARCHIVELOG\2013_06_27\O1_MF_1_1438_%U_.ARC
                    ORA-00280: change 11195773257831 for thread 1 is in sequence #1438


                    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
                    cancel
                    ORA-10879: error signaled in parallel recovery slave
                    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
                    ORA-01194: file 1 needs more recovery to be consistent
                    ORA-01110: data file 1: 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF'

                     

                    Any advice or help, would be really appreciated...

                    • 7. Re: Recovering a database from .DBF files in Oracle 10g XE
                      PrathameshPitale

                      hey 976439,

                      I am getting same error, did you got any solution?