Tuesday, July 17, 2018

Configure Oracle 12c Physical standby database

--===================
[oracle@bach1 ~]$
vi $ORACLE_HOME/sqlplus/admin/glogin.sql

and put there following line

SET SQLPROMPT "_user'@'_connect_identifier'> '"
[oracle@bach1 ~]$ export ORACLE_SID=cdb12c

--================

[oracle@bach1 ~]$ sqlplus / as sysdba
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SYS@cdb12c>


[oracle@bach1 ~]$ sqlplus / as sysdba

SQL> SELECT log_mode, open_mode, force_logging
  2    FROM v$database;

LOG_MODE     OPEN_MODE            FORCE_LOGGING
------------ -------------------- ---------------------------------------
ARCHIVELOG   READ WRITE           NO


SQL> ALTER DATABASE FORCE LOGGING;


LOG_MODE     OPEN_MODE            FORCE_LOGGING
------------ -------------------- ---------------------------------------
ARCHIVELOG   READ WRITE           YES



SYS@cdb12c> col name for a30
SYS@cdb12c> col value for a60
SYS@cdb12c>
SYS@cdb12c>
SYS@cdb12c> SELECT name, value  FROM v$parameter WHERE name LIKE 'db_recovery%';

NAME                           VALUE
------------------------------ ------------------------------------------------------------
db_recovery_file_dest          /fra/fast_recovery_area/cdb12c
db_recovery_file_dest_size     80530636800



SYS@cdb12c>
SYS@cdb12c> SELECT log_mode, open_mode FROM v$database;

LOG_MODE     OPEN_MODE
------------ --------------------
ARCHIVELOG   READ WRITE



SYS@cdb12c> set linesize 300
SYS@cdb12c> column REDOLOG_FILE_NAME format a50
SYS@cdb12c> SELECT
  2      a.GROUP#,
  3      a.THREAD#,
  4      a.SEQUENCE#,
  5      a.ARCHIVED,
  6      a.STATUS,
  7      b.MEMBER    AS REDOLOG_FILE_NAME,
  8      (a.BYTES/1024/1024) AS SIZE_MB
  9  FROM v$log a
 10  JOIN v$logfile b ON a.Group#=b.Group#
 11  ORDER BY a.GROUP# ASC;

    GROUP#    THREAD#  SEQUENCE# ARC STATUS           REDOLOG_FILE_NAME                                     SIZE_MB
---------- ---------- ---------- --- ---------------- -------------------------------------------------- ----------
         1          1        145 YES ACTIVE           /data/oradata/cdb12c/redo01.log                           200
         2          1        146 NO  CURRENT          /data/oradata/cdb12c/redo02.log                           200
         3          1        144 YES ACTIVE           /data/oradata/cdb12c/redo03.log                           200

SYS@cdb12c>


SYS@cdb12c> SELECT group#, type FROM v$logfile;

    GROUP# TYPE
---------- -------
         3 ONLINE
         2 ONLINE
         1 ONLINE

SYS@cdb12c>
SYS@cdb12c>


SYS@cdb12c> ALTER DATABASE ADD STANDBY LOGFILE SIZE 200m;

Database altered.

SYS@cdb12c> ALTER DATABASE ADD STANDBY LOGFILE SIZE 200m;

Database altered.

SYS@cdb12c> ALTER DATABASE ADD STANDBY LOGFILE SIZE 200m;

Database altered.

SYS@cdb12c> ALTER DATABASE ADD STANDBY LOGFILE SIZE 200m;

Database altered.

SYS@cdb12c>


SYS@cdb12c> SELECT group#, type FROM v$logfile;


    GROUP# TYPE
---------- -------
         3 ONLINE
         2 ONLINE
         1 ONLINE
         4 STANDBY
         5 STANDBY
         6 STANDBY
         7 STANDBY

7 rows selected.

SYS@cdb12c>


