One. Backup of data files, control files, and log files 1. The server has installed the operating system, and Oracle has also been reloading. If the restored Oracle is the exact same structure as the previously corrupted database, then the recovery is relatively simple.
1 Delete all data files, control files, and log files for the new database. Copy the original database data files, control files and log files to the corresponding directory.
2)
Cmd>sqlplus/nolog
Sql>conn as Sysdba
User name: System
Password: (password for new database created here)
Sql>shutdown Immediate
Sql>startup Nomount
Sql>alter Database Mount
At this point to see whether the database can be mount up, sometimes prompted no password file Pwddemo.ora file could not be found. Viewing the corresponding directory (under database), you will find that the file exists. Note that this password file is the password file that was generated when the instance was created after the newly installed database, not the password file of the previously used database, and now we use the control files and data files of the previous database to open the previous database, so we need to re-create a password file at this time.
Sql>shutdown Immediate
Sql>host orapwd File=c:\oracle9i\database\pwddemo.ora password=oracle
ENTRIES=10 (placed in the database directory)
Sql>startup Nomount
Sql>alter Database Mount
Sql>alter Database Open
Open Database
2. If the installation directory of the new database is not the same as the directory of the original database, then the control file can be rebuilt to open the database. Because the data file address recorded in the original control file is not the same as the existing data file location. This is the same as in the second below. Of course, at this point can also create the same directory structure as the original database (if you want to remember the original database directory structure), you need to note that the parameters of the file in the control file location and control files recorded in the data file location.
Description: We need to be clear about the database in the open three phases, need to read the file
Sql>startup Nomount (read the parameter file at this time)
Sql>alter Database Mount (read the control file according to the address of the control file recorded in the parameter file)
Sql>alter database open (read data files, open databases according to the data file addresses recorded in the control file)