Sunday, 27 July 2014

To Enable and Disable Archive logs in System

To Enable and Disable Archive logs in System

Enable:
hostname:oracs5 55>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Apr 19 10:53:48 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data mining and Real Application Testing options

SQL>shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL>select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 19669
Session ID: 405 Serial number: 49


SQL>startup mount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 4777603072 bytes
Fixed Size                  2236008 bytes
Variable Size            2332033432 bytes
Database Buffers         2298478592 bytes
Redo Buffers              144855040 bytes
Database mounted.

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            /oracle/CS5/oraarch/CS5arch
Oldest online log sequence     6394
Next log sequence to archive   6397
Current log sequence           6397
SQL>


Disable:


hostname:oracs5 55>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Apr 19 10:53:48 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data mining and Real Application Testing options

SQL>shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL>select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 19669
Session ID: 405 Serial number: 49


SQL>startup mount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 4777603072 bytes
Fixed Size                  2236008 bytes
Variable Size            2332033432 bytes
Database Buffers         2298478592 bytes
Redo Buffers              144855040 bytes
Database mounted.

SQL>alter database Noarchivelog;

Database altered.

SQL>alter database open;

Database altered.

SQL>archive log list;
Database log mode           No Archive Mode
Automatic archival             Enabled
Archive destination            /oracle/CS5/oraarch/CS5arch
Oldest online log sequence     6394
Next log sequence to archive   6397
Current log sequence           6397
SQL>

No comments:

Post a Comment