Tuesday, February 2, 2016

Configure Oracle Wallet at Client location

SHAREDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = consdb121-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = sharedb)
    )
  )


SQL> conn system/oracle@SHAREDB
Ú‘±‚³‚ê‚Ü‚µ‚½B

1.Create wallet on client

[oracle@consdb121n1 tmp]$
/u01/app/oracle/product/12.1.0/dbhome1/bin/mkstore -wrl /tmp -create
Oracle Secret Store Tool: ƒo[ƒWƒ‡ƒ“12.1.0.2
Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights
reserved.

password:Oracle123#
re-enter password :Oracle123#

2.Check that the file was created

[oracle@consdb121n1 admin]$ cd /tmp
[oracle@consdb121n1 tmp]$ ls -lrt *wallet*
-rw-rw-rw- 1 oracle oinstall   0  8ŒŽ  6 16:06 2015 ewallet.p12.lck
-rw------- 1 oracle oinstall  75  8ŒŽ  6 16:06 2015 ewallet.p12
-rw-rw-rw- 1 oracle oinstall   0  8ŒŽ  6 16:06 2015 cwallet.sso.lck
-rw------- 1 oracle oinstall 120  8ŒŽ  6 16:06 2015 cwallet.sso

3.

[oracle@consdb121n1 tmp]$ mkstore -wrl /tmp -createCredential
SHAREDB_TMP system
Oracle Secret Store Tool: ƒo[ƒWƒ‡ƒ“12.1.0.2
Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights
reserved.

secret/password is missing
secret/password:oracle
re-enter secret/password:oracle
oracle wallet password:Oracle123#
Create credential oracle.security.client.connect_string1

4.Check that the filesize has increased

[oracle@consdb121n1 tmp]$ ls -lrt *wallet*
-rw-rw-rw- 1 oracle oinstall   0  8ŒŽ  6 16:06 2015 ewallet.p12.lck
-rw-rw-rw- 1 oracle oinstall   0  8ŒŽ  6 16:06 2015 cwallet.sso.lck
-rw------- 1 oracle oinstall 536  8ŒŽ  6 16:10 2015 ewallet.p12
-rw------- 1 oracle oinstall 581  8ŒŽ  6 16:10 2015 cwallet.sso

5.Copy connectivity related files to /tmp on client

[oracle@consdb121n1 tmp]$ cat  /tmp/sqlnet.ora
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0

WALLET_LOCATION =
  (SOURCE =
    (METHOD = FILE)
    (METHOD_DATA =
  (DIRECTORY = /tmp)
  )
 )


cp /u01/app/oracle/product/12.1.0/dbhome1/network/admin/tnsnames.ora
/tmp/tnsnames.ora

[oracle@consdb121n1 tmp]$ cat /tmp/tnsnames.ora
# tnsnames.ora Network Configuration File:
/u01/app/oracle/product/12.1.0/dbhome1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

SHAREDB_TMP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = consdb121-scan)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = sharedb)
    )
  )


6.connection

export TNS_ADMIN=/tmp
sqlplus system/oracle@SHAREDB_TMP

7.connection

export TNS_ADMIN=/tmp
sqlplus /@SHAREDB_TMP

SQL*Plus: Release 12.1.0.2.0 Production on –Ø 8ŒŽ 6 16:40:38 2015

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

ÅI³íƒƒOƒCƒ“ŽžŠÔ: –Ø 8ŒŽ  06 2015 16:39:22 +09:00


Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage
Management, OLAP,
Advanced Analytics and Real Application Testing options
‚ɐڑ±‚³‚ê‚Ü‚µ‚½B


8. Check if whether commenting-out SSL_CLIENT_AUTHENTICATION and SSL_VERSION is okay

[oracle@consdb121n1 tmp]$ cat /tmp/sqlnet.ora
SQLNET.WALLET_OVERRIDE = TRUE
#SSL_CLIENT_AUTHENTICATION = FALSE
#SSL_VERSION = 0

WALLET_LOCATION =
  (SOURCE =
    (METHOD = FILE)
    (METHOD_DATA =
  (DIRECTORY = /tmp)
  )
 )

SQL*Plus: Release 12.1.0.2.0 Production on –Ø 8ŒŽ 6 16:42:29 2015

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

ÅI³íƒƒOƒCƒ“ŽžŠÔ: –Ø 8ŒŽ  06 2015 16:40:38 +09:00


Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage
Management, OLAP,
Advanced Analytics and Real Application Testing options
‚ɐڑ±‚³‚ê‚Ü‚µ‚½B

Cascaded Standby Databases in Oracle 12c

Cascaded Standby Databases in Oracle 12c
There are new Possibilities for cascading Standby Databases in Oracle 12c. The main Differents between Oracle 12c and the previous Releases are:

  1. Real-Time Cascading
  2. Far Sync Standby Database
  3. Data Guard Broker now supports cascaded Standby Database
we can only cascade a Standby Database from a Physical Standby Database.

Real-Time Cascading


It is now possible to forward Redo in Real-Time Mode from the first to the cascaded Standby Database. So the Redo Record is forwarded to the cascaded Standby Database once written into a Standby RedoLog of the first Standby Database.
Non Real-Time Cascading means that the whole Log Sequence is transferred to the terminal Standby Database(s) after a Log Switch on the Primary Database.

First of all setup a Data Guard Environment as usual to the cascading Standby Database. The Log Transport Method should be ‘SYNC’ and Standby RedoLogs must be configured on the cascading Standby Database. Once you created the cascaded Standby Database you can now setup the cascading Log Transport Services. Here are some Hints for correct Setup:

  • Primary, Cascading and Cascaded Standby Database db_unique_name must be present in the dg_config of log_archive_config on all the Databases
  • Setup log_archive_dest_n on the cascading Standby Database to serve the cascaded (terminal) Standby Databases using the Attribute ‘valid_for=(STANDBY_LOGFILES,STANDBY_ROLE)’
  • You can toggle between Real-Time and Non Real-Time Cascading using the Log Transport Method.
ASYNC = Real-Time Cascading
SYNC = Non Real-Time Cascading
  • You can only use log_archive_dest_1 until log_archive_dest_10 for Non Real-Time Cascading Destinations where all log_archive_dest_n’s can be used for Real-Time Cascading on the Cascading Standby Database
  • The Cascading Standby Standby can be in any Protection Mode
  • A Cascading Standby Database can serve one or multiple terminal Standby Databases
  • FAL_SERVER on the cascading Standby Database should be set to the Primary or any other Standby Database served by the Primary Database directly
  • FAL_SERVER on the terminal Standby Database should be set to the cascading Standby Database or the Primary Database