archiving mode oracle10g reprint
1.select name, log_mode from v $ database;
NAME LOG_MODE
------------------ ------------------------
QUERY NOARCHIVELOG
2. Use ARCHIVE LOG LIST command
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination / data/oracle/product/10.2.0/db_1 / / dbs / arch
Oldest online log sequence 739
Current log sequence 741
2. . What is Oracle archive mode?
Oracle database online redo log, the log is recorded on the database changes, such as insert, delete, update data for these operations will be recorded in online redo log ri. General database with at least two online redo log group. When an online redo log group was written when the log switch occurs when the online redo log group 2 has become the use of the log, when the online redo log group 2, when full, will log switch occurs, write to online redo log group 1, it is so repeatedly.
If the database is in non archive mode, on-line log will be discarded at the switch. In archive mode, to switch the event log when the log switch will be archived. For example, the current online redo log in the use of 1, when a full time log switch occurred, began to write online redo log 2, when an online redo log contents will be copied to another designated directory. This directory is called the archive directory, copy the redo log files is called archiving.
Database archiving run can be disastrous when the restoration.
1. Archive log mode and non-archive log mode the difference between non-archive mode can only do cold backup, and recovery can only do a full backup. The most recent full backup to the system error during the data can not be restored.
Archiving can be done hot backup mode, and can do incremental backups, you can do so partially.
ARCHIVE LOG LIST can be used view mode view mode when the filing or non-archive mode.
Three . Configuration database archiving mode <br /> change the non-archive mode to archive mode:
1) SQL> SHUTDOWN NORMAL / IMMEDIATE;
2) SQL> START MOUNT;
3) SQL> ALTER DATABASE ARCHIVELOG;
4) SQL> ALTER DATABASE OPEN;
5) SQL> do a full backup, because non-archive log mode for the resulting backup archive log mode has not spent. This very important step in the non-!
To change the archiving mode to non-archive mode:
1) SQL> SHUTDOWN NORMAL / IMMEDIATE;
2) SQL> START MOUNT;
3) SQL> ALTER DATABASE NOARCHIVELOG;
4) SQL> ALTER DATABASE OPEN;
3. Enable automatic archiving: LOG_ARCHIVE_START = TRUE, in sqlplus in: (pay attention to this point in doubt, do not necessarily need this step)
alter system set log_archive_start = true scop = spfile;
Archiving mode, the log file group is not allowed to be covered by (rewrite), written when the log file after the archive if there is no manual, then the system will hang until the archiving is completed.
At this time can only be read but not write.
Operation of closing and restarting the process of archiving logs
SQL> ARCHIVE LOG STOP
SQL> ARCHIVE LOG START
Need to modify configuration files:
Increase in the init.ora:
log_archive_start = true
log_archive_dest =% ORACLE_HOME% / admin / clustdb / arch
log_archive_format = "%% ORACLE_SID%% T% TS% S. ARC"
log_archive_max_processes = 3
log_archive_dest_1 = \ 'location = / oradata/orcl01/archive / \'
Information:
archive log list;
shutdown immediate;
startup mount;
alter database archivelog;
alter database open
alter system set LOG_ARCHIVE_DEST_1 = 'LOCATION = / oracle / oradata / express / archive';
shutdown immediate;
startup
If it is oracle9i, also need to change the following parameters:
alter system set log_archive_start = true scope = spfile;
However, if in 10g also change these parameters, the database will have to restart the following tips:
ORA-32004: obsolete and / or deprecated parameter (s) specified
alter system set log_archive_format = '% t_% s.dbf' scope = spfile;
However, if in 10g also change these parameters, the database will not be activated, the following tips:
ORA-32004: obsolete and / or deprecated parameter (s) specified
ORA-19905: log_archive_format must contain% s,% t and% r
4. Manually archive: LOG_ARCHIVE_START = FALSE
Archive the current log file
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
Serial number for the archive log files 052
SQL> ALTER SYSTEM ARCHIVE LOG SEQUENCE 052;
Archiving of all log files
SQL> ALTER SYSTEM ARCHIVE LOG ALL;
To change the archive log target
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT TO '& PATH';
5. Archive mode and non-archive mode conversion
Step 4 of the inverse process.
6. Configure multiple archive processes
Q: When the need for multiple archive process?
A: If the archive process will consume a large amount of time, you can start the process of a number of archiving, this is a dynamic parameter, you can use ALTER SYSTEM dynamic modification.
SQL> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 10;
Oracle9i can specify up to 10 archiving process and the archiving process on the dynamic performance view
v $ bgprocess, v $ archive_processes
7. Configuration archiving target, the target number of archiving, remote archiving target, the target archive log archive format LOG_ARCHIVE_DEST_n
Local archiving objectives:
SQL> LOG_ARCHIVE_DEST_1 = "LOCATION = D: ORACLEARCHIVEDLOG";
Remote archiving objectives:
SQL> LOG_ARCHIVE_DEST_2 = "SERVICE = STANDBY_DB1";
The goal of the mandatory filing, if the error, try again after 600 seconds:
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_4 = "LOCATION = E: ORACLEARCHIVEDLOG MANDATORY REOPEN = 600";
Optional archiving target, if wrong, abandon the archive:
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3 = "LOCATION = E: ORACLEARCHIVEDLOG OPTIONAL";
Archiving target state: closed archiving goals and objectives of the closure of open archiving archiving Goal 1
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1 = DEFER
Goal 2 open archiving
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2 = ENABLE
Archive log format
LOG_ARCHIVE_FORMAT
8. Access to archive log information
V $ ARCHVIED_LOG
V $ ARCHVIE_DEST
V $ LOG_HISTORY
V $ DATABASE
V $ ARCHIVE_PROCESSES
ARCHIVE LOG LIST;
Source: http://www.cnblogs.com/jacktu/archive/2008/02/27/1083214.html
Related Posts of archiving mode oracle10g reprint
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
AX3.0 + Oracle 10G RAC installation
During these two days, you installed RAC, in a virtual machine inside, with a full day, there have been some questions on his way. Now have their own solution. In fact, it is loaded, it is easy, as long as planned, carefully point on OK, the trouble ...
-
Oracle in the relationship between User and Schema
If we want to know the database and the User What is the relationship between Schema, we must first know about User and Schema database What is the concept in the end. In SQL Server2000 in architecture because of the reason, User and Schema there is ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
DATA GURAD use DBMS_FILE_TRANSFER and cloning configuration database
DATA GURAD
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply