How to troubleshoot the non-archival mode of Oracle Database migration to archive mode

Source: Internet
Author: User

Today, when doing Oracle archive testing, I found a few questions, which I want to be able to get everyone's faults and help.

[Email protected] ~]$ sqlplus/as sysdbasql*plus:release 11.2.0.1.0 Production on Fri Dec 17:34:42 2014Copyright (c) 1982, Oracle.  All rights reserved.  Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit productionwith The partitioning, OLAP, Data Mining and Real Application testing options
Because you are not familiar with the Oracle database, it is strange to perform the following command:
sql> ALTER DATABASE Archivelog;alter database Archivelog*error at line 1:ora-01126:database must being mounted in the Stance and not open in any instance
This means that in order to configure the archive, it must belong to a database instance, this problem can be seen in RAC:
<a target=_blank href= "http://shuimomo.blog.51cto.com/1141396/933434" > Click to open Link </a>
</pre><pre code_snippet_id= "557252" snippet_file_name= "blog_20141220_7_6900758" name= "code" class= "SQL" Style= "FONT-SIZE:18PX;" > But I found out I was testing in a VM environment, there is no such RAC condition: I tried the first two cases. Only the mount condition can operate 
<table border= "1" width= "cellspacing=" 1 "cellpadding=" 1 "><tbody><tr><td>SQL> Shutdown Immediate;database closed. Database dismounted. ORACLE instance shut down. Sql> Startup Mount;oracle instance started. Total System Global area  417546240 bytesfixed Size                  221 3936 bytesvariable Size             314574800 bytesdatabase buffers       &NB Sp   96468992 Bytesredo buffers                4288512 bytesdatabase Mounted.sql > ALTER DATABASE archivelog;database altered.</td></tr><tr><td>sql> shutdown immediate ;D Atabase closed. Database dismounted. ORACLE instance shut down. Sql> Startuporacle instance started. Total System Global area  417546240 bytesfixed Size                  221 3936 bytesvariable Size         &NBsp   314574800 bytesdatabase buffers           96468992 Bytesredo buffers                4288512 bytesdatabase mounted. Database opened. sql> ALTER DATABASE Archivelog;alter database Archivelog*error at line 1:ora-01126:database must being mounted in the Stance and not open in any instanc                         &NB Sp                e</td></tr></tbody></table>
Sql> Show parameter Db_recovery_file_dest;name                                 TYPE------------------------------------------------------- -------------VALUE------------------------------db_recovery_file_dest                string/u01/app/oracle/flash_recovery _areadb_recovery_file_dest_size           Big integer3882m
<span style= "Color:rgb (57, 57, 57); Font-family:verdana, ' Ms Song ', Arial, Helvetica, Sans-serif; font-size:14px; line-height:21px; Background-color:rgb (250, 247, 239); " > found that the default path is now Db_recovery_file_dest, which is mixed with the flash_back_recovery path of Oracle and is not appropriate. </span>
<span style= "Font-family:verdana, Ms Song, Arial, Helvetica, Sans-serif;color: #393939;" ><span style= "FONT-SIZE:14PX; line-height:21px; " > So to make changes:</span></span>
Sql> alter system set Log_archive_dest = '/u01/app/oracle/arch ' scope = SPFile; System altered. sql>!ls-lrt  /u01/app/oracletotal 48drwxr-xr-x 2 Oracle oinstall 4096 DEC 21:25 checkpointsdrwxr-x---5 Oracle Oinstall 4096 Dec 22:03 cfgtoollogsdrwxr-x---3 oracle oinstall 4096 DEC 22:04 oradatadrwxr-x---3 oracle oinstall 4 096 Dec 22:04 admindrwxrwxr-x 4 Oracle oinstall 4096 Dec 22:04 diagdrwxr-x---4 oracle oinstall 4096 Dec 22:06 FL Ash_recovery_area
Through the above view you will find that the database does not create an arch directory for it, in the creation of the log file is the opposite, if you want to create the current directory
You have to delete the file before you create the file. Pay attention to this.
</pre><pre code_snippet_id= "557252" snippet_file_name= "blog_20141220_16_9214578" name= "code" class= "SQL" Style= "FONT-SIZE:18PX;" >SQL>!pwd/home/oraclesql>!mkdir/u01/app/oracle/archsql>!ls-lrt/u01/app/oracletotal 52drwxr-xr-x 2  Oracle oinstall 4096 Dec 21:25 checkpointsdrwxr-x---5 oracle oinstall 4096 Dec 22:03 cfgtoollogsdrwxr-x---3 Oracle Oinstall 4096 Dec 22:04 oradatadrwxr-x---3 oracle oinstall 4096 DEC 22:04 admindrwxrwxr-x 4 Oracle Oinstall 4096 D  EC 22:04 Diagdrwxr-x---4 oracle oinstall 4096 Dec 22:06 flash_recovery_areadrwxr-xr-x 2 Oracle oinstall 4096 Dec 19 17:41 archsql>





How to troubleshoot the non-archival mode of Oracle Database migration to archive mode

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.