SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF
HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH
Oracle Client Failover – Under The Hood
ITOUG Tech Day 2017
#ITOUGTD17
Robert Bialek
Principal Consultant
Ludovico Caldara
Oracle ACE Director, Senior Consultant
About Robert Bialek
Principal Consultant and Trainer at Trivadis GmbH in Munich
– MSc in Computer Engineering
Focus:
– Oracle Database High Availability
– Database Architecture/Internals
– Backup/Recovery
– Troubleshooting/Performance Tuning
– Linux Administration
Trainer for the following Trivadis courses
– Oracle Grid Infrastructure, RAC, Data Guard
About Ludovico Caldara
Adaptive Features or: How I learned to Stop Worrying3 24/08/2017
■ 17 Years DBA (Not Only Oracle)
▪ I do it everywhere (even Windows)
■ RAC ATTACK Ninja & co-writer
■ President, SOUG & ITOUG Board
■ OCP (11g, 12c, MySQL) & OCE
■ Italian living in Switzerland
■ http://www.ludovicocaldara.net
■ @ludodba ludodba
■ ludovicocaldara
Oracle Client Failover – Main Problems To Address
Oracle Client Failover – Under The Hood
New network session (connect) Already established network session
Database Clients
1 IP not reachable (server/network/… issue)
2 Connect attempts
3 Wait for
connect timeout
4 Client failover
Problem
Database Clients
2 IP not reachable (server/network/… issue)
1 Connected
3 Re-connect attempts
4 Wait for
re-connect timeout
Problem
5 Client failover
ProblemProblem
CASE 1 CASE 2
17.05.20174
Oracle Client Failover – And The Solution?
Oracle Client Failover – Under The Hood
Depends strongly on many factors
– Oracle client and database version.
– Oracle database configuration, edition and available licenses.
– Oracle client libraries/version (OCI, JDBC Thin,…).
– Application design.
– Network topology, latencies.
– Operating system type, version and configuration.
– With or without Virtual IP Addresses (VIP).
Unfortunately no one size fits all solution…
17.05.20175
Agenda
Oracle Client Failover – Under The Hood
1. Operating System
Introduction
Connect Timeouts/ARP Cache
Re-Connect Timeouts
Virtual IP Addresses
TCP Keepalive (DCD)
2. Oracle Client Failover
Database Services
Connect Timeouts
Re-Connect Timeouts
Transparent Application Failover
Fast Application Notification/Fast Connection Failover
Application Continuity
3. Conclusions
17.05.20176
Oracle Client Failover – Under The Hood
Operating System
Introduction
17.05.20177
Operating System – Introduction
Oracle Client Failover – Under The Hood
[SYN] Seq=0
SYN-SENT[SYN, ACK] Seq=0 Ack=1
[ACK] Seq=1 Ack=1
SYN-RCVD
ESTABLISHED ESTABLISHED
1
2
3
. .
.fd -> socket:[inode]LISTEN
.socket(), bind()
fd -> socket:[inode]
read(), write () write (), read()
Data Transfer
connect()
TCP three-way handshake
CASE 1
CASE 2
Seq=Seq+1
Seq=Seq+1
17.05.20178
Oracle Client Failover – Under The Hood
Operating System
Connect Timeouts/ARP Cache
17.05.20179
New Network Session – Connect Timeout
Oracle Client Failover – Under The Hood
Kernel parameter: tcp_syn_retries
– Max. number of times initial SYNs for an active
TCP connection attempt will be retransmitted.
– Default value in OEL 5/7 is 5 (63 sec. timeout),
in OEL 6 it is 6 (127 sec. timeout).
– Initial RTO is 1 sec., after each retry increased
by 2 (<RTO>=<RTO>*2).
– To change the value (not persistent).
[SYN] Seq=0, RTO=1 sec.
[SYN] Seq=0, RTO=2 sec.
[TCP Retransmission]
1
tcp_syn_retries=5
4
5
Final Timeout = 2^(tcp_syn_retries+1)-1
Timeout/Error after 63 sec.(*)
ORA-12170:
TNS:Connect
timeout occurred
#Connect timeout after 15 sec.
sysctl -w net.ipv4.tcp_syn_retries=3
[SYN] Seq=0, RTO=16 sec.
[TCP Retransmission]
…
[SYN] Seq=0, RTO=32 sec.
[TCP Retransmission]
IP not reachable
17.05.201710
New Network Session – Connect Timeout/ARP
Oracle Client Failover – Under The Hood
Depending on the ARP cache entry status, the following two different scenarios are
possible during client connection to an unresponsive server
ARP cache (192.168.122.29)
IP:192.168.122.30 MAC:...:60:d4:0d REACHABLE
IP Packet
Source: IP, MAC
Destination: IP, MAC
Ethernet Frame
Broadcast ARP Who has 192.168.122.29? Tell 192.168.122.30
IP:192.168.122.29 MAC:...:1d:54:ec REACHABLE
IP:192.168.122.29 MAC:...:1d:54:ec REACHABLE
ARP cache (192.168.122.30)
Not refreshed yet! Client connect timeout
(tcp_syn_retries)
Refreshed! Client connect timeout ~3sec
(the same network segment)
ORA-12543: TNS: destination host unreachable
ARP entry removed
CASE 1
CASE 2
17.05.201711
Oracle Client Failover – Under The Hood
Operating System
Re-Connect Timeouts
17.05.201712
Established Network Session –Re-Connect Timeout
Oracle Client Failover – Under The Hood
Kernel parameter: tcp_retries2
– Max. number of TCP packet retransmissions
for established sessions plus 1.
– Default value: 15, Timeout range: ~15-30 min.
– Initial RTO set 0.2 sec, increased by 2x during
each re-try; the maximum value is 120 sec.
– But, runtime RTO can be changed by kernel.
– To change the value (not persistent).
[PSH, ACK], RTO=0.2 sec.
[PSH, ACK], RTO=0.4 sec.
[TCP Retransmission]
1
tcp_retries2=3
Timeout/Error after ~6.2 sec.
[PSH, ACK], RTO=0.8 sec.
[TCP Retransmission]
2
[PSH, ACK], RTO=3.2 sec.
[TCP Retransmission]
4
ORA-03113: end-of-
file on communication
channel
ss -ipo dst 192.168.122.29
socket timer:(on,1min44sec,11)
socket timer:(on,49sec,11) #1 sec. later
#Re-connect timeout after ~12 sec.
sysctl -w net.ipv4.tcp_retries2=4
Data
…
17.05.201713
Oracle Client Failover – Under The Hood
Operating System
Virtual IP Addresses
17.05.201714
Virtual IP Addresses (VIP)
Oracle Client Failover – Under The Hood
IP addresses managed by a cluster which do not correspond persistently to physical NICs.
Client connects to network socket: <VIP>:<Port>.
eth0
eth0:1 VIP
eth0
Server A Server B
VIP:192.168.122.30 MAC:eth0
ARP cache
1
eth0
Server A Server B
ARP cache
2
3
Flushing neighbours
ARP Cache
5
VIP Relocate eth0
VIP:192.168.122.30 MAC:eth0
TCP [RST]
4
<ServerA> <ServerA><ServerB>
eth0:1 VIP
17.05.201715
Oracle Client Failover – Under The Hood
Operating System
TCP Keepalive (DCD)
17.05.201716
Network – TCP Keepalive (DCD): Server
Oracle Client Failover – Under The Hood
TCP mechanism which helps to detect broken network connections.
Kernel parameters.
For Oracle server (shadow) processes, automatically enabled on the network socket
– Implementation changed in 12c (tcp socket timer instead of Oracle Net probes).
net.ipv4.tcp_keepalive_time = 7200 #keepalive probe every 2 hrs.
net.ipv4.tcp_keepalive_intvl = 75 #if not reachable probe every 75 sec.
net.ipv4.tcp_keepalive_probes =9 #close the connection after 9 failed probes
# 7200 seconds of the keepalive timer + 9 times 75 seconds = 7875 sec.
Probe
Network socket closed
after 7875 sec.
sqlnet.ora OS Settings
SQLNET.EXPIRE_TIME=1 tcp_keepalive_time = 60
tcp_keepalive_intvl = 10
tcp_keepalive_probes = 6
Translates to 2 min.
timeout
17.05.201717
Network – TCP Keepalive (DCD): Client
For Oracle client processes not activated per default.
– Unless ENABLE=BROKEN specified in the
connect descriptor.
The default client timeout is 7875 sec.!
– Cannot be influenced by SQLNET.EXPIRE_TIME.
To reduce the timeout, you need to reduce OS kernel parameters.
Probe
Local Address Foreign Address State PID/Program name Timer
192.168.122.2:38814 192.168.122.3:15300 ESTABLISHED 5963/sqlplus off(0.00/0/0)
NONCDB.TRIVADIS.COM =
(DESCRIPTION =
(ENABLE=BROKEN)
(ADDRESS_LIST = ...
echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 10 > /proc/sys/net/ipv4/tcp_keepalive_probes
echo 6 > /proc/sys/net/ipv4/tcp_keepalive_intvl
Translates to 2 min.
timeout
Oracle Client Failover – Under The Hood17.05.201718
Oracle Client Failover – Under The Hood
Oracle Client Failover
Database Services
17.05.201719
The Foundation – Database Services
Oracle Client Failover – Under The Hood
A named representation of one or more running Oracle database instances
– Introduced with the Oracle 8i version.
– Part of the Oracle client connect descriptor.
– Basis of Oracle database high availability and workload management.
17.05.201720
RAC Active/Active
RAC Active/Passive
Data Guard, RAC One Node,
Failover DB Configuration
Connect to database service
Services registered
with listener Services registered
with listener
Database Services (1)
Oracle Client Failover – Under The Hood
Database services can be created with:
– srvctl (Grid Infrastructure), gdsctl (Global Data Services).
– dbms_service.create_service() PL/SQL procedure.
Different high availability and workload management attributes can be defined
Service
srvctl add service
-db <db_unique_name>
-service <service>
-preferred "<preferred_list>"
-available "<available_list>"
-serverpool <pool_name>
-cardinality [UNIFORM | SINGLETON]
-tafpolicy [NONE | BASIC | PRECONNECT]
-role [PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY]
-clbgoal [SHORT | LONG]
-rlbgoal [SERVICE_TIME | THROUGHPUT | NONE]
...
Some attributes
applicable only for
specific configurations
Not available with
Oracle Restart
17.05.201721
Database Services (2)
Oracle Client Failover – Under The Hood
Example service creation with PL/SQL
Database service created with the above method needs to be started after opening a
database
Create your own TRIGGER firing AFTER STARTUP ON DATABASE
Service
BEGIN
DBMS_SERVICE.CREATE_SERVICE (
service_name => 'OLTP.TRIVADIS.COM',
network_name => 'OLTP.TRIVADIS.COM',
failover_method => 'BASIC',
failover_type => 'SELECT',
failover_retries => 180,
failover_delay => 3);
END;
/
EXECUTE DBMS_SERVICE.START_SERVICE('OLTP.TRIVADIS.COM')
17.05.201722
Role-Based Services (1)
Oracle Client Failover – Under The Hood
For a Data Guard system, we need a role-based service, that
is running only if database has a specific role
– Read-write service on a primary database.
– Optionally, a service on standby databases for reporting.
– Optionally, a service on snapshot standby databases.
To accomplish this:
– Use Oracle Grid Infrastructure role-based services.
– Create your own AFTER STARTUP ON DATABASE trigger.
17.05.201723
Service
R/W
Service
R/O
Role-Based Services (2)
Oracle Client Failover – Under The Hood
Example role-based services with Grid Infrastructure.
Services are started, only if database and service role match.
srvctl add service -db DG_SITE1 –service OLTP_RW.trivadis.com 
-role PRIMARY
srvctl add service -db DG_SITE1 -service OLTP_RO.trivadis.com 
-role PHYSICAL_STANDBY
srvctl add service -db DG_SITE1 -service OLTP_SNAP.trivadis.com 
-role SNAPSHOT_STANDBY
SvcAgent::start 680 query_db_role
SvcAgent::start 710 not starting service oltp Role mismatch - Service
role:PRIMARY, current DB role:PHYSICAL_STANDBY
17.05.201724
Role-Based Services (3)
Oracle Client Failover – Under The Hood
Example role-based services without Grid Infrastructure.
CREATE OR REPLACE TRIGGER service_trigger
AFTER STARTUP ON DATABASE
DECLARE
v_service_ro VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_RO.'
|| sys_context('userenv','db_domain'), '.');
v_service_rw VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_RW.'
|| sys_context('userenv','db_domain'), '.');
v_service_snap VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_SNAP.'
|| sys_context('userenv','db_domain'), '.');
v_ro_service_count NUMBER;
BEGIN
SELECT count(*) INTO v_ro_service_count FROM v$active_services WHERE name = v_service_ro;
IF sys_context('userenv','database_role') IN ('PRIMARY','SNAPSHOT STANDBY')
AND v_ro_service_count = 1 THEN
dbms_service.stop_service(v_service_ro);
dbms_service.disconnect_session(v_service_ro,dbms_service.immediate);
END IF;
IF sys_context('userenv','database_role') = 'PRIMARY' THEN
dbms_service.start_service(v_service_rw);
ELSIF sys_context('userenv','database_role') = 'SNAPSHOT STANDBY' THEN
dbms_service.start_service(v_service_snap);
ELSE
IF v_ro_service_count = 0 THEN
dbms_service.start_service(v_service_ro);
END IF;
END IF;
END;
/
17.05.201725
Database Services – Application Client Configuration (1)
Configuration for RAC (without DG): use Single Client Access Name (SCAN).
Configuration for Data Guard (without RAC).
OLTP.trivadistraining.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP )(HOST = sweden)(PORT = 1521 ))
(CONNECT_DATA =
(SERVICE_NAME = OLTP.trivadistraining.com )
)
)
PHYS.trivadistraining.com =
(DESCRIPTION =
(FAILOVER = ON)(LOAD_BALANCE = OFF)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blue)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = red)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = PHYS_RW.trivadistraining.com)
))
PHYS_SITE1
PHYS_SITE2
Primary
Database
Standby
Database
RAC
Database
blue
red
blue
yellow
Oracle Client Failover – Under The Hood17.05.201726
3 Virtual IP
Addresses
Potential issue with
TCP Timeouts
Database Services – Application Client Configuration (2)
Configuration for Maximum Availability Architecture
– RAC with Data Guard.
MAA.trivadistraining.com =
(DESCRIPTION =
(ADDRESS_LIST =
(LOADBALANCE = OFF )
(ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = MAA_RW.trivadistraining.com )
)
)
MAA_SITE1 MAA_SITE2
Primary
Database
Standby
Database
blue
yellow
red
white
Oracle Client Failover – Under The Hood17.05.201727
Potential issue with
TCP Timeouts
3 Virtual IP
Addresses
Oracle Client Failover – Under The Hood
Oracle Client Failover
Connect Timeouts
17.05.201728
New Oracle Net Session – Connect Timeout (1)
Oracle Client Failover – Under The Hood
sqlnet.ora parameters (OCI, ODP.net)
Address description parameters (>=11gR2)
– Override sqlnet.ora parameters
– Parameters can be used for OCI, ODP.net
TCP.CONNECT_TIMEOUT=3 #default 60 sec.
SQLNET.OUTBOUND_CONNECT_TIMEOUT=5 #no default
17.05.201729
LSNR LSNR
Three-way handshake
Oracle Net
1
2
3
With SCAN, a client might
wait 3 x <timeout_value>
OLTP.trivadis.com =
(DESCRIPTION =
(FAILOVER=ON) (LOAD_BALANCE=OFF)
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = OLTP.trivadis.com)))
Introduced in 12.1.0.2
New Oracle Net Session – Connect Timeout
Oracle Client Failover – Under The Hood
JDBC Thin driver
– TRANSPORT_CONNECT_TIMEOUT is available beginning with 12.2 version
– To use RETRY_COUNT with 12.1.0.2, patch is required (BUG 19154304)
JDBC Thin clients can alternatively use the following driver property (ms)
– Overrides CONNECT_TIMEOUT from address description parameters
pds.setURL("jdbc:oracle:thin:@(DESCRIPTION =(FAILOVER=ON)(LOAD_BALANCE=OFF)" +
"(CONNECT_TIMEOUT=3)(RETRY_COUNT=10)(RETRY_DELAY=1)" +
"(ADDRESS_LIST = " +
"(ADDRESS = (PROTOCOL = TCP )(HOST = blue.trivadis.com )(PORT = 1521)) " +
"(ADDRESS = (PROTOCOL = TCP )(HOST = brown.trivadis.com )(PORT = 1521))) " +
"(CONNECT_DATA = (SERVICE_NAME = sales_rw.trivadis.com)))");
Properties prop = new Properties();
prop.put(oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR, ""+3000);
ods.setConnectionProperties(prop);
17.05.201730
New Oracle Net Session – Connect Timeout
Oracle Client Failover – Under The Hood
De-prioritization of down database nodes (activated by default – 600 sec.)
Down state of a server is kept in client process cache
– For OCI driver introduced with 12.1.0.2: SQLNET.DOWN_HOSTS_TIMEOUT
– For JDBC Thin driver with 12.2.0.1: oracle.net.DOWN_HOSTS_TIMEOUT
IP1 down
IP2 up
Pre 12.1.0.2
IP1 down
IP2 up
IP1 down
Timeout
Timeout
Timeout
IP1 down
IP2 up
12.1.0.2+
IP2 up
IP2 up
IP1 down
Timeout
Timeout
Cache entry
expired
IP2 up IP2 up
17.05.201731
Oracle Client Failover – Under The Hood
Oracle Client Failover
Re-Connect Timeouts
17.05.201732
Established Oracle Net Session – Re-Connect Timeout
Oracle Client Failover – Under The Hood
Break established network connection without
waiting for long TCP timeouts (>15 min.)
sqlnet.ora parameters (OCI & ODP.net)
– The actual wait time is 2 x timeout value (wait for timeout -> switch into break and
reset mode -> wait for timeout)!
For JDBC Thin clients you can set the following connection property
LSNR LSNROracle Net
1
P1
2
Client failover
4
SQLNET.RECV_TIMEOUT=30 #no default value
SQLNET.SEND_TIMEOUT=30 #no default value Timeout
3
2417.05.201733
Properties prop = new Properties();
prop.put ("oracle.jdbc.ReadTimeout", "30000"); //30 sec.
ods.setConnectionProperties(prop);
Established Oracle Net Session – Re-Connect Timeout
Oracle Client Failover – Under The Hood
Important: be very careful with re-connect timeouts!
– You might encounter unwanted side effects, like dropping still valid Oracle
Net connections!
– Deploy them only if strictly necessary after careful testing! Better, don‘t use them!
– Tuning OS kernel parameter tcp_retries2 might be a better choice!
– Tuning re-connect timeouts is not necessary, in case you use Fast Connection
Failover (FCF) with Fast Application Notification (FAN).
2417.05.201734
Oracle Client Failover – Under The Hood
Oracle Client Failover
Transparent Application Failover
17.05.201735
Transparent Application Failover – Overview
Oracle Client Failover – Under The Hood
TAF is a feature of the client OCI driver introduced in Oracle 8
– Masks many failures from the end users.
– Allows for automatic re-connection.
– In many cases allows for resumable queries.
– Useful for session migration between RAC instances during some planned
downtimes.
Failover process can only be initiated, after receiving an error for the established
connection.
TAF properties can be set on the client or server side (recommended, higher
priority).
17.05.201736
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521)))
Waiting too long for an error
slows down the failover process!
TAF – Parameters (Server/Client Side)
Oracle Client Failover – Under The Hood
Comparison of the server and client side TAF parameters.
17.05.201737
TAF Parameter Grid Infrastructure
srvctl Parameters
PL/SQL
DBMS_SERVICE.CREATE_SERVICE
Client
tnsnames.ora/LDAP
Policy/Method -tafpolicy
[NONE | BASIC | PRECONNECT]
FAILOVER_METHOD
[FAILOVER_METHOD_NONE |
FAILOVER_METHOD_BASIC]
METHOD
[BASIC | PRECONNECT]
Type -failovertype
[NONE | SESSION | SELECT |
TRANSACTION]
FAILOVER_TYPE
[FAILOVER_TYPE_NONE |
FAILOVER_TYPE_SESSION |
FAILOVER_TYPE_SELECT]
TYPE
[SESSION | SELECT |
NONE]
Backup Service
(Preconnect)
BACKUP
<SERVICE_NAME>
Failover Delay -failoverdelay FAILOVER_DELAY DELAY
Failover Retry -failoverretry FAILOVER_RETRIES RETRIES
Transparent Application Failover – Types
Oracle Client Failover – Under The Hood
Two types of TAF – SESSION or SELECT
– With SESSION, client connection/session is re-created to a surviving database
instance.
– SELECT supports query re-executions that where in progress at the time of
a failure.
17.05.201738
Checksum on the discarded
and previously fetched
rows is calculated.
Oracle Net
1
2
Fetched
Lost Fetched
Discarded
Transparent Application Failover – Server Side Example
Oracle Client Failover – Under The Hood
Example server side TAF BASIC method configuration.
srvctl add service
-db OLTP_SITE1
-service OLTP_RW
-preferred OLTP1,OLTP2
-tafpolicy BASIC
-failovertype SELECT
-failoverdelay 1
-failoverretry 180
17.05.201739
BEGIN
DBMS_SERVICE.CREATE_SERVICE (
service_name => 'OLTP.TRIVADIS.COM',
network_name => 'OLTP.TRIVADIS.COM',
failover_method => 'BASIC',
failover_type => 'SELECT',
failover_retries => 180,
failover_delay => 3);
END;
/
Transparent Application Failover – Client Side Example
Oracle Client Failover – Under The Hood
Example client side TAF BASIC method configuration.
1817.05.201740
OLTP.trivadis.com =
(DESCRIPTION =
(FAILOVER=ON) (LOAD_BALANCE=OFF)
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3)
(ADDRESS=(PROTOCOL=TCP)(HOST=cl121.trivadis.com)(PORT=1521))
(CONNECT_DATA =
(SERVICE_NAME = OLTP.trivadis.com)
(FAILOVER_MODE =
(TYPE = SESSION)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 1)
)
)
)
Single Client Access Name
Transparent Application Failover – Failover Behavior
Oracle Client Failover – Under The Hood
Example client failover behavior with TAF BASIC method
– Query GV$SESSION before failover.
– Kill PMON process on the RAC instance 1 and query GV$SESSION after failover
again.
17.05.201741
INST_ID USERNAME SID FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
------- -------- ---- ------------- --------------- -----------
2 BIR 277 SELECT BASIC YES
INST_ID USERNAME SID FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER
------- -------- ---- ------------- --------------- -----------
1 BIR 44 SELECT BASIC NO
TAF – Session Migration
Oracle Client Failover – Under The Hood
TAF might be used, to transparently migrate client sessions between RAC nodes
during planned downtimes.
Method 1.
Method 2.
17.05.201742
srvctl stop service -db <db_unique_name> -instance <instance> -service <service>
EXEC DBMS_SERVICE.DISCONNECT_SESSION('<service>', DBMS_SERVICE.POST_TRANSACTION)
srvctl stop service -db <db_unique_name> -instance <instance> -service <service>
srvctl stop instance -db <db_unique_name> -service <service> 
-stopoption "TRANSACTIONAL LOCAL"
Resource ACTION_TIMEOUT=600
All ongoing transactions running in
the local instance for more than 10
min. are aborted!
Oracle Client Failover – Under The Hood
Oracle Client Failover
Fast Application Notification
Fast Connection Failover
17.05.201743
Fast Application Notification – Overview
Oracle Client Failover – Under The Hood
Provides rapid notification about status changes (up/down events) for database
services, instances and nodes.
Delivers workload information about services (runtime load balancing).
Starting with Oracle 12c ONS is used as
the FAN transport for all client types
FAN event consists of header and payload:
ONS ONS
FAN Subscribers
17.05.201744
** Event Header **
Notification Type: database/event/service
Delivery Time: Mon Oct 10 21:56:43 CEST 2016
Generating Node: cldb01.trivadis.com
Event payload: VERSION=1.0 event_type=SERVICEMEMBER
service=soe_app1.TRIVADIS.COM instance=RAC2
database=rac_site1 db_domain=TRIVADIS.COM
host=cldb02 status=down reason=FAILURE
timestamp=2016-10-10 21:56:43 timezone=+02:0
Requirements For Using FAN Events (1)
Oracle Client Failover – Under The Hood
Oracle Grid Infrastructure is necessary to register with ONS
– ONS default ports – local: 6100, remote: 6200 (firewall).
– Configured and started automatically for GI cluster installations.
– For GI standalone systems needs to be activated and configured manually (e.g.
Data Guard).
Database needs to be registered in OCR/OLR with the ora.database.type type
– Does not work for user defined resources (failover databases).
Can be used with different client types: JDBC, OCI, ODP.net
– Integrated with UCP, starting with 11gR2 FAN API can be used (SimpleFan.jar)
srvctl enable ons
srvctl modify ons -remoteservers <remote_node> –verbose
srvctl start ons
ONS ONS
17.05.201745
Requirements For Using FAN Events (2)
Oracle Client Failover – Under The Hood
Correct database service configuration is necessary
– rlbgoal needs only to be set to receive runtime load balancing advisory events.
Beginning with the 12c version (client and server), FAN-enabled clients can use FAN
auto-configuration
– For older versions you need to specify the ONS endpoints manually.
srvctl add service #The same for GDS (gdsctl)
-clbgoal [SHORT|LONG] #LONG is the default
-rlbgoal [SERVICE_TIME | THROUGHPUT | NONE]
-notification [TRUE | FALSE] #To enable FAN for OCI/ODP.net connections
pds.setONSConfiguration("nodes=blue.trivadis.com:6200,brown.trivadis.com:6200");
ONS ONS
17.05.201746
Fast Connection Failover – Overview
Oracle Client Failover – Under The Hood
Pre-configured client side FAN integration for JDBC clients
– It works in combination with connection pooling mechanism, so the Universal
Connection Pool (UCP) or WebLogic Server Active GridLink is necessary.
Reacts to up/down FAN events
– Remove dead connections from connection
pool after receiving FAN down event and
redistributing them, if applicable, to other
available nodes.
– Connection re-distribution after receiving FAN up event.
Do not configure TAF with FCF for JDBC thick
(OCI) clients.
ONS
Connection Pool
(60 connections)
1
30 30
2
360 4
ONS
17.05.201747
Fast Connection Failover – FAN Event
Oracle Client Failover – Under The Hood
Example Fast Connection Failover processing information after a service down FAN
event received by a client application (switchover in a Data Guard environment).
The FCF information can be processed in the application exception code.
17.05.201748
Oct 11, 2016 10:52 AM SUCCESS <Reason:user> <Type:SERVICE_DOWN>
<Service:"sales_rw.trivadis.com"> <Instance:"dg2"> <Db:"dg2_site2">
Connections:(Available=20 Affected=20 FailedToProcess=0 MarkedDown=20
Closed=20)(Borrowed=0 Affected=0 FailedToProcess=0 MarkedDown=0
MarkedDeferredClose=0 Closed=0)
catch (SQLException ex) {
if (conn == null || !((ValidConnection) conn).isValid()) {
String fcfInfo =
((OracleJDBCConnectionPoolStatistics)pds.getStatistics()).getFCFProc
essingInfoProcessedOnly();
Fast Connection Failover – Setup
Oracle Client Failover – Under The Hood
Example how to use FCF with Universal Connection Pool (UCP)
– Configure ONS and database service.
– Include UCP and ONS libraries in your CLASSPATH (not part of the Oracle Instant
Client installation).
To subscribe to FAN events and use HA UCP features you need to activate FCF first.
CLASSPATH=.:/usr/lib/oracle/12.1/client64/lib/ojdbc7.jar:/usr/lib/oracle/12.1/client
64/lib/ons.jar:/usr/lib/oracle/12.1/client64/lib/ucp.jar
17.05.201749
...
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
pds.setURL(dbURL);
...
pds.setFastConnectionFailoverEnabled(true); //not activated per default!
Setting connection pool properties
Fast Connection Failover – Restrictions
Oracle Client Failover – Under The Hood
Fast Connection Failover restrictions
– In-flight transactions are lost as well as calls in the middle of execution.
– As with TAF, FAN is not designed to hide server process failure (No more data to
read from socket).
– Application exception handling is absolutely necessary!
17.05.201750
Oracle Client Failover – Under The Hood
Oracle Client Failover
Application Continuity
17.05.201751
Application Continuity – Overview
Oracle Client Failover – Under The Hood
Addresses temporary recoverable outages of instances, databases and network
communications.
Transaction Guard – server side component
– Transaction state is recorded and retrievable within database in order to ensure
idempotent execution on replay (DBMS_APP_CONT.GET_LTXID_OUTCOME).
– Can be used standalone using Oracle Client 12c for JDBC thin, OCI and ODP.net.
– Available with Oracle 12c Enterprise Edition.
Oracle 12c JDBC Replay Driver – client side component
– Replays the failed request so that the client may simply continue.
– As of 12.1 implemented only for JDBC thin client, in 12.2 also OCI and ODP.net.
Application Continuity requires RAC or RAC One Node or ADG (GG) option.
17.05.201752
Application Continuity – Interaction With UCP
Oracle Client Failover – Under The Hood
Example AC/TG interaction with UCP
1
Check-out connection
(Request begin)
Associate LTXID
Send LTXID to the driver
2
3
Work: INS/DEL/UPD/COM
INS
DEL
UPD
COM
Replay Buffer
4
Communication
Break
5
Recoverable Error
SQL Exception
8
Check the last LTXID
outcome
7
If safe, Replay
6
Request new connection
9
Check-in connection
(Request end)
UCP
17.05.201753
Runtime
Re-ConnectReplay
Application Continuity – Application Changes
Oracle Client Failover – Under The Hood
Application Continuity with UCP
Application Continuity without connection pool
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
pds.setConnectionFactoryClassName("oracle.jdbc.replay.OracleDataSourceImpl");
...
conn = pds.getConnection(); // Implicit database request begin
// JDBC calls protected by Application Continuity
conn.close(); // Implicit database request end
OracleDataSourceImpl ods = new OracleDataSourceImpl();
conn = ods.getConnection();
...
((ReplayableConnection)conn).beginRequest(); // Explicit database request begin
// JDBC calls protected by Application Continuity
((ReplayableConnection)conn).endRequest(); // Explicit database request end
17.05.201754
Application Continuity – Requirements (1)
Oracle Client Failover – Under The Hood
Database service attributes need to be correctly specified for AC and TG
srvctl add service
-failovertype TRANSACTION # to enable Application Continuity
-commit_outcome TRUE # to enable Transaction Guard
-retention 86400 # the number of seconds the commit outcome is retained
-replay_init_time 900 # seconds after which replay will not be initiated
-failoverretry 20
-failoverdelay 2
-notification TRUE # with Oracle Restart, to avoid ORA-44781 during service start
17.05.201755
Application Continuity – Requirements (2)
Oracle Client Failover – Under The Hood
Mutable Values
– Replay is aborted whenever a data divergency is encountered between original
and replay requests and answers.
– Sequences can be configured to keep their values on replay.
– SYSDATE/SYSTIMESTAMP can be configured to keep their values on replay.
– SYS_GUID can be configured to keep values on replay.
17.05.201756
GRANT KEEP SEQUENCE ON <SEQUENCE> TO USER <USER>;
GRANT KEEP DATE TIME TO <USER>;
GRANT KEEP SYSGUID TO <USER>;
Application Continuity – Deactivating Replay
Oracle Client Failover – Under The Hood
Killing/Disconnecting a session without replay
Stopping a service without replay
Some restrictions:
– Autonomous transactions, XA, ADG with read/write DB links, GoldenGate or
Logical Standby databases not supported
Error handling still necessary (non-recoverable errors, replay not possible, etc.)
17.05.201757
ALTER SYSTEM KILL SESSION 'sid, serial#, @inst' NOREPLAY;
ALTER SYSTEM DISCONNECT SESSION 'sid, serial#, @inst' NOREPLAY;
EXECUTE DBMS_SERVICE.DISCONNECT_SESSION('[service_name]', DBMS_SERVICE.NOREPLAY);
srvctl stop service -db RAC_SITE1 -instance RAC2 -service OLTP –force 
–stop_option immediate –noreplay
Oracle Client Failover – Under The Hood
Conclusions
17.05.201758
Conclusions
Oracle Client Failover – Under The Hood
To achieve high availability, correct client-side configuration for failover is crucial.
Tuning OS kernel parameters is not the preferred way to go.
At least Oracle client connect timeouts should be set.
Be careful with Oracle re-connect timeouts (undesired side effects).
VIP addresses are very useful in cluster environments and solve many problems out
of the box.
Dynamic database services are key to client high availability.
TAF/FAN/FCF are very powerful
– But with some limitations – and exception handling is still necessary!
Application Continuity helps to transparently replay in-flight transactions.
– Exception handling is still necessary!
17.05.201759

Contenu connexe

Tendances

Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Sandesh Rao
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020Anil Nair
 
Achieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAAchieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAMarkus Michalewicz
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19cMaria Colgan
 
Oracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACMarkus Michalewicz
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ssAnil Nair
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceAnil Nair
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFSDanielHillinger
 
Oracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous DatabaseOracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous DatabaseMarkus Michalewicz
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONMarkus Michalewicz
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code GenerationDatabricks
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New GenerationAnil Nair
 
Active dataguard
Active dataguardActive dataguard
Active dataguardManoj Kumar
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Ludovico Caldara
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)Satishbabu Gunukula
 
Oracle RAC in the Oracle Cloud
Oracle RAC in the Oracle CloudOracle RAC in the Oracle Cloud
Oracle RAC in the Oracle CloudMarkus Michalewicz
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesFrederic Descamps
 

Tendances (20)

Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Exadata master series_asm_2020
Exadata master series_asm_2020Exadata master series_asm_2020
Exadata master series_asm_2020
 
Achieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAAAchieving Continuous Availability for Your Applications with Oracle MAA
Achieving Continuous Availability for Your Applications with Oracle MAA
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Oracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RACOracle Extended Clusters for Oracle RAC
Oracle Extended Clusters for Oracle RAC
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ss
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFS
 
Oracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous DatabaseOracle RAC 19c - the Basis for the Autonomous Database
Oracle RAC 19c - the Basis for the Autonomous Database
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
Understanding and Improving Code Generation
Understanding and Improving Code GenerationUnderstanding and Improving Code Generation
Understanding and Improving Code Generation
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
 
Active dataguard
Active dataguardActive dataguard
Active dataguard
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?
 
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)What's new in Oracle 19c & 18c Recovery Manager (RMAN)
What's new in Oracle 19c & 18c Recovery Manager (RMAN)
 
