Posts

Featured Post

Oracle connection manager

Image
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 linuxx64_12201_client.zip Change response file /client/response/client_install.rsp:
UNIX_GROUP_NAME=
INVENTORY_LOCATION=
ORACLE_HOME=
ORACLE_BASE=
oracle.install.client.installType=Custom
oracle.install.client.customComponents=oracle.network.cman:12.2.0.1.0 Start silent installation:
cd /client
./runInstaller -silent -responseFile /client/response/client_install.rsp -ignoreSysPrereqs -ignorePrereq -noconfig -waitforcompletion -force -showProgress run root.sh
sudo /oracle/product/12.2.0.1/client/root.sh
copy a…

Far Sync Best Practice Recommendations (for Oracle 12.1)

Image
Hi,
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

Image
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
  Members:
  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

Image
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: 1 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_2672…

AWR Generating & Setting

Image
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…

Using Standby as an Alternate for Far Sync (12c): Limitations and Considerations

Image
Based on Oracle 12.1
The Recommended Data Guard configuration is in Maximum Availability mode, when using Far Sync which is located near the Primary:

Primary Database à Far Sync Instance - Network input/output (I/O) is synchronous (Sync).
Far Sync Instance à Standby Database – Network I/O is asynchronous (Async).
Primary Database à Standby Database  – As an alternate (when Far Sync is not reachable), network I/O is asynchronous (Async).
Using SQLIf you do not use Data Guard Broker (dgmgrl), use the parameters specified below. ·Primary On the Primary Database Mandatory ParametersParameter Value Remarks LOG_ARCHIVE_DEST_2
point to Far Sync service Alternate log_archive_dest_3 Switches to the standby destination, after the number of failures specified in the next parameter is reached. max_failure 1 This value must be higher than 0 (infinite number of retries), but should not be too high, because the connection must fail after n attempts and fail over to the next destination, specified in …