The control file is lost. Use the backup script to create the control file and restore the database.

Source: Internet
Author: User

Due to misoperations, the control file was deleted and all three files were deleted. But fortunately, there were backup script files.

The script file is used to restore the control file and restore the database.

SQL> startup
The Oracle routine has been started.

Total system global area 85006980 bytes
Fixed size 453252 bytes
Variable Size 58720256 bytes
Database buffers 25165824 bytes
Redo buffers 667648 bytes
ORA-00205 :?????????????????????

To restore the control file, first shut down the database:

SQL> shutdown immediate
ORA-01507 :??????

The Oracle routine has been disabled.

The recovery operation is as follows:

SQL> ed
The file afiedt. Buf has been written.

1 create controlfile reuse database ora92 noresetlogs archivelog
2 logfile group 1 'd:/Oracle/oradata/ora92/redo01.log 'size 10 m,
3 group 2 'd:/Oracle/oradata/ora92/redo02.log 'size 10 m,
4 group 3 'd:/Oracle/oradata/ora92/redo03.log 'size 10 m
5. datafile
6 'd:/Oracle/oradata/ora92/system01.dbf ',
7 'd:/Oracle/oradata/ora92/undotbs01.dbf ',
8 'd:/Oracle/oradata/ora92/indx01.dbf ',
9 'd:/Oracle/oradata/ora92/tools01.dbf ',
10 'd:/Oracle/oradata/ora92/users01.dbf'
11 * Character Set zhs16gbk
SQL>/

Control File Created

Finally, all logs must be archived.

SQL> alter database Mount
2;

The database has been changed.

SQL> alter database open;

The database has been changed.

SQL> alter system archive log all;

The system has been changed.

SQL> archive log list;
Database Log mode archiving Mode
Disable automatic archiving
Archive endpoint D:/Oracle/ora92/rdbms
Earliest Summary log sequence 23
Next archive log sequence 25
Current Log sequence 25
SQL> show parameter Archive

If it is 9i, be sure

SQL> archive log start;
The statement that has been processed.

After completing the task, you must perform a full backup.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.