Featured Post

Oracle Cloud Announcement‏ (September 2017)

The bottom line: Oracle are inventing aggressively on PaaS and starting to neglect the IaaS. 
They are doing it by: - Reducing price of the PaaS. - More automation to reduce dramatically the TCO (migration to cloud, patches, upgrades, tuning)  - Higher performance.  - Simpler pricing and contract (a pool of cloud cedits you can use for anything) 

- New autonomous database will be commercial soon.
- You can bring your own license. 
And again Oracle claim that their cloud is  faster than Amazonfor databasewith much lower price.

Creating Far Sync instance step by step

These are the steps of creating Far Sync instance in the command line:

Create 12.1 primary db

Create 12.1 physical standby

Create regular standby DG broker configuration

modify network file (on primary and standby) and add entries for the far_sync instance, add to tnsnames.ora on Primary hosts and standby hosts:
FarSyncInst =
      (ADDRESS = (PROTOCOL = TCP)(HOST = FarSyncHost)(PORT = 1521))
      (SERVICE_NAME = FarSyncInst)
  )     Note: (UR=A) is needed to connect to a BLOCKED unmounted database instance.

Copy tnsnames.ora to new farsync server – ensure all hosts mentioned in tnsnames are written also in /etc/hosts

Add to listener.ora in far sync server
      (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))

Oracle connection manager

Connection manager is working as oracle SQL*NET proxy and firewall.
In this example, I am using Connection Manager of Oracle Database 12c Release 2 running on Linux x86_64

Footprint Storage: 1.7 G
Memory: 5~28.4 MB

Requires: Installation of Oracle Client in a separated folder than the database software
Register the connection manager in the grid infrastructure as a cluster resource

Configure and install on the intermediate host Download Oracle Database 12c Release 2 Client
unzip Change response file /client/response/client_install.rsp:
oracle.install.client.installType=Custom Start silent installation:
cd /client
./runInstaller -silent -responseFile /client/response/client_install.rsp -ignoreSysPrereqs -ignorePrereq -noconfig -waitforcompletion -force -showProgress run
sudo /oracle/product/
copy a…

Far Sync Best Practice Recommendations (for Oracle 12.1)

This post is a continuation of my post, Using Standby as an Alternate for Far Sync (12c): Limitations and Considerations. It is for database administrators who want to set up Far Sync for the first time.

Creating a Far Sync instance requires a number of manual steps and there are many parameters to consider or set. I recently ran numerous scenarios using Oracle™ Active Data Guard with a Far Sync instance.

Our goals were to:
• Check Far Sync functionality and reliability
• Validate that Far Sync has a low footprint under heavy load

After running a large number of benchmark scenarios, where we changed one parameter at a time, here are my recommendations for using Active Data Guard with Far Sync:

The primary database, the standby database, and the Far Sync instance should all be using the same software version and patch level; if not, upgrade the database(s) to the latest version with the latest patch sets.
Consider changing the following database initialization parameters to FULL: D…

Data Guard - Changing IP Addresses

When changing IP of a host we should update/recheck the following places: /etc/hosts or DNSlistener.ora tnsnames.oraDatabase parameters (local_listener, remote_listener)Data Guard configuration This document is also relevant when changing the IP address of the connection between the hosts, other than the original IP addresses we used during the installation. When installation is done using the hostname and not the IP address, most of the changes are not relevant except for /etc/hosts.
In this document, I will describe how to change the Data Guard Broker configuration. Dataguard configuration
Show the environment DGMGRL> show configuration

Configuration - dr

  Protection Mode: MaxAvailability
  pdb7 - Primary database
    fdb7 - Far sync instance
      sdb7 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 351 seconds ago) Show detailed information of the Primary
DGMGRL> show database pdb7 StaticConnect…

Extracting AWR data and loading it in another system

As a DBA, I find myself trying to support customers remotely, who frequently ask for another Automatic Workload Repository (AWR) or a special query. I’ve found a cool feature that enables customer's DBAs to extract the AWR and then load it locally.
Extracting 1. Login as SYS and at the SQL prompt, enter: SQL> @?/rdbms/admin/awrextr.sql 2. Enter your database id or press <Enter> to use the current default. Enter value for dbid:
Using 3342354369 for Database ID 3. Specify the number of days for which you want to list snapshot Ids. Enter value for num_days: 14 4. After the list displays, enter the beginning and ending snapshot ID. Enter value for begin_snap: 2670
Enter value for end_snap: 2672 5. A list of directory objects is displayed. Specify the directory object pointing to the directory where the export dump file will be stored. Enter value for directory_name: DATA_PUMP_DIR 6. Specify the prefix for the default dump file name Using the dump file prefix: awrdat_2670_267…

AWR Generating & Setting

How to display AWR snapshot settingsOracle database is gathering statistics periodically (snapshots), these statistics can be used for analyzing database performance. These statistics are kept in the Automatic Workload Repository (AWR). 
Retention Interval: Amount of time to keep the snapshots.
Snapshot Interval: How often to automatically take snapshots.

SELECT 'Snapshot Interval' "Interval" ,      EXTRACT ( DAY FROM snap_interval ) days ,      EXTRACT ( HOUR FROM snap_interval ) hours ,      EXTRACT ( MINUTE FROM snap_interval ) minutes   FROM dba_hist_wr_control UNION ALL SELECT 'Retention Interval' "Interval" ,      EXTRACT ( DAY FROM retention ) days ,      EXTRACT ( HOUR FROM retention ) hours ,      EXTRACT ( MINUTE FROM retention ) minutes   FROM dba_hist_wr_control;
Adjust the AWR retention and snapshot intervals according to your needs.BEGIN DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings ( interval => 60,       -- minutes retention =&g…