SYS@cdb12c> set pagesize 500
SYS@cdb12c> set linesize 500
SYS@cdb12c> col name for a40
SYS@cdb12c> col value for a60
SYS@cdb12c>
SYS@cdb12c> SELECT name, value
  2    FROM v$parameter
  3   WHERE name IN
  4    ( 'db_name',
  5      'db_unique_name',
  6      'log_archive_format',
  7      'remote_login_passwordfile' )
  8  ORDER BY NAME;

NAME                                     VALUE
---------------------------------------- ------------------------------------------------------------
db_name                                  cdb12c
db_unique_name                           cdb12c
log_archive_format                       %t_%s_%r.dbf
remote_login_passwordfile                EXCLUSIVE

SYS@cdb12c>



SYS@cdb12c> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG ='DG_CONFIG=(cdb12c,cdr12c)' SCOPE=BOTH;

System altered.

SYS@cdb12c> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=cdb12c' SCOPE=BOTH;

System altered.

SYS@cdb12c> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=cdr12c ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=cdr12c' SCOPE=BOTH;

System altered.


SYS@cdb12c> show parameter LOG_ARCHIVE_CONFIG

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(cdb12c,cdr12c)
SYS@cdb12c>
SYS@cdb12c> show parameter LOG_ARCHIVE_DEST_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      LOCATION=USE_DB_RECOVERY_FILE_
                                                 DEST VALID_FOR=(ALL_LOGFILES,A
                                                 LL_ROLES) DB_UNIQUE_NAME=cdb12
                                                 c
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
log_archive_dest_19                  string
SYS@cdb12c>
SYS@cdb12c> show parameter LOG_ARCHIVE_DEST_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=cdr12c ASYNC VALID_FOR
                                                 =(ONLINE_LOGFILES,PRIMARY_ROLE
                                                 ) DB_UNIQUE_NAME=cdr12c
log_archive_dest_20                  string
log_archive_dest_21                  string
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string
log_archive_dest_28                  string
log_archive_dest_29                  string
SYS@cdb12c>



SYS@cdb12c> ALTER SYSTEM SET FAL_SERVER = cdr12c SCOPE=BOTH;

System altered.

SYS@cdb12c> ALTER SYSTEM SET DB_FILE_NAME_CONVERT = '/cdr12c/','/cdb12c/' SCOPE=SPFILE;

System altered.

SYS@cdb12c> ALTER SYSTEM SET LOG_FILE_NAME_CONVERT = '/cdr12c/','/cdb12c/' SCOPE=SPFILE;

System altered.

SYS@cdb12c> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT = AUTO SCOPE=BOTH;

System altered.

SYS@cdb12c> STARTUP FORCE;
ORACLE instance started.

Total System Global Area 4.1339E+10 bytes
Fixed Size                 19420336 bytes
Variable Size            5905582928 bytes
Database Buffers         3.5299E+10 bytes
Redo Buffers              114794496 bytes
Database mounted.
Database opened.
SYS@cdb12c>
SYS@cdb12c> show parameter FAL_SERVER

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fal_server                           string      CDR12C
SYS@cdb12c>
SYS@cdb12c> show parameter DB_FILE_NAME_CONVERT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string      /cdr12c/, /cdb12c/
pdb_file_name_convert                string
SYS@cdb12c> show parameter LOG_FILE_NAME_CONVERT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_file_name_convert                string      /cdr12c/, /cdb12c/
SYS@cdb12c>
SYS@cdb12c> show parameter STANDBY_FILE_MANAGEMENT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
standby_file_management              string      AUTO
SYS@cdb12c>



SYS@cdb12c> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/cdr12c.ctl';

Database altered.

SYS@cdb12c>


SYS@cdb12c> CREATE PFILE='/tmp/initCDR12C.ora' FROM SPFILE;

File created.

