How to solve the problem of migrating from non-archive mode to archive mode in Oracle Database

Source: Internet
Author: User

How to solve the problem of migrating from non-archive mode to archive mode in Oracle Database

I found several problems during the oracle archive test today. I will record them here for your suggestions and help.

[oracle@localhost ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 19 17:34:42 2014Copyright (c) 1982, 2009, 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
Since I am not familiar with oracle databases, I feel strange when I execute the following commands:
SQL> alter database archivelog;alter database archivelog*ERROR at line 1:ORA-01126: database must be mounted in this instance and not open in any instance
To archive configuration, it must belong to a database instance. This problem occurs in RAC. For more information, see:
<A target = _ blank href = "http://shuimomo.blog.51cto.com/1141396/933434"> click to open the 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 that the RAC does not exist in the VM environment: I tried the first two cases. Only mount is allowed.
<table border="1" width="500" 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                  2213936 bytesVariable Size             314574800 bytesDatabase Buffers           96468992 bytesRedo Buffers                4288512 bytesDatabase mounted.SQL> alter database archivelog;Database altered.</td></tr><tr><td>SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area  417546240 bytesFixed Size                  2213936 bytesVariable Size             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 be mounted in this instance and not open in any instanc                                          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); "> the default path is DB_RECOVERY_FILE_DEST, this path is not appropriate because it is mixed with the Flash_back_recovery path of Oracle. </Span>
<Span style = "font-family: verdana, MS song, Arial, Helvetica, sans-serif; color: #393939;"> <span style = "font-size: 14px; line-height: 21px; "> so you need to modify it: </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 15 21:25 checkpointsdrwxr-x--- 5 oracle oinstall 4096 Dec 15 22:03 cfgtoollogsdrwxr-x--- 3 oracle oinstall 4096 Dec 15 22:04 oradatadrwxr-x--- 3 oracle oinstall 4096 Dec 15 22:04 admindrwxrwxr-x 4 oracle oinstall 4096 Dec 15 22:04 diagdrwxr-x--- 4 oracle oinstall 4096 Dec 15 22:06 flash_recovery_area
Through the above view, you will find that the database does not create an arch directory for it. When creating a log file, it is exactly the opposite. If you want to create a log file under the current directory
You must delete the file before creating it. 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 15 21:25 checkpointsdrwxr-x--- 5 oracle oinstall 4096 Dec 15 22:03 cfgtoollogsdrwxr-x--- 3 oracle oinstall 4096 Dec 15 22:04 oradatadrwxr-x--- 3 oracle oinstall 4096 Dec 15 22:04 admindrwxrwxr-x 4 oracle oinstall 4096 Dec 15 22:04 diagdrwxr-x--- 4 oracle oinstall 4096 Dec 15 22:06 flash_recovery_areadrwxr-xr-x 2 oracle oinstall 4096 Dec 19 17:41 archSQL>


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.