Oracle RAC in the Oracle Cloud
Oracle RAC in the Oracle CloudOracle RAC in the Oracle Cloud
Oracle RAC in the Oracle Cloud
 
Percona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL ArchitecturesPercona Live 2022 - MySQL Architectures
Percona Live 2022 - MySQL Architectures
 

Similaire à Oracle Client Failover - Under The Hood

Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert BialekTrivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert BialekTrivadis
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedMarkus Flechtner
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesMarkus Flechtner
 
Unleash oracle 12c performance with cisco ucs
Unleash oracle 12c performance with cisco ucsUnleash oracle 12c performance with cisco ucs
Unleash oracle 12c performance with cisco ucssolarisyougood
 
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast SlidesOracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast SlidesLudovico Caldara
 
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...Zahid Anwar (OCM)
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationFrancisco Alvarez
 
Presentation oracle net services
Presentation    oracle net servicesPresentation    oracle net services
Presentation oracle net servicesxKinAnx
 
Spca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingSpca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingNCCOMMS
 
Better Network Management Through Network Programmability
Better Network Management Through Network ProgrammabilityBetter Network Management Through Network Programmability
Better Network Management Through Network ProgrammabilityCisco Canada
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Markus Michalewicz
 
Oracle RAC Presentation at Oracle Open World
Oracle RAC Presentation at Oracle Open WorldOracle RAC Presentation at Oracle Open World
Oracle RAC Presentation at Oracle Open WorldPaul Marden
 