oracle@bach1 tmp]$ vi initCDR12C.ora
*.audit_file_dest='/u01/app/oracle/admin/cdr12c/adump'
*.audit_trail='db'
*.compatible='12.2.0'
*.control_files='/data/oradata/cdr12c/control01.ctl','/fra/fast_recovery_area/cdr12c/control02.ctl'
*.db_block_size=8192
*.db_domain='nblbd.com'
*.db_file_name_convert='/cdb12c/','/cdr12c/'
*.db_name='cdr12c'
*.db_recovery_file_dest='/fra/fast_recovery_area/cdb12c'
*.db_recovery_file_dest_size=76800m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cdb12cXDB)'
*.enable_pluggable_database=true
*.fal_server='CDB12C'
#*.local_listener='LISTENER_CDB12C'
*.log_archive_config='DG_CONFIG=(cdb12c,cdr12c)'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=cdr12c'
*.log_archive_dest_2='SERVICE=cdb12c ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=cdb12c'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='/cdb12c/','/cdr12c/'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=13124m
*.processes=1280
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=30371m
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'


--===Standby server ==
[oracle@bachdbdr ~]$ mkdir -p /u01/app/oracle/admin/cdr12c/adump
[oracle@bachdbdr ~]$
[oracle@bachdbdr ~]$
[oracle@bachdbdr ~]$ cd /u01/app/oracle/admin/cdr12c/adump
[oracle@bachdbdr adump]$
--====End=============


[oracle@bach1 tmp]$ scp initCDR12C.ora oracle@172.31.200.39:$ORACLE_HOME/dbs
oracle@172.31.200.39's password:
initCDR12C.ora                                                                                                                                100% 1169   491.2KB/s   00:00
[oracle@bach1 tmp]$


[oracle@bach1 ~]$ scp $ORACLE_HOME/dbs/orapwcdb12c oracle@172.31.200.39:$ORACLE_HOME/dbs/orapwcdr12c
oracle@172.31.200.39's password:
orapwcdb12c                                                                                                                                   100% 3584     1.4MB/s   00:00
[oracle@bach1 ~]$


--====directories create ===
[oracle@bachdbdr cdr12c]$ mkdir -p /u01/app/oracle/admin/cdr12c/adump
[oracle@bachdbdr cdr12c]$ mkdir -p /u01/app/oracle/admin/cdr12c/dpdump
[oracle@bachdbdr cdr12c]$ mkdir -p /u01/app/oracle/admin/cdr12c/pfile
[oracle@bachdbdr cdr12c]$ mkdir -p /u01/app/oracle/admin/cdr12c/xdb_wallet


[oracle@bachdbdr ~]$ mkdir -p /fra/fast_recovery_area/cdr12c
[oracle@bachdbdr ~]$ mkdir -p /data/oradata/cdr12c
[oracle@bachdbdr ~]$ mkdir -p /data/oradata/cdr12c/pdbseed
[oracle@bachdbdr ~]$ mkdir -p /data/oradata/cdr12c/PORA12C2

[oracle@bach1 admin]$ scp tnsnames.ora oracle@172.31.200.39:$ORACLE_HOME/network/admin
oracle@172.31.200.39's password:
tnsnames.ora                                                                                                                                   100% 1585   624.5KB/s   00:00
[oracle@bach1 admin]$
[oracle@bach1 admin]$ scp listener.ora oracle@172.31.200.39:$ORACLE_HOME/network/admin
oracle@172.31.200.39's password:
listener.ora                                                                                                                                   100%  345   178.0KB/s   00:00
[oracle@bach1 admin]$
[oracle@bach1 admin]$

oracle@bachdbdr admin]$ vi listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = cdb12c.nblbd.com)
      (ORACLE_HOME = /u01/app/oracle/product/12.2.0.1/dbhome_1)
      (SID_NAME = cdb12c)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = cdr12c.nblbd.com)
      (ORACLE_HOME = /u01/app/oracle/product/12.2.0.1/dbhome_1)
      (SID_NAME = cdr12c)
    )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = bachdbdr.nblbd.com)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  ) 

  ADR_BASE_LISTENER = /u01/app/oracle
 
 


  [oracle@bach1 ~]$ tnsping cdr12c

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 09-MAY-2018 02:00:58

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bach1.nblbd.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdr12c.nblbd.com)))
OK (0 msec)
[oracle@bach1 ~]$
[oracle@bach1 ~]$ tnsping cdb12c

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 09-MAY-2018 02:01:05

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bach1.nblbd.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdb12c.nblbd.com)))
OK (0 msec)
[oracle@bach1 ~]$


[oracle@bachdbdr ~]$ tnsping cdr12c

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 08-MAY-2018 17:57:52

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bach1.nblbd.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdr12c.nblbd.com)))
OK (0 msec)
[oracle@bachdbdr ~]$ tnsping cdb12c

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 08-MAY-2018 17:58:00

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = bach1.nblbd.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cdb12c.nblbd.com)))
OK (0 msec)
[oracle@bachdbdr ~]$


oracle@bachdbdr dbs]$ mv initCDR12C.ora initcdr12c.ora
[oracle@bachdbdr dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue May 8 18:03:55 2018

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

Connected to an idle instance.

SQL>
SQL> create spfile from pfile;

File created.

SQL>


[oracle@bachdbdr dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue May 8 18:40:29 2018

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/12.2.0.1/dbhome_1/dbs/initcdr12c.ora';
ORACLE instance started.

Total System Global Area 3.1877E+10 bytes
Fixed Size                 19428376 bytes
Variable Size            4496296936 bytes
Database Buffers         2.7313E+10 bytes
Redo Buffers               47677440 bytes
SQL>
SQL>


[oracle@bach1 ~]$ rman

Recovery Manager: Release 12.2.0.1.0 - Production on Wed May 9 02:37:29 2018

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

RMAN> CONNECT TARGET sys/Nblcdb12c@cdb12c

connected to target database: CDB12C (DBID=4169099588)

RMAN> CONNECT AUXILIARY sys/Nblcdb12c@cdr12c

connected to auxiliary database (not started)

RMAN> duplicate target database for standby from active database nofilenamecheck dorecover;

--===


SELECT Operations.id, Operations.title, DefOperations.title AS defOpTitle, Operations.isFromUser
FROM Operations LEFT JOIN DefOperations ON Operations.defOpID = DefOperations.id;


ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION NODELAY;


 alter database recover managed standby database cancel

select group#, status from v$standby_log;
select status, error from v$archive_dest where dest_id = 2;

SELECT SUBSTR(NAME,1,25) FILE_NAME, SEQUENCE#, APPLIED FROM V$ARCVHIVED_LOG ORDER BY SEQUENCE#;


--==============command===

SQL> col member for a40
SQL> select * from v$logfile;


select * from  v$logfile where type='STANDBY';



--====drop Standby Log file ==

select group#, thread#, status, bytes/1024/1024 from v$standby_log;

select group#, thread#, status, bytes/1024/1024 from v$log;

ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='MANUAL';

alter database clear logfile group 4;
alter database clear logfile group 5;
alter database clear logfile group 6;
alter database clear logfile group 7;

alter database drop standby logfile group 4;
alter database drop standby logfile group 5;
alter database drop standby logfile group 6;
alter database drop standby logfile group 7;


--====Add Standby Log file ==

alter database add standby logfile thread 1 GROUP 4 '/data/oradata/cdb12c/redo_std04a.rdo' size 200M reuse;

alter database add standby logfile thread 1 GROUP 5 '/data/oradata/cdb12c/redo_std05a.rdo' size 200M reuse;
alter database add standby logfile thread 1 GROUP 6 '/data/oradata/cdb12c/redo_std06a.rdo' size 200M reuse;
alter database add standby logfile thread 1 GROUP 7 '/data/oradata/cdb12c/redo_std07a.rdo' size 200M reuse;


alter database add standby logfile thread 1 GROUP 4 '/data/oradata/cdr12c/redo_std04a.rdo' size 200M reuse;
alter database add standby logfile thread 1 GROUP 5 '/data/oradata/cdr12c/redo_std05a.rdo' size 200M reuse;
alter database add standby logfile thread 1 GROUP 6 '/data/oradata/cdr12c/redo_std06a.rdo' size 200M reuse;
alter database add standby logfile thread 1 GROUP 7 '/data/oradata/cdr12c/redo_std07a.rdo' size 200M reuse;


alter system set standby_file_management=AUTO scope=both sid='*';


EDIT DATABASE testfo SET PROPERTY TransportDisconnectedThreshold='120';




Primary:
SQL> select thread#, max(sequence#) "Last Primary Seq Generated"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;

PhyStdby:
SQL> select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
group by thread# order by 1;

PhyStdby:
SQL>select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY')
group by thread# order by 1;


PhyStdby:
SQL> select al.thrd "Thread", almax "Last Seq Received", lhmax "Last Seq Applied" , almax-lhmax "Sequence Difference"
from (select thread# thrd, max(sequence#) almax
from v$archived_log
where resetlogs_change#=(select resetlogs_change# from v$database)
group by thread#) al,
(select thread# thrd, max(sequence#) lhmax
from v$log_history
where resetlogs_change#=(select resetlogs_change# from v$database)
group by thread#) lh
where al.thrd = lh.thrd;

edit database "cdr12c" set state="APPLY-ON";


--================Dataguard broker====

SYS@cdb12c> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     FALSE
SYS@cdb12c>
SYS@cdb12c> alter system set dg_broker_start=true;

System altered.

SYS@cdb12c>
SYS@cdb12c> show parameter dg_broker_start;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     TRUE
SYS@cdb12c>


SYS@cdr12c> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     FALSE
SYS@cdr12c>
SYS@cdr12c>
SYS@cdr12c> alter system set dg_broker_start=true;

System altered.

SYS@cdr12c>
SYS@cdr12c> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start                      boolean     TRUE
SYS@cdr12c>
SYS@cdr12c>



SYS@cdb12c> show parameter log_archive_dest_2;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=cdr12c ASYNC VALID_FOR
                                                 =(ONLINE_LOGFILES,PRIMARY_ROLE
                                                 ) DB_UNIQUE_NAME=cdr12c
log_archive_dest_20                  string


SYS@cdb12c> alter system set log_archive_dest_2='';

System altered.

SYS@cdb12c> show parameter log_archive_dest_2;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string
log_archive_dest_20                  string





SYS@cdr12c> show parameter log_archive_dest_2;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      SERVICE=cdb12c ASYNC VALID_FOR
                                                 =(ONLINE_LOGFILES,PRIMARY_ROLE
                                                 ) DB_UNIQUE_NAME=cdb12c
log_archive_dest_20                  string
log_archive_dest_21                  string
log_archive_dest_22                  string
log_archive_dest_23                  string
log_archive_dest_24                  string
log_archive_dest_25                  string
log_archive_dest_26                  string
log_archive_dest_27                  string

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_28                  string
log_archive_dest_29                  string
SYS@cdr12c>
SYS@cdr12c> alter system set log_archive_dest_2='';

System altered.

SYS@cdr12c> show parameter log_archive_dest_2;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string
log_archive_dest_20                  string



[oracle@bach1 ~]$ dgmgrl sys@cdb12c
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Mon May 21 23:58:41 2018

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

Welcome to DGMGRL, type "help" for information.
Password:
Connected to "cdb12c"
Connected as SYSDBA.
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL> create configuration cdb as primary database is cdb12c connect identifier is cdb12c;
Configuration "cdb" created with primary database "cdb12c"
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL> add database cdr12c as  connect identifier is cdr12c maintained as physical;
Database "cdr12c" added
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL> enable configuration;
Enabled.
DGMGRL>

No comments:

Post a Comment