Oracle+asm the simplest way to open an archive in a single-machine environment

Source: Internet
Author: User
Tags sqlplus

The simplest way to open an archive in an ASM stand-alone environment.
Environment: oracle11g 11.2.0.4

Login Sqlplus
[Email protected] ~]$ Sqlplus/as SYSDBA

Sql*plus:release 11.2.0.4.0 Production on Thu June 8 18:20:41 2017

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

Connected to an idle instance.

To boot the Oracle database to the open state

Sql> Startup
ORACLE instance started.

Total System Global area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 331350920 bytes
Database buffers 729808896 bytes
Redo buffers 5517312 bytes
Database mounted.
Database opened.

View ASM Space Usage
Sql> select Group_number,name,total_mb,free_mb from V$asm_diskgroup;

Group_number NAME TOTAL_MB FREE_MB
------------ ------------------------------ ---------- ----------
1 DGDATA01 22520 260
2 DGDATA02 20472 14132
3 Dgrecovery 21500 21420
4 Dgsystem 20472 20392
5 GRID1 10232 10144

View archive Status
sql> archive log list;
Database log mode No Archive mode
Automatic Archival Disabled
Archive Destination/oracle/app/oracle/product/11.2.0/dbs/arch
Oldest online log sequence 9
Current log Sequence 14

Sql> Show User
USER is "SYS"

Guanqu, or use the command: shutdown immediate to close
sql> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Qicu to Mount
sql> startup Mount;
ORACLE instance started.

Total System Global area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 331350920 bytes
Database buffers 729808896 bytes
Redo buffers 5517312 bytes
Database mounted.

View the status of the current node
Sql> select status from Gv$instance;

STATUS
------------
Mounted

Open Archive for node, open archive
sql> ALTER DATABASE Archivelog;

Database altered.

View archive status, find the archive log path is not correct, not the path of the default path in ASM

sql> archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination/oracle/app/oracle/product/11.2.0/dbs/arch
Oldest online log sequence 9
Next Log sequence to archive 14
Current log Sequence 14

Modifying the archive path

sql> ALTER SYSTEM SET log_archive_dest_1= ' location=+dgrecovery/' scope=spfile sid= ' udevasm ';

View the current modified path

sql> archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination +dgrecovery/arc
Oldest online log sequence 9
Next Log sequence to archive 14
Current log Sequence 14

Node Qicu
sql> ALTER DATABASE open;

Database altered.

Sql> select status from V$instance;

STATUS
------------
OPEN

To take a look at the archive path information, the default is to point directly to the path in ASM
Sql> Show parameter log_archive_dest;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Log_archive_dest string
Log_archive_dest_1 string Location=+dgrecovery/arc
Log_archive_dest_10 string
Log_archive_dest_11 string
Log_archive_dest_12 string
Log_archive_dest_13 string
Log_archive_dest_14 string
Log_archive_dest_15 string
Log_archive_dest_16 string
Log_archive_dest_17 string
Log_archive_dest_18 string

Take a look at the archive file under ASM
Asmcmd> LSDG
State Type Rebal Sector Block AU total_mb free_mb req_mir_free_mb usable_file_mb offline_disks voting_ Files Name
Mounted EXTERN N 512 4096 4194304 22520 260 0 260 0 N dgdata01/
Mounted EXTERN N 512 4096 4194304 20472 14132 0 14132 0 N dgdata02/
Mounted EXTERN N 512 4096 4194304 21500 21420 0 21420 0 N dgrecovery/
Mounted EXTERN N 512 4096 4194304 20472 20392 0 20392 0 N dgsystem/
Mounted EXTERN N 512 4096 4194304 10232 10144 0 10144 0 N grid1/

Smcmd> CD 2017_06_08/
Asmcmd> L
thread_1_seq_14.256.946154499
thread_1_seq_15.257.946154499
thread_1_seq_16.258.946154499
thread_1_seq_17.259.946154499
thread_1_seq_18.260.946154501
thread_1_seq_19.261.946154523
thread_1_seq_20.262.946154571

This article is from the "My main beam margin" blog, please be sure to keep this source http://xiaocao13140.blog.51cto.com/6198256/1933633

Oracle+asm the simplest way to open an archive in a single-machine environment

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.