Get the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionGet the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionLudovico Caldara
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownScyllaDB
 
20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstackJeff Yang
 
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...Jeff Yang
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performanceRicky Zhu
 
Get the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionGet the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionLudovico Caldara
 
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...arnaudsoullie
 

Similaire à Oracle Client Failover - Under The Hood (20)

Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert BialekTrivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
Trivadis TechEvent 2016 Oracle Client Failover - Under the Hood by Robert Bialek
 
Oracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi ThreadedOracle 12c Multi Process Multi Threaded
Oracle 12c Multi Process Multi Threaded
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection Issues
 
Unleash oracle 12c performance with cisco ucs
Unleash oracle 12c performance with cisco ucsUnleash oracle 12c performance with cisco ucs
Unleash oracle 12c performance with cisco ucs
 
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast SlidesOracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
 
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
UKOUG Tech15 - Deploying Oracle 12c Cloud Control in Maximum Availability Arc...
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c Presentation
 
Presentation oracle net services
Presentation    oracle net servicesPresentation    oracle net services
Presentation oracle net services
 
Spca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingSpca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessing
 
Better Network Management Through Network Programmability
Better Network Management Through Network ProgrammabilityBetter Network Management Through Network Programmability
Better Network Management Through Network Programmability
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
 
Oracle RAC Presentation at Oracle Open World
Oracle RAC Presentation at Oracle Open WorldOracle RAC Presentation at Oracle Open World
Oracle RAC Presentation at Oracle Open World
 
Get the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW versionGet the most out of Oracle Data Guard - OOW version
Get the most out of Oracle Data Guard - OOW version
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance Showdown
 
20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack20140513_jeffyang_demo_openstack
20140513_jeffyang_demo_openstack
 
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
An High Available Database for OpenStack Cloud Production by Pacemaker, Coros...
 
Long live to CMAN!
Long live to CMAN!Long live to CMAN!
Long live to CMAN!
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
 
Get the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG versionGet the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - POUG version
 
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
 

Plus de Ludovico Caldara

Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityLudovico Caldara
 
Let your DBAs get some REST(api)
Let your DBAs get some REST(api)Let your DBAs get some REST(api)
Let your DBAs get some REST(api)Ludovico Caldara
 
Effective Oracle Home Management - UKOUG_Tech18
Effective Oracle Home Management  - UKOUG_Tech18Effective Oracle Home Management  - UKOUG_Tech18
Effective Oracle Home Management - UKOUG_Tech18Ludovico Caldara
 
Effective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraEffective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraLudovico Caldara
 
Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Ludovico Caldara
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...Ludovico Caldara
 
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMBADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMBLudovico Caldara
 
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.Ludovico Caldara
 
Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Ludovico Caldara
 
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Ludovico Caldara
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Ludovico Caldara
 
Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Ludovico Caldara
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Ludovico Caldara
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewOracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewLudovico Caldara
 
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Ludovico Caldara
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Ludovico Caldara
 
Boost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesBoost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesLudovico Caldara
 
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databasesRACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databasesLudovico Caldara
 

Plus de Ludovico Caldara (20)

Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High Availability
 
Let your DBAs get some REST(api)
Let your DBAs get some REST(api)Let your DBAs get some REST(api)
Let your DBAs get some REST(api)
 
Effective Oracle Home Management - UKOUG_Tech18
Effective Oracle Home Management  - UKOUG_Tech18Effective Oracle Home Management  - UKOUG_Tech18
Effective Oracle Home Management - UKOUG_Tech18
 
Effective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraEffective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model era
 
Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
 
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMBADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
 
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
 
Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)Database Migration Assistant for Unicode (DMU)
Database Migration Assistant for Unicode (DMU)
 
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.Migrating to Oracle Database 12c: 300 DBs in 300 days.
Migrating to Oracle Database 12c: 300 DBs in 300 days.
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
 
Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!Oracle Active Data Guard and Global Data Services in Action!
Oracle Active Data Guard and Global Data Services in Action!
 
Rapid Home Provisioning
Rapid Home ProvisioningRapid Home Provisioning
Rapid Home Provisioning
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewOracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
 
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
 
Boost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesBoost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed Databases
 
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databasesRACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Oracle Client Failover - Under The Hood

  • 1. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH Oracle Client Failover – Under The Hood ITOUG Tech Day 2017 #ITOUGTD17 Robert Bialek Principal Consultant Ludovico Caldara Oracle ACE Director, Senior Consultant
  • 2. About Robert Bialek Principal Consultant and Trainer at Trivadis GmbH in Munich – MSc in Computer Engineering Focus: – Oracle Database High Availability – Database Architecture/Internals – Backup/Recovery – Troubleshooting/Performance Tuning – Linux Administration Trainer for the following Trivadis courses – Oracle Grid Infrastructure, RAC, Data Guard
  • 3. About Ludovico Caldara Adaptive Features or: How I learned to Stop Worrying3 24/08/2017 ■ 17 Years DBA (Not Only Oracle) ▪ I do it everywhere (even Windows) ■ RAC ATTACK Ninja & co-writer ■ President, SOUG & ITOUG Board ■ OCP (11g, 12c, MySQL) & OCE ■ Italian living in Switzerland ■ http://www.ludovicocaldara.net ■ @ludodba ludodba ■ ludovicocaldara
  • 4. Oracle Client Failover – Main Problems To Address Oracle Client Failover – Under The Hood New network session (connect) Already established network session Database Clients 1 IP not reachable (server/network/… issue) 2 Connect attempts 3 Wait for connect timeout 4 Client failover Problem Database Clients 2 IP not reachable (server/network/… issue) 1 Connected 3 Re-connect attempts 4 Wait for re-connect timeout Problem 5 Client failover ProblemProblem CASE 1 CASE 2 17.05.20174
  • 5. Oracle Client Failover – And The Solution? Oracle Client Failover – Under The Hood Depends strongly on many factors – Oracle client and database version. – Oracle database configuration, edition and available licenses. – Oracle client libraries/version (OCI, JDBC Thin,…). – Application design. – Network topology, latencies. – Operating system type, version and configuration. – With or without Virtual IP Addresses (VIP). Unfortunately no one size fits all solution… 17.05.20175
  • 6. Agenda Oracle Client Failover – Under The Hood 1. Operating System Introduction Connect Timeouts/ARP Cache Re-Connect Timeouts Virtual IP Addresses TCP Keepalive (DCD) 2. Oracle Client Failover Database Services Connect Timeouts Re-Connect Timeouts Transparent Application Failover Fast Application Notification/Fast Connection Failover Application Continuity 3. Conclusions 17.05.20176
  • 7. Oracle Client Failover – Under The Hood Operating System Introduction 17.05.20177
  • 8. Operating System – Introduction Oracle Client Failover – Under The Hood [SYN] Seq=0 SYN-SENT[SYN, ACK] Seq=0 Ack=1 [ACK] Seq=1 Ack=1 SYN-RCVD ESTABLISHED ESTABLISHED 1 2 3 . . .fd -> socket:[inode]LISTEN .socket(), bind() fd -> socket:[inode] read(), write () write (), read() Data Transfer connect() TCP three-way handshake CASE 1 CASE 2 Seq=Seq+1 Seq=Seq+1 17.05.20178
  • 9. Oracle Client Failover – Under The Hood Operating System Connect Timeouts/ARP Cache 17.05.20179
  • 10. New Network Session – Connect Timeout Oracle Client Failover – Under The Hood Kernel parameter: tcp_syn_retries – Max. number of times initial SYNs for an active TCP connection attempt will be retransmitted. – Default value in OEL 5/7 is 5 (63 sec. timeout), in OEL 6 it is 6 (127 sec. timeout). – Initial RTO is 1 sec., after each retry increased by 2 (<RTO>=<RTO>*2). – To change the value (not persistent). [SYN] Seq=0, RTO=1 sec. [SYN] Seq=0, RTO=2 sec. [TCP Retransmission] 1 tcp_syn_retries=5 4 5 Final Timeout = 2^(tcp_syn_retries+1)-1 Timeout/Error after 63 sec.(*) ORA-12170: TNS:Connect timeout occurred #Connect timeout after 15 sec. sysctl -w net.ipv4.tcp_syn_retries=3 [SYN] Seq=0, RTO=16 sec. [TCP Retransmission] … [SYN] Seq=0, RTO=32 sec. [TCP Retransmission] IP not reachable 17.05.201710
  • 11. New Network Session – Connect Timeout/ARP Oracle Client Failover – Under The Hood Depending on the ARP cache entry status, the following two different scenarios are possible during client connection to an unresponsive server ARP cache (192.168.122.29) IP:192.168.122.30 MAC:...:60:d4:0d REACHABLE IP Packet Source: IP, MAC Destination: IP, MAC Ethernet Frame Broadcast ARP Who has 192.168.122.29? Tell 192.168.122.30 IP:192.168.122.29 MAC:...:1d:54:ec REACHABLE IP:192.168.122.29 MAC:...:1d:54:ec REACHABLE ARP cache (192.168.122.30) Not refreshed yet! Client connect timeout (tcp_syn_retries) Refreshed! Client connect timeout ~3sec (the same network segment) ORA-12543: TNS: destination host unreachable ARP entry removed CASE 1 CASE 2 17.05.201711
  • 12. Oracle Client Failover – Under The Hood Operating System Re-Connect Timeouts 17.05.201712
  • 13. Established Network Session –Re-Connect Timeout Oracle Client Failover – Under The Hood Kernel parameter: tcp_retries2 – Max. number of TCP packet retransmissions for established sessions plus 1. – Default value: 15, Timeout range: ~15-30 min. – Initial RTO set 0.2 sec, increased by 2x during each re-try; the maximum value is 120 sec. – But, runtime RTO can be changed by kernel. – To change the value (not persistent). [PSH, ACK], RTO=0.2 sec. [PSH, ACK], RTO=0.4 sec. [TCP Retransmission] 1 tcp_retries2=3 Timeout/Error after ~6.2 sec. [PSH, ACK], RTO=0.8 sec. [TCP Retransmission] 2 [PSH, ACK], RTO=3.2 sec. [TCP Retransmission] 4 ORA-03113: end-of- file on communication channel ss -ipo dst 192.168.122.29 socket timer:(on,1min44sec,11) socket timer:(on,49sec,11) #1 sec. later #Re-connect timeout after ~12 sec. sysctl -w net.ipv4.tcp_retries2=4 Data … 17.05.201713
  • 14. Oracle Client Failover – Under The Hood Operating System Virtual IP Addresses 17.05.201714
  • 15. Virtual IP Addresses (VIP) Oracle Client Failover – Under The Hood IP addresses managed by a cluster which do not correspond persistently to physical NICs. Client connects to network socket: <VIP>:<Port>. eth0 eth0:1 VIP eth0 Server A Server B VIP:192.168.122.30 MAC:eth0 ARP cache 1 eth0 Server A Server B ARP cache 2 3 Flushing neighbours ARP Cache 5 VIP Relocate eth0 VIP:192.168.122.30 MAC:eth0 TCP [RST] 4 <ServerA> <ServerA><ServerB> eth0:1 VIP 17.05.201715
  • 16. Oracle Client Failover – Under The Hood Operating System TCP Keepalive (DCD) 17.05.201716
  • 17. Network – TCP Keepalive (DCD): Server Oracle Client Failover – Under The Hood TCP mechanism which helps to detect broken network connections. Kernel parameters. For Oracle server (shadow) processes, automatically enabled on the network socket – Implementation changed in 12c (tcp socket timer instead of Oracle Net probes). net.ipv4.tcp_keepalive_time = 7200 #keepalive probe every 2 hrs. net.ipv4.tcp_keepalive_intvl = 75 #if not reachable probe every 75 sec. net.ipv4.tcp_keepalive_probes =9 #close the connection after 9 failed probes # 7200 seconds of the keepalive timer + 9 times 75 seconds = 7875 sec. Probe Network socket closed after 7875 sec. sqlnet.ora OS Settings SQLNET.EXPIRE_TIME=1 tcp_keepalive_time = 60 tcp_keepalive_intvl = 10 tcp_keepalive_probes = 6 Translates to 2 min. timeout 17.05.201717
  • 18. Network – TCP Keepalive (DCD): Client For Oracle client processes not activated per default. – Unless ENABLE=BROKEN specified in the connect descriptor. The default client timeout is 7875 sec.! – Cannot be influenced by SQLNET.EXPIRE_TIME. To reduce the timeout, you need to reduce OS kernel parameters. Probe Local Address Foreign Address State PID/Program name Timer 192.168.122.2:38814 192.168.122.3:15300 ESTABLISHED 5963/sqlplus off(0.00/0/0) NONCDB.TRIVADIS.COM = (DESCRIPTION = (ENABLE=BROKEN) (ADDRESS_LIST = ... echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time echo 10 > /proc/sys/net/ipv4/tcp_keepalive_probes echo 6 > /proc/sys/net/ipv4/tcp_keepalive_intvl Translates to 2 min. timeout Oracle Client Failover – Under The Hood17.05.201718
  • 19. Oracle Client Failover – Under The Hood Oracle Client Failover Database Services 17.05.201719
  • 20. The Foundation – Database Services Oracle Client Failover – Under The Hood A named representation of one or more running Oracle database instances – Introduced with the Oracle 8i version. – Part of the Oracle client connect descriptor. – Basis of Oracle database high availability and workload management. 17.05.201720 RAC Active/Active RAC Active/Passive Data Guard, RAC One Node, Failover DB Configuration Connect to database service Services registered with listener Services registered with listener
  • 21. Database Services (1) Oracle Client Failover – Under The Hood Database services can be created with: – srvctl (Grid Infrastructure), gdsctl (Global Data Services). – dbms_service.create_service() PL/SQL procedure. Different high availability and workload management attributes can be defined Service srvctl add service -db <db_unique_name> -service <service> -preferred "<preferred_list>" -available "<available_list>" -serverpool <pool_name> -cardinality [UNIFORM | SINGLETON] -tafpolicy [NONE | BASIC | PRECONNECT] -role [PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY] -clbgoal [SHORT | LONG] -rlbgoal [SERVICE_TIME | THROUGHPUT | NONE] ... Some attributes applicable only for specific configurations Not available with Oracle Restart 17.05.201721
  • 22. Database Services (2) Oracle Client Failover – Under The Hood Example service creation with PL/SQL Database service created with the above method needs to be started after opening a database Create your own TRIGGER firing AFTER STARTUP ON DATABASE Service BEGIN DBMS_SERVICE.CREATE_SERVICE ( service_name => 'OLTP.TRIVADIS.COM', network_name => 'OLTP.TRIVADIS.COM', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 180, failover_delay => 3); END; / EXECUTE DBMS_SERVICE.START_SERVICE('OLTP.TRIVADIS.COM') 17.05.201722
  • 23. Role-Based Services (1) Oracle Client Failover – Under The Hood For a Data Guard system, we need a role-based service, that is running only if database has a specific role – Read-write service on a primary database. – Optionally, a service on standby databases for reporting. – Optionally, a service on snapshot standby databases. To accomplish this: – Use Oracle Grid Infrastructure role-based services. – Create your own AFTER STARTUP ON DATABASE trigger. 17.05.201723 Service R/W Service R/O
  • 24. Role-Based Services (2) Oracle Client Failover – Under The Hood Example role-based services with Grid Infrastructure. Services are started, only if database and service role match. srvctl add service -db DG_SITE1 –service OLTP_RW.trivadis.com -role PRIMARY srvctl add service -db DG_SITE1 -service OLTP_RO.trivadis.com -role PHYSICAL_STANDBY srvctl add service -db DG_SITE1 -service OLTP_SNAP.trivadis.com -role SNAPSHOT_STANDBY SvcAgent::start 680 query_db_role SvcAgent::start 710 not starting service oltp Role mismatch - Service role:PRIMARY, current DB role:PHYSICAL_STANDBY 17.05.201724
  • 25. Role-Based Services (3) Oracle Client Failover – Under The Hood Example role-based services without Grid Infrastructure. CREATE OR REPLACE TRIGGER service_trigger AFTER STARTUP ON DATABASE DECLARE v_service_ro VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_RO.' || sys_context('userenv','db_domain'), '.'); v_service_rw VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_RW.' || sys_context('userenv','db_domain'), '.'); v_service_snap VARCHAR2(64) := rtrim(sys_context('userenv','db_name')||'_SNAP.' || sys_context('userenv','db_domain'), '.'); v_ro_service_count NUMBER; BEGIN SELECT count(*) INTO v_ro_service_count FROM v$active_services WHERE name = v_service_ro; IF sys_context('userenv','database_role') IN ('PRIMARY','SNAPSHOT STANDBY') AND v_ro_service_count = 1 THEN dbms_service.stop_service(v_service_ro); dbms_service.disconnect_session(v_service_ro,dbms_service.immediate); END IF; IF sys_context('userenv','database_role') = 'PRIMARY' THEN dbms_service.start_service(v_service_rw); ELSIF sys_context('userenv','database_role') = 'SNAPSHOT STANDBY' THEN dbms_service.start_service(v_service_snap); ELSE IF v_ro_service_count = 0 THEN dbms_service.start_service(v_service_ro); END IF; END IF; END; / 17.05.201725
  • 26. Database Services – Application Client Configuration (1) Configuration for RAC (without DG): use Single Client Access Name (SCAN). Configuration for Data Guard (without RAC). OLTP.trivadistraining.com = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP )(HOST = sweden)(PORT = 1521 )) (CONNECT_DATA = (SERVICE_NAME = OLTP.trivadistraining.com ) ) ) PHYS.trivadistraining.com = (DESCRIPTION = (FAILOVER = ON)(LOAD_BALANCE = OFF) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = blue)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = red)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = PHYS_RW.trivadistraining.com) )) PHYS_SITE1 PHYS_SITE2 Primary Database Standby Database RAC Database blue red blue yellow Oracle Client Failover – Under The Hood17.05.201726 3 Virtual IP Addresses Potential issue with TCP Timeouts
  • 27. Database Services – Application Client Configuration (2) Configuration for Maximum Availability Architecture – RAC with Data Guard. MAA.trivadistraining.com = (DESCRIPTION = (ADDRESS_LIST = (LOADBALANCE = OFF ) (ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521 )) ) (CONNECT_DATA = (SERVICE_NAME = MAA_RW.trivadistraining.com ) ) ) MAA_SITE1 MAA_SITE2 Primary Database Standby Database blue yellow red white Oracle Client Failover – Under The Hood17.05.201727 Potential issue with TCP Timeouts 3 Virtual IP Addresses
  • 28. Oracle Client Failover – Under The Hood Oracle Client Failover Connect Timeouts 17.05.201728
  • 29. New Oracle Net Session – Connect Timeout (1) Oracle Client Failover – Under The Hood sqlnet.ora parameters (OCI, ODP.net) Address description parameters (>=11gR2) – Override sqlnet.ora parameters – Parameters can be used for OCI, ODP.net TCP.CONNECT_TIMEOUT=3 #default 60 sec. SQLNET.OUTBOUND_CONNECT_TIMEOUT=5 #no default 17.05.201729 LSNR LSNR Three-way handshake Oracle Net 1 2 3 With SCAN, a client might wait 3 x <timeout_value> OLTP.trivadis.com = (DESCRIPTION = (FAILOVER=ON) (LOAD_BALANCE=OFF) (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = OLTP.trivadis.com))) Introduced in 12.1.0.2
  • 30. New Oracle Net Session – Connect Timeout Oracle Client Failover – Under The Hood JDBC Thin driver – TRANSPORT_CONNECT_TIMEOUT is available beginning with 12.2 version – To use RETRY_COUNT with 12.1.0.2, patch is required (BUG 19154304) JDBC Thin clients can alternatively use the following driver property (ms) – Overrides CONNECT_TIMEOUT from address description parameters pds.setURL("jdbc:oracle:thin:@(DESCRIPTION =(FAILOVER=ON)(LOAD_BALANCE=OFF)" + "(CONNECT_TIMEOUT=3)(RETRY_COUNT=10)(RETRY_DELAY=1)" + "(ADDRESS_LIST = " + "(ADDRESS = (PROTOCOL = TCP )(HOST = blue.trivadis.com )(PORT = 1521)) " + "(ADDRESS = (PROTOCOL = TCP )(HOST = brown.trivadis.com )(PORT = 1521))) " + "(CONNECT_DATA = (SERVICE_NAME = sales_rw.trivadis.com)))"); Properties prop = new Properties(); prop.put(oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR, ""+3000); ods.setConnectionProperties(prop); 17.05.201730
  • 31. New Oracle Net Session – Connect Timeout Oracle Client Failover – Under The Hood De-prioritization of down database nodes (activated by default – 600 sec.) Down state of a server is kept in client process cache – For OCI driver introduced with 12.1.0.2: SQLNET.DOWN_HOSTS_TIMEOUT – For JDBC Thin driver with 12.2.0.1: oracle.net.DOWN_HOSTS_TIMEOUT IP1 down IP2 up Pre 12.1.0.2 IP1 down IP2 up IP1 down Timeout Timeout Timeout IP1 down IP2 up 12.1.0.2+ IP2 up IP2 up IP1 down Timeout Timeout Cache entry expired IP2 up IP2 up 17.05.201731
  • 32. Oracle Client Failover – Under The Hood Oracle Client Failover Re-Connect Timeouts 17.05.201732
  • 33. Established Oracle Net Session – Re-Connect Timeout Oracle Client Failover – Under The Hood Break established network connection without waiting for long TCP timeouts (>15 min.) sqlnet.ora parameters (OCI & ODP.net) – The actual wait time is 2 x timeout value (wait for timeout -> switch into break and reset mode -> wait for timeout)! For JDBC Thin clients you can set the following connection property LSNR LSNROracle Net 1 P1 2 Client failover 4 SQLNET.RECV_TIMEOUT=30 #no default value SQLNET.SEND_TIMEOUT=30 #no default value Timeout 3 2417.05.201733 Properties prop = new Properties(); prop.put ("oracle.jdbc.ReadTimeout", "30000"); //30 sec. ods.setConnectionProperties(prop);
  • 34. Established Oracle Net Session – Re-Connect Timeout Oracle Client Failover – Under The Hood Important: be very careful with re-connect timeouts! – You might encounter unwanted side effects, like dropping still valid Oracle Net connections! – Deploy them only if strictly necessary after careful testing! Better, don‘t use them! – Tuning OS kernel parameter tcp_retries2 might be a better choice! – Tuning re-connect timeouts is not necessary, in case you use Fast Connection Failover (FCF) with Fast Application Notification (FAN). 2417.05.201734
  • 35. Oracle Client Failover – Under The Hood Oracle Client Failover Transparent Application Failover 17.05.201735
  • 36. Transparent Application Failover – Overview Oracle Client Failover – Under The Hood TAF is a feature of the client OCI driver introduced in Oracle 8 – Masks many failures from the end users. – Allows for automatic re-connection. – In many cases allows for resumable queries. – Useful for session migration between RAC instances during some planned downtimes. Failover process can only be initiated, after receiving an error for the established connection. TAF properties can be set on the client or server side (recommended, higher priority). 17.05.201736 (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP )(HOST = italy )(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP )(HOST = sweden )(PORT = 1521))) Waiting too long for an error slows down the failover process!
  • 37. TAF – Parameters (Server/Client Side) Oracle Client Failover – Under The Hood Comparison of the server and client side TAF parameters. 17.05.201737 TAF Parameter Grid Infrastructure srvctl Parameters PL/SQL DBMS_SERVICE.CREATE_SERVICE Client tnsnames.ora/LDAP Policy/Method -tafpolicy [NONE | BASIC | PRECONNECT] FAILOVER_METHOD [FAILOVER_METHOD_NONE | FAILOVER_METHOD_BASIC] METHOD [BASIC | PRECONNECT] Type -failovertype [NONE | SESSION | SELECT | TRANSACTION] FAILOVER_TYPE [FAILOVER_TYPE_NONE | FAILOVER_TYPE_SESSION | FAILOVER_TYPE_SELECT] TYPE [SESSION | SELECT | NONE] Backup Service (Preconnect) BACKUP <SERVICE_NAME> Failover Delay -failoverdelay FAILOVER_DELAY DELAY Failover Retry -failoverretry FAILOVER_RETRIES RETRIES
  • 38. Transparent Application Failover – Types Oracle Client Failover – Under The Hood Two types of TAF – SESSION or SELECT – With SESSION, client connection/session is re-created to a surviving database instance. – SELECT supports query re-executions that where in progress at the time of a failure. 17.05.201738 Checksum on the discarded and previously fetched rows is calculated. Oracle Net 1 2 Fetched Lost Fetched Discarded
  • 39. Transparent Application Failover – Server Side Example Oracle Client Failover – Under The Hood Example server side TAF BASIC method configuration. srvctl add service -db OLTP_SITE1 -service OLTP_RW -preferred OLTP1,OLTP2 -tafpolicy BASIC -failovertype SELECT -failoverdelay 1 -failoverretry 180 17.05.201739 BEGIN DBMS_SERVICE.CREATE_SERVICE ( service_name => 'OLTP.TRIVADIS.COM', network_name => 'OLTP.TRIVADIS.COM', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 180, failover_delay => 3); END; /
  • 40. Transparent Application Failover – Client Side Example Oracle Client Failover – Under The Hood Example client side TAF BASIC method configuration. 1817.05.201740 OLTP.trivadis.com = (DESCRIPTION = (FAILOVER=ON) (LOAD_BALANCE=OFF) (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS=(PROTOCOL=TCP)(HOST=cl121.trivadis.com)(PORT=1521)) (CONNECT_DATA = (SERVICE_NAME = OLTP.trivadis.com) (FAILOVER_MODE = (TYPE = SESSION) (METHOD = BASIC) (RETRIES = 180) (DELAY = 1) ) ) ) Single Client Access Name
  • 41. Transparent Application Failover – Failover Behavior Oracle Client Failover – Under The Hood Example client failover behavior with TAF BASIC method – Query GV$SESSION before failover. – Kill PMON process on the RAC instance 1 and query GV$SESSION after failover again. 17.05.201741 INST_ID USERNAME SID FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER ------- -------- ---- ------------- --------------- ----------- 2 BIR 277 SELECT BASIC YES INST_ID USERNAME SID FAILOVER_TYPE FAILOVER_METHOD FAILED_OVER ------- -------- ---- ------------- --------------- ----------- 1 BIR 44 SELECT BASIC NO
  • 42. TAF – Session Migration Oracle Client Failover – Under The Hood TAF might be used, to transparently migrate client sessions between RAC nodes during planned downtimes. Method 1. Method 2. 17.05.201742 srvctl stop service -db <db_unique_name> -instance <instance> -service <service> EXEC DBMS_SERVICE.DISCONNECT_SESSION('<service>', DBMS_SERVICE.POST_TRANSACTION) srvctl stop service -db <db_unique_name> -instance <instance> -service <service> srvctl stop instance -db <db_unique_name> -service <service> -stopoption "TRANSACTIONAL LOCAL" Resource ACTION_TIMEOUT=600 All ongoing transactions running in the local instance for more than 10 min. are aborted!
  • 43. Oracle Client Failover – Under The Hood Oracle Client Failover Fast Application Notification Fast Connection Failover 17.05.201743
  • 44. Fast Application Notification – Overview Oracle Client Failover – Under The Hood Provides rapid notification about status changes (up/down events) for database services, instances and nodes. Delivers workload information about services (runtime load balancing). Starting with Oracle 12c ONS is used as the FAN transport for all client types FAN event consists of header and payload: ONS ONS FAN Subscribers 17.05.201744 ** Event Header ** Notification Type: database/event/service Delivery Time: Mon Oct 10 21:56:43 CEST 2016 Generating Node: cldb01.trivadis.com Event payload: VERSION=1.0 event_type=SERVICEMEMBER service=soe_app1.TRIVADIS.COM instance=RAC2 database=rac_site1 db_domain=TRIVADIS.COM host=cldb02 status=down reason=FAILURE timestamp=2016-10-10 21:56:43 timezone=+02:0
  • 45. Requirements For Using FAN Events (1) Oracle Client Failover – Under The Hood Oracle Grid Infrastructure is necessary to register with ONS – ONS default ports – local: 6100, remote: 6200 (firewall). – Configured and started automatically for GI cluster installations. – For GI standalone systems needs to be activated and configured manually (e.g. Data Guard). Database needs to be registered in OCR/OLR with the ora.database.type type – Does not work for user defined resources (failover databases). Can be used with different client types: JDBC, OCI, ODP.net – Integrated with UCP, starting with 11gR2 FAN API can be used (SimpleFan.jar) srvctl enable ons srvctl modify ons -remoteservers <remote_node> –verbose srvctl start ons ONS ONS 17.05.201745
  • 46. Requirements For Using FAN Events (2) Oracle Client Failover – Under The Hood Correct database service configuration is necessary – rlbgoal needs only to be set to receive runtime load balancing advisory events. Beginning with the 12c version (client and server), FAN-enabled clients can use FAN auto-configuration – For older versions you need to specify the ONS endpoints manually. srvctl add service #The same for GDS (gdsctl) -clbgoal [SHORT|LONG] #LONG is the default -rlbgoal [SERVICE_TIME | THROUGHPUT | NONE] -notification [TRUE | FALSE] #To enable FAN for OCI/ODP.net connections pds.setONSConfiguration("nodes=blue.trivadis.com:6200,brown.trivadis.com:6200"); ONS ONS 17.05.201746
  • 47. Fast Connection Failover – Overview Oracle Client Failover – Under The Hood Pre-configured client side FAN integration for JDBC clients – It works in combination with connection pooling mechanism, so the Universal Connection Pool (UCP) or WebLogic Server Active GridLink is necessary. Reacts to up/down FAN events – Remove dead connections from connection pool after receiving FAN down event and redistributing them, if applicable, to other available nodes. – Connection re-distribution after receiving FAN up event. Do not configure TAF with FCF for JDBC thick (OCI) clients. ONS Connection Pool (60 connections) 1 30 30 2 360 4 ONS 17.05.201747
  • 48. Fast Connection Failover – FAN Event Oracle Client Failover – Under The Hood Example Fast Connection Failover processing information after a service down FAN event received by a client application (switchover in a Data Guard environment). The FCF information can be processed in the application exception code. 17.05.201748 Oct 11, 2016 10:52 AM SUCCESS <Reason:user> <Type:SERVICE_DOWN> <Service:"sales_rw.trivadis.com"> <Instance:"dg2"> <Db:"dg2_site2"> Connections:(Available=20 Affected=20 FailedToProcess=0 MarkedDown=20 Closed=20)(Borrowed=0 Affected=0 FailedToProcess=0 MarkedDown=0 MarkedDeferredClose=0 Closed=0) catch (SQLException ex) { if (conn == null || !((ValidConnection) conn).isValid()) { String fcfInfo = ((OracleJDBCConnectionPoolStatistics)pds.getStatistics()).getFCFProc essingInfoProcessedOnly();
  • 49. Fast Connection Failover – Setup Oracle Client Failover – Under The Hood Example how to use FCF with Universal Connection Pool (UCP) – Configure ONS and database service. – Include UCP and ONS libraries in your CLASSPATH (not part of the Oracle Instant Client installation). To subscribe to FAN events and use HA UCP features you need to activate FCF first. CLASSPATH=.:/usr/lib/oracle/12.1/client64/lib/ojdbc7.jar:/usr/lib/oracle/12.1/client 64/lib/ons.jar:/usr/lib/oracle/12.1/client64/lib/ucp.jar 17.05.201749 ... PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource(); pds.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource"); pds.setURL(dbURL); ... pds.setFastConnectionFailoverEnabled(true); //not activated per default! Setting connection pool properties
  • 50. Fast Connection Failover – Restrictions Oracle Client Failover – Under The Hood Fast Connection Failover restrictions – In-flight transactions are lost as well as calls in the middle of execution. – As with TAF, FAN is not designed to hide server process failure (No more data to read from socket). – Application exception handling is absolutely necessary! 17.05.201750
  • 51. Oracle Client Failover – Under The Hood Oracle Client Failover Application Continuity 17.05.201751
  • 52. Application Continuity – Overview Oracle Client Failover – Under The Hood Addresses temporary recoverable outages of instances, databases and network communications. Transaction Guard – server side component – Transaction state is recorded and retrievable within database in order to ensure idempotent execution on replay (DBMS_APP_CONT.GET_LTXID_OUTCOME). – Can be used standalone using Oracle Client 12c for JDBC thin, OCI and ODP.net. – Available with Oracle 12c Enterprise Edition. Oracle 12c JDBC Replay Driver – client side component – Replays the failed request so that the client may simply continue. – As of 12.1 implemented only for JDBC thin client, in 12.2 also OCI and ODP.net. Application Continuity requires RAC or RAC One Node or ADG (GG) option. 17.05.201752
  • 53. Application Continuity – Interaction With UCP Oracle Client Failover – Under The Hood Example AC/TG interaction with UCP 1 Check-out connection (Request begin) Associate LTXID Send LTXID to the driver 2 3 Work: INS/DEL/UPD/COM INS DEL UPD COM Replay Buffer 4 Communication Break 5 Recoverable Error SQL Exception 8 Check the last LTXID outcome 7 If safe, Replay 6 Request new connection 9 Check-in connection (Request end) UCP 17.05.201753 Runtime Re-ConnectReplay
  • 54. Application Continuity – Application Changes Oracle Client Failover – Under The Hood Application Continuity with UCP Application Continuity without connection pool PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource(); pds.setConnectionFactoryClassName("oracle.jdbc.replay.OracleDataSourceImpl"); ... conn = pds.getConnection(); // Implicit database request begin // JDBC calls protected by Application Continuity conn.close(); // Implicit database request end OracleDataSourceImpl ods = new OracleDataSourceImpl(); conn = ods.getConnection(); ... ((ReplayableConnection)conn).beginRequest(); // Explicit database request begin // JDBC calls protected by Application Continuity ((ReplayableConnection)conn).endRequest(); // Explicit database request end 17.05.201754
  • 55. Application Continuity – Requirements (1) Oracle Client Failover – Under The Hood Database service attributes need to be correctly specified for AC and TG srvctl add service -failovertype TRANSACTION # to enable Application Continuity -commit_outcome TRUE # to enable Transaction Guard -retention 86400 # the number of seconds the commit outcome is retained -replay_init_time 900 # seconds after which replay will not be initiated -failoverretry 20 -failoverdelay 2 -notification TRUE # with Oracle Restart, to avoid ORA-44781 during service start 17.05.201755
  • 56. Application Continuity – Requirements (2) Oracle Client Failover – Under The Hood Mutable Values – Replay is aborted whenever a data divergency is encountered between original and replay requests and answers. – Sequences can be configured to keep their values on replay. – SYSDATE/SYSTIMESTAMP can be configured to keep their values on replay. – SYS_GUID can be configured to keep values on replay. 17.05.201756 GRANT KEEP SEQUENCE ON <SEQUENCE> TO USER <USER>; GRANT KEEP DATE TIME TO <USER>; GRANT KEEP SYSGUID TO <USER>;
  • 57. Application Continuity – Deactivating Replay Oracle Client Failover – Under The Hood Killing/Disconnecting a session without replay Stopping a service without replay Some restrictions: – Autonomous transactions, XA, ADG with read/write DB links, GoldenGate or Logical Standby databases not supported Error handling still necessary (non-recoverable errors, replay not possible, etc.) 17.05.201757 ALTER SYSTEM KILL SESSION 'sid, serial#, @inst' NOREPLAY; ALTER SYSTEM DISCONNECT SESSION 'sid, serial#, @inst' NOREPLAY; EXECUTE DBMS_SERVICE.DISCONNECT_SESSION('[service_name]', DBMS_SERVICE.NOREPLAY); srvctl stop service -db RAC_SITE1 -instance RAC2 -service OLTP –force –stop_option immediate –noreplay
  • 58. Oracle Client Failover – Under The Hood Conclusions 17.05.201758
  • 59. Conclusions Oracle Client Failover – Under The Hood To achieve high availability, correct client-side configuration for failover is crucial. Tuning OS kernel parameters is not the preferred way to go. At least Oracle client connect timeouts should be set. Be careful with Oracle re-connect timeouts (undesired side effects). VIP addresses are very useful in cluster environments and solve many problems out of the box. Dynamic database services are key to client high availability. TAF/FAN/FCF are very powerful – But with some limitations – and exception handling is still necessary! Application Continuity helps to transparently replay in-flight transactions. – Exception handling is still necessary! 17.05.201759