SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 377487360 bytes
Redo Buffers 3833856 bytes
Database mounted.
SQL> alter system set log_archive_dest = '/opt/app/oracle/admin/vihaan/archive' scope=spfile ;
System altered.
SQL> alter system set log_archive_dest = '/opt/app/oracle/admin/vihaan/archive' scope=both;
System altered.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list ;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/app/oracle/admin/vihaan/archive
Oldest online log sequence 63
Next log sequence to archive 65
Current log sequence 65
set linesize 200
col DEST_NAME format a50
col DESTINATION format a30
set pagesize 100
select DEST_NAME,STATUS,DESTINATION from V$ARCHIVE_DEST
DEST_NAME STATUS DESTINATION
------------------------------ --------- --------------------------------------------------
LOG_ARCHIVE_DEST_1 VALID /opt/app/oracle/admin/vihaan/archive
LOG_ARCHIVE_DEST_2 INACTIVE
LOG_ARCHIVE_DEST_3 INACTIVE
LOG_ARCHIVE_DEST_4 INACTIVE
LOG_ARCHIVE_DEST_5 INACTIVE
LOG_ARCHIVE_DEST_6 INACTIVE
LOG_ARCHIVE_DEST_7 INACTIVE
LOG_ARCHIVE_DEST_8 INACTIVE
LOG_ARCHIVE_DEST_9 INACTIVE
LOG_ARCHIVE_DEST_10 INACTIVE
select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
log file status
COL GROUP# FORMAT 999999 HEAD 'Groupe'
COL THREAD# FORMAT 999999 HEAD 'Thread'
COL SEQUENCE# FORMAT 99999999 HEAD 'Sequence'
COL TAI FORMAT A6 HEAD 'Taille|Mo'
COL STATUS FORMAT A10 HEAD 'Statut'
COL MEMBER FORMAT A40 HEAD 'Nom fichier'
COL HR FORMAT A20 HEAD 'Date ouverture'
COL ARCHIVED FORMAT A7 HEAD 'Archive'
BREAK ON THREAD# NODUP ON GROUP# NODUP SKIP 1 ON TAI NODUP ON HR NODUP
COMPUTE NUMBER LABEL 'Nombre:' OF SEQUENCE# ON GROUP#
SELECT L.GROUP#, L.THREAD#, L.SEQUENCE#, LPAD(TRUNC(BYTES/1024/1024),5) TAI, L.STATUS,
MEMBER, TO_CHAR(FIRST_TIME, 'YYYY-MM-DD HH24:MI:SS') HR,
DECODE(ARCHIVED,'YES','Oui','Non') ARCHIVED
FROM V$LOG L, V$LOGFILE F
WHERE L.GROUP# = F.GROUP#
ORDER BY 1,3,6;
in Oracle 11gr2
Oracle 11R2 archive log file
SQL> alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';
System altered.
SQL> alter system set log_archive_dest_1='LOCATION=/opt/app/oracle/admin/vihaan/archive';
For RAC Perform:
ALTER SYSTEM set db_recovery_file_dest_size=60G scope=both sid='*' ;
ALTER SYSTEM SET db_recovery_file_dest='+FLASH' sid='*';
In a RAC database, all instances must have the same values for these parameters. Even though there are multiple nodes they all share the same controlfiles.
To disable FRA you can use:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '' scope=both;
Note: even after you disable the flash recovery area, the RMAN will continue to access the files located in the flash recovery area for backup and recovery purposes.
Search This Blog
Total Pageviews
Subscribe to:
Post Comments (Atom)
Oracle DBA
anuj blog Archive
- ► 2011 (362)
No comments:
Post a Comment