ORA-00265: requires instance recovery and cannot set ARCHIVELOG mode work, restorearchivelog

Source: Internet
Author: User

ORA-00265: requires instance recovery and cannot set ARCHIVELOG mode work, restorearchivelog
The solution is as follows:
From Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options disconnected

C: \ Documents ents and Settings \ yc> sqlplus sys/abcd as sysdba

SQL * Plus: Release 10.2.0.1.0-Production on Monday December 3 22:56:52 2007

Copyright (c) 1982,200 5, Oracle. All rights reserved.


Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Mining options

SQL> shutdown immediate
ORA-01109: Database not open/Previously I closed Database


The database has been detached.
The ORACLE routine has been disabled.
SQL> startup mount/start the database in mount Mode
The ORACLE routine has been started.

Total System Global Area 167772160 bytes
Fixed Size 1247876 bytes
Variable Size 83887484 bytes
Database Buffers 75497472 bytes
Redo Buffers 7139328 bytes
The database has been loaded.
SQL> alter database archivelog;
Alter database archivelog
*
Row 3 has an error:
ORA-00265: requires instance recovery and cannot set ARCHIVELOG mode/same error as you reported


SQL> alter system switch logfile;
Alter system switch logfile/Use this command to force log switching. Because the database is not opened, an error is reported.
*
Row 3 has an error:
ORA-01109: the database is not open


SQL> alter database open;

The database has been changed. /The database will not be opened. I will open the database

SQL> alter system switch logfile;

The system has been changed. /Use this command to force log Switching


SQL> shutdown immediate
The database has been closed.
The database has been detached. /Shut down the database.
The ORACLE routine has been disabled.
SQL> startup mount
The ORACLE routine has been started. /Start the database in mount mode.

Total System Global Area 167772160 bytes
Fixed Size 1247876 bytes
Variable Size 83887484 bytes
Database Buffers 75497472 bytes
Redo Buffers 7139328 bytes
The database has been loaded.
SQL> alter database archivelog;/modify archive mode to archivelog

The database has been changed. /Haha, success.

SQL> select recid, stamp from v $ archived_log;

RECID STAMP
--------------------
1 634384622
2 634386018
3 634386215
4 634386437
5 634387218
6 634402892
7 634465470
8 634488731
9 634550076
10 634575678
11 634637644

RECID STAMP
--------------------
12 635413954
13 635436756
14 635500984
15 635535929
16 635590620
17 635619227
18 635633070
19 635675979
20 635697830
21 635761549
22 635781236

RECID STAMP
--------------------
23 635850922
24 635887029
25 635958660
26 637320679
27 637323796
28 637338885
29 637402275
30 637495528
31 637575555
32 637577252
33 637580252

RECID STAMP
--------------------
34 637580996
35 637599701
36 637664527
37 637670690
38 637671651
39 637689198
40 637750905
41 637791070
42 637837603
43 637921704
44 637947144

RECID STAMP
--------------------
45 638009274
46 638050399
47 638095123
48 638122233
49 638184343
50 638264391
51 638294712
52 638375998
53 638439881
54 638463028
55 638881506

RECID STAMP
--------------------
56 638888860
57 638992887
58 639044570
59 639074298
60 639074625
61 639134252
62 639218803
63 639312049
64 639393897
65 639589385
66 639650529

RECID STAMP
--------------------
67 639699249
68 639720021
69 639738078
70 639917004

70 rows have been selected. /Check whether logs are added

SQL> alter database open;

The database has been changed.

SQL> archive log list;
Database Log mode archiving Mode
Enable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 102
Next archive log sequence 104
Current Log sequence 104


How to archive an Oracle database

I guess you used the SHUTDOWN ABORT method to shut DOWN the database. When the database is inconsistent, you cannot switch the mode.
Before switching the archive mode or non-archive mode, SHUTDOWN must be normal, for example, shutdown immediate.

Oracle archive Mode

1. ORA-32004 error: this error is because your parameter file has an expiration parameter. View the warning file to see which parameters expire, and then alter system reset xxx scope = spfile sid = 'xxxx '. View the background_dump_dest parameter of the warning file. 2. ORA-00265 error: cause: because the last time the database was closed with the abort option, using the abort option to close the database is a very bad habit, this option can not be used, if you disable it with the abort option, the instance must be restored during the next startup (you cannot do anything during the instance recovery, but you can only wait ). Generally, you can directly use immediate to disable it. Rest assured that immediate will not lose data. Solution: follow these steps: 1. Use shutdown immediate to close the database. 2. startup mount; 3. alter database archivelog; 4. alter database open;

Related Article

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.