Documente Academic
Documente Profesional
Documente Cultură
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 2
Common Questions
• How do I contact you ?
– Linkedin – Sandesh Rao
– Email – Sandesh.rao@oracle.com
• Where do I get your presentation ?
– http://otnyathra.in/downloads/
Level 2a
Level 3
Level 0
Level 4b
Level 1
Level 2b
Shared ASM
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 18
ASM Flex Diskgroups 2
Database-oriented Storage Management for more flexibility and availability
12.2 Flex Diskgroup Organization
• Flex Diskgroups enable
– Quota Management - limit the space
Flex Diskgroup databases can allocate in a diskgroup and
thereby improve the customers’ ability to
DB1 DB2 DB3 consolidate databases into fewer DGs
File 1 File 1 File 1 – Redundancy Change – utilize lower
redundancy for less critical databases
Quota File 2 File 2 File 2
File 3 – Shadow Copies (“split mirrors”) to easily
File 3 File 3 DB3
and dynamically create database clones
File 4 File 1
for test/dev or production databases
File 2
File 3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 19
Node Weighting in Oracle RAC 12c Release 2
Idea: Everything equal, let the majority of work survive
✔
srvctl modify database -help
|grep critical
…
-css_critical {YES | NO}
Define whether the database
or service is CSS critical
Private Lan /
Interconnect
SAN SAN
Network Voting Network
Disk
“Ping”
CSSD CSSD
“Ping”
• Voting Disks must therefore not be copied using “dd” or “cp” anymore
CSSD CSSD
• http://www.oracle.com/goto/rac
– Using standard NFS to support
a third voting file for extended
cluster configurations (PDF)
CSSD CSSD
1 2
CSSD CSSD
CSSD CSSD
Standalone Standalone
App X App Y
Oracle RAC Oracle RAC
DB Inst. 1 DB Inst. 2
CSSD CSSD
• Then IO issuing processes are killed; it is made sure that no IO process remains
– For a RAC DB mainly the log writer and the database writer are of concern
Standalone Standalone
App X App Y
Oracle RAC
DB Inst. 1
CSSD CSSD
Standalone Standalone
App X App Y
Oracle RAC Oracle RAC
DB Inst. 1 DB Inst. 2
CSSD CSSD
YES
YES
ps –ef|grep cssdagent
ps –ef|grep oraagent NO
YES
ps –ef|grep ora.asm
Engage
ps –ef|grep gpnpd.bin
TFA Collector Oracle Support
ps –ef|grep mdnsd.bin ohasd.log Sysadmin Team
ps –ef|grep evmd.bin OLR perms
Crsctl check crs Compare reference system
Crsctl check cluster
NO
YES TFA Collector
Obvious?
Engage
NO
Node Eviction Resolved?
NO
Oracle
Support
TFA Collector
• Conclusion
1. This is likely a network problem, engage network team
2. Check OSWatcheroutput (netstat and traceroute)
1. Configure private.net file, not configured by default
3. Check CHM
4. Check system log
• CRSD orarootagent
– CRSD’s rootagent manages
• GNS and it’s VIP
• Node VIP
• SCAN VIP
• network resources.
– Log file is
• GI_HOME/log/<node>/agent/crsd/orarootagent_root/oraagent_root.log
Cluster
• What if resource bottlenecks threatening Health
SLAs were identified early? EXAchk Advisor
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 60
Maintains Compliance
with Best Practices and
Alerts Vulnerabilities to
Known Issues
Note:
• Use the same arguments with check that you used with start
• Will proceed to perform standard health checks after attribute checking
• File Attribute Changes will also show in HTML report output
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal 77
Why TFA?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal 78
Supported Platforms and Versions
• All major Operating Systems are • All Oracle Database & Grid versions
supported 10.2+ are supported
– Linux (OEL, RedHat, SUSE, Itanium &
zLinux) • You probably already have TFA
– Oracle Solaris (SPARC & x86-64) installed as it is included with:
– AIX Oracle Grid
Oracle Database
Infrastructure
– HPUX (Itanium & PA-RISC) 11.2.0.4+
– Windows 12.1.0.2+ 12.2.0.1+
12.2.0.1+
Significant 3 Notify
problem occurs
relevant DBA and
or Sys Admin by
email
Upgrade to the latest version whenever possible to include bug fixes, new features & optimizations
ASM Overview
Problems found
Searching for
“ora-00600”
1. Where necessary set context with database <dbname> tfactl > database MyDB
5. Trimmed where
applicable
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 100
Automatic Database Log Purge
• TFA can automatically purge database logs
– OFF by default
– Except on a Domain Service Cluster (DSC),
which it is ON by default
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 101
Manual Database Log Purge
• TFA can manage ADR log and trace files
– Show disk space usage of individual diagnostic destinations
– Purge these file types based on diagnostic location and or age:
• "ALERT“, "INCIDENT“, "TRACE“, "CDUMP“, "HM“, "UTSCDMP“, "LOG“
tfactl managelogs <options>
Option Description
Runs as the ADR home
–show usage Shows disk space usage per diagnostic directory for both GI and database logs owner. So will only be able
-show variation –older <n><m|h|d> Use to determine per directory disk space growth. to purge files this owner
Shows the disk usage variation for the specified period per directory. has permission to delete
-purge –older <n><m|h|d> Remove all ADR files under the GI_BASE directory, which are older than the time specified
–gi Restrict command to only diagnostic files under the GI_BASE
–database [all | dbname] Restrict command to only diagnostic files under the database directory. Defaults to all,
alternatively specify a database name
-dryrun Use with –purge to estimate how many files will be affected and how much disk space will be May take a while for a
freed by a potential purge command. large number of files
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 102
Manual Database Log Purge
tfactl managelogs –show usage tfactl managelogs –show variation –older <n><m|h|d>
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 103
Manual Database Log Purge
tfactl managelogs –purge –older n<m|h|d> -dryrun tfactl managelogs –purge –older n<m|h|d>
Use –dryrun
for a “what if”
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 104
Disk Usage Snapshots
• TFA will track disk usage and record snapshots to:
– tfa/repository/suptools/<node>/managelogs/usage_snapshot/
• Snapshot happens every 60 minutes, configurable with:
tfactl set diskUsageMonInterval=<minutes>
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 105
Collect
• Trim & collect all important log files updated in • Collect a problem specific Service Request Data
the past 12 hours: tfactl diagcollect Collection (SRDC): tfactl diagcollect -srdc ora600
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 106
TFA dbglevel profiles
• Example
– tfactl dbglevel -set node_eviction
– would be used for enhancing diagnostics when node evictions are the being
investigated and would perform the following operation internally
• crsctl set log css "CSSD=4"
• crsctl set log css "CSSDNMC=4"
• crsctl set log css "CLSF=4"
• crsctl set log css "CSSDGMCC=4"
• crsctl set log css "CSSDGMPC=4"
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal 108
Generates Diagnostic
Metrics View of Cluster
and Databases
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential –
Confidential –Oracle Restricted
Oracle Internal/Restricted/Highly Restricted 109
Cluster Health Monitor (CHM)
Generates Diagnostic Metrics View of Cluster and Databases
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential –
Confidential –Oracle Restricted
Oracle Internal/Restricted/Highly Restricted 111
Discovers Potential Cluster
& DB Problems - Notifies
with Corrective Actions
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential –
Confidential –Oracle Restricted
Oracle Internal/Restricted/Highly Restricted 112
Cluster Health Monitor (CHM)
Generates Diagnostic Metrics View of Cluster and Databases
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 114
CHA has detected a service degradation due to higher than expected I/O latencies.
CHA/DB Health
CHA detected a for service degradation due to higher than expected I/O latencies.
proddb_2
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 116
Command Line Tool - chactl
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 117
Cluster Health Advisor
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 118
Cluster Health Advisor - diagnosis Query a specific database for
diagnosis
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 119
Autonomously Preserves
Database Availability and
Performance
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential –
Confidential –Oracle Restricted
Oracle Internal/Restricted/Highly Restricted 120
Debugging Live Systems: Hangs
• Parsing the system state dump can be very time consuming.
To debug a hang more quickly you could query v$session.
blocking_session:
select sess.sid sid,substr(proc.program,0,25)
prog,substr(sw.event,0,15) event,sw.wait_time wt,
sess.blocking_session bsid from v$process proc, v$session sess,
v$session_wait sw where proc.addr=sess.paddr and
sess.status='ACTIVE‘ and sw.sid=sess.sid order by prog;
deadlocks
• Autonomously resolves them EVALUATE
Hung?
• Supports QoS Performance Classes, Ranks
and Policies to maintain SLAs ANALYZE
QoS
• Logs all detections and resolutions Policy
DIA0 VERIFY
• New SQL interface to configure sensitivity
(Normal/High) and trace file sizes
Victim
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 123
Oracle 12c Hang Manager
Full Resolution Dump Trace File and DB Alert Log Audit Reports
Dump file …/diag/rdbms/hm6/hm62/incident/incdir_5753/hm62_dia0_12656_i5753.trc
Oracle Database 12c Enterprise Edition Release 12.2.0.0.0 - 64bit Beta
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics 2015-10-13T16:47:59.435039+17:00
and Real Application Testing options Errors in file /oracle/log/diag/rdbms/hm6/hm6/trace/hm6_dia0_12433.trc (incident=7353):
Build label: RDBMS_MAIN_LINUX.X64_151013 ORA-32701: Possible hangs up to hang ID=1 detected
ORACLE_HOME: …/3775268204/oracle Incident details in: …/diag/rdbms/hm6/hm6/incident/incdir_7353/hm6_dia0_12433_i7353.trc
System name: Linux 2015-10-13T16:47:59.506775+17:00
Node name: slc05kyr DIA0 requesting termination of session sid:40 with serial # 43179 (ospid:13031) on instance 2
Release: 2.6.39-400.211.1.el6uek.x86_64 due to a GLOBAL, HIGH confidence hang with ID=1.
Version: #1 SMP Fri Nov 15 13:39:16 PST 2013 Hang Resolution Reason: Automatic hang resolution was performed to free a
Machine: x86_64 significant number of affected sessions.
VM name: Xen Version: 3.4 (PVM) DIA0: Examine the alert log on instance 2 for session termination status of hang with ID=1.
Instance name: hm62
Redo thread mounted by this instance: 2 In the alert log on the instance local to the session (instance 2 in this case),
Oracle process number: 19 we see the following:
Unix process pid: 12656, image: oracle@slc05kyr (DIA0)
2015-10-13T16:47:59.538673+17:00
Errors in file …/diag/rdbms/hm6/hm62/trace/hm62_dia0_12656.trc (incident=5753):
*** 2015-10-13T16:47:59.541509+17:00 ORA-32701: Possible hangs up to hang ID=1 detected
*** SESSION ID:(96.41299) 2015-10-13T16:47:59.541519+17:00 Incident details in: …/diag/rdbms/hm6/hm62/incident/incdir_5753/hm62_dia0_12656_i5753.trc
*** CLIENT ID:() 2015-10-13T16:47:59.541529+17:00
*** SERVICE NAME:(SYS$BACKGROUND) 2015-10-13T16:47:59.541538+17:00 2015-10-13T16:48:04.222661+17:00
*** MODULE NAME:() 2015-10-13T16:47:59.541547+17:00 DIA0 terminating blocker (ospid: 13031 sid: 40 ser#: 43179) of hang with ID = 1
*** ACTION NAME:() 2015-10-13T16:47:59.541556+17:00 requested by master DIA0 process on instance 1
*** CLIENT DRIVER:() 2015-10-13T16:47:59.541565+17:00 Hang Resolution Reason: Automatic hang resolution was performed to free a
significant number of affected sessions.
by terminating session sid:40 with serial # 43179 (ospid:13031)
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 124
Deploys with Minimum
Footprint and Maximum
Manageability
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 125
Oracle 12c Domain Services Cluster (DSC)
Deploys with Minimum Footprint and Maximum Manageability
ORACLE CLUSTER DOMAIN
Application Database
• Hosts Framework as Services Member
Cluster
Member
Cluster
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 126
Oracle Cluster Domain
Database Application Database Database
Member Cluster Member Cluster Member Cluster Member Cluster
Shared ASM
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 127
Oracle 12c Domain Services Cluster (DSC)
Deploys with Minimum Footprint and Maximum Manageability
ORACLE CLUSTER DOMAIN
Application Database
• Hosts Framework as Services Member
Cluster
Member
Cluster
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Restricted 128
Compare Database Status Before & After Upgrade
• Download dbupgdiag.sql from doc 556610.1
• Run both before and after the upgrade:
cd <location of the script>
$ sqlplus / as sysdba
sql> @dbupgdiag.sql
sql> exit
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 129