Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to change archive log mode in 12c

Venkadesh Sivalingam-OracleMay 4 2015 — edited May 4 2015

Hi,

[oracle@localhost Desktop]$ rman

Recovery Manager: Release 12.1.0.2.0 - Production on Mon May 4 00:38:33 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target sys/oracle@cdb1

connected to target database: CDB1 (DBID=828012650)

RMAN> backup database;

Starting backup at 04-MAY-15

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=284 device type=DISK

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/04/2015 00:38:51

RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode

RMAN> exit

Recovery Manager complete.

[oracle@localhost Desktop]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 4 00:38:57 2015

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

Enter user-name: sys as sysdba

Enter password:

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> shutdown immediate;

Pluggable Database closed.

SQL> startup nomount;

SQL> startup;

Pluggable Database opened.

SQL>

Please tell me how to change archive log mode in oracle 12.1.0.2.0 db

This post has been answered by unknown-7404 on May 4 2015
Jump to Answer

Comments

ctrieb

SHUTDOWN;

STARTUP MOUNT EXCLUSIVE;

ALTER DATABASE ARCHIVELOG;

ALTER DATABASE OPEN;

See also here:

Oracle 12c Archive Log Mode

Venkadesh Sivalingam-Oracle

Hi Ctrieb,

i am getting below error

SQL> SHUTDOWN;

Pluggable Database closed.

SQL> STARTUP MOUNT EXCLUSIVE;

SP2-0714: invalid combination of STARTUP options

ctrieb

Try: STARTUP MOUNT

Hi Crtieb,

Still same error.

SQL> SHUTDOWN;

Pluggable Database closed.

SQL> STARTUP MOUNT EXCLUSIVE;

SP2-0714: invalid combination of STARTUP options

SQL> STARTUP MOUNT;

SP2-0714: invalid combination of STARTUP options

himmy

can you paste your complete PATH variable

Hi Himmy,

[oracle@localhost Desktop]$ export ORACLE_SID=cdb1

[oracle@localhost Desktop]$ export ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1

[oracle@localhost Desktop]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib

[oracle@localhost Desktop]$ export PATH=$PATH:$ORACLE_HOME/bin

[oracle@localhost Desktop]$ sqlplus

SQL*Plus: Release 12.1.0.2.0 Production on Tue Apr 7 00:53:39 2015

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

Enter user-name: sys as sysdba

Enter password:

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name from v$database;

NAME

---------

CDB1

himmy

Do you have any other oracle home on the server , can you paste echo $PATH value

I am asking this as google is mostly pointing this error to that faced during upgrade

Maybe i guess you also have another path already hardcoded to it

unknown-698157

Apparently you can only switch the CONTAINER database to archivelog.

In this code you are doing something to a pluggable database.

You need to shutdown and mount the CONTAINER database, not any PLUGGABLE database.

The procedure is described here http://docs.oracle.com/database/121/ADMIN/archredo.htm#ADMIN11336

This thread has already been going of for a few days, if you would have answered this redundant question only BY READING DOCUMENTATION, you would have since long resolved it.

------------

Sybrand Bakker

Senior Oracle DBA

ddf_dba

You can't do this from within a pluggable database, it has to be done from the container database.  The following steps should get archivelog mode going:

connect / as sysdba

alter system set log_archive_dest = '<some valid path here>' scope=spfile;

shutdown immediate

startup mount

alter database archivelog;

alter database open;

You absolutely need to set log_archive_dest BEFORE you put the database in archivelog mode; there must be a location for Oracle to write the logs archivelog mode will generate.

To fill in the example above let's say you have a location named /u01/app/oracle/arch/cdb1.  The example above would become:

connect / as sysdba

alter system set log_archive_dest = '/u01/app/oracle/arch/cdb1' scope=spfile;

shutdown immediate

startup mount

alter database archivelog;

alter database open;

You should see archivelogs being written to that destination.  Of course log_archive_dest isn't the only parameter  you should set; you may want to set log_archive_format to better identify the logs.  You can use %d to insert the database identifier or you can modify the string to include the database SID.  As an example:

alter system set log_archive_format='ARC_CDB1_%s_%r.%t' scope=spfile;

David Fitzjarrell

unknown-7404
Answer

Please tell me how to change archive log mode in oracle 12.1.0.2.0 db

Please mark the thread ANSWERED and repost it in the Multitenant forum.

Before you repost review the 'Controlling Archiving' secion of the Oracle documentation

http://docs.oracle.com/database/121/ADMIN/archredo.htm#i1006208

Controlling Archiving

This section describes how to set the archiving mode of the database and how to control the archiving process. The following topics are discussed:

That section shows you step-by-step how to change the archive log mode.

Marked as Answer by Venkadesh Sivalingam-Oracle · Sep 27 2020
1 - 10
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 1 2015
Added on May 4 2015
10 comments
73,558 views