Essential (free) Tools for DBA! Biju Thomas Principal Solutions Architect OneNeck IT Solutions www.oneneck.com @biju_thomas
2 About me! Biju Thomas Principal Solutions Architect with OneNeck IT Solutions Over 20 years of Oracle Database development and administration expertise Over 10 years of Oracle E-Business Suite Architecture & Tuning expertise First book published in September 2000, seventh in 2015 DBA blog since 1997 www.bijoos.com Oracle ACE Director
3 OneNeck IT Solutions at a Glance Backed by Fortune 500 strength of Telephone and Data Systems Hybrid IT 550+ employees Coast to Coast Data Centers
Agenda Oracle Support (MOS) Tools ORAchk DBSAT OSWatcher Trace File Analyzer (TFA) Framework Trace Analyzer (trca) SQLTXPLAIN (SQLT) Other Tools EBD360 SQLD360 SLOB Oracle Products SQL Developer SQLcl 4
ORAchk 5
ORAchk ORAchk - Health Checks for the Oracle Stack (Doc ID 1268927.2) 6
Oracle Stack Covered by ORAchk 7
< Report Demo > 8
DBSAT 9
DBSAT Oracle Database Security Assessment Tool (DBSAT) (Doc ID 2138254.1) A command line tool focused on detecting areas of potential security vulnerabilities or misconfigurations and providing recommendations on how to mitigate those potential vulnerabilities. Database, OS and Listener Collector & Reporter $./dbsat collect -n "/ as sysdba"./prd_collect $./dbsat report./prd_collect 10
< Report Demo > 11
OSWatcher 12
OSWatcher OSWatcher (Doc ID 301137.1) OSWatcher Analyzer User Guide (Doc ID 461053.1) OSWatcher captures performance metrics from the operating system. oswbb: a unix shell script data collector which collects and stores the data oswbba: a java utility which will analyze the data automatically and provide advice and produce graphs and an html document TFA will install and run OSWatcher automatically. It will also update OSWatcher on a regular basis. 13
OSWatcher - Metrics System Slowdown Summary CPU Run Queue Utilization Root Process > 50% Oracle Background Process > 50% CPU Percent System Memory Utilization Process Swap Queue Memory Scan Rate Disk Device Percent Busy > 50% Device Service Times Device Throughput Enter 1 to Display CPU Process Queue Graphs Enter 2 to Display CPU Utilization Graphs Enter 3 to Display CPU Other Graphs Enter 4 to Display Memory Graphs Enter 5 to Display Disk IO Graphs Enter 6 to Generate All CPU Gif Files Enter 7 to Generate All Memory Gif Files Enter 8 to Generate All Disk Gif Files Enter L to Specify Alternate Location of Gif Directory Enter T to Alter Graph Time Scale Only (Does not change analysis dataset) Enter D to Return to Default Graph Time Scale Enter R to Remove Currently Displayed Graphs Enter A to Analyze Data Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale) Enter P to Generate A Profile Enter X to Export Parsed Data to File Enter Q to Quit Program Please Select an Option: 14
< Report Demo > 15
Trace File Analyzer (TFA) 16
Trace File Analyzer TFA Collector - TFA with Database Support Tools Bundle (Doc ID 1513912.1) The Support Bundle Every DBA Needs Provides one interface for all diagnostic needs Collects data across the cluster and consolidates it in one place Collects all relevant diagnostic data at the time of the problem All the database tools you need in one bundle 17
Trace Analyzer 18
TRCANLZR (TRCA) TRCANLZR (TRCA): SQL_TRACE/Event 10046 Trace File Analyzer - Tool for Interpreting Raw SQL Traces (Doc ID 224270.1) TRCA inputs one or several SQL trace(s) generated by Event 10046 and outputs a diagnostics report in two formats (html and text). TRCA identifies expensive SQL out of the provided trace(s), then it connects to the database and collects their explain plans, Cost-based Optimizer CBO statistics, metadata, configuration parameters, and similar elements that influence the performance of the process being analyzed. Unix, Linux and Windows platforms Unwrapped source (SQL and PL/SQL) Installs under its own schemas (self-contained) Small footprint (space and CPU) Not intrusive (does not expose application data) Provides more information than TKPROF 19
< Report Demo > 20
SQLTXPLAIN 21
SQLTXPLAIN (SQLT) All About the SQLT Diagnostic Tool (Doc ID 215187.1) SQLT inputs one SQL statement and outputs a set of diagnostics files. These files are commonly used to diagnose SQL statements performing poorly. SQLT connects to the database and collects execution plans, Cost-based Optimizer CBO statistics, schema objects metadata, performance statistics, configuration parameters, and similar elements that influence the performance of the SQL being analyzed. 22
< Report Demo > 23
EDB360 24
EDB360 https://carlos-sierra.net/2014/07/27/edb360/ EDB360 is a free tool that executes on an Oracle database and produces a compressed file which includes a large set of small Reports. This set of Reports provides a 360-degree view of an Oracle Database. EDB360 use cases: Keystone of an Oracle database Health-Check. Kick-off for an Oracle database Performance Evaluation. High-level view of System Resources demand and utilization for an Oracle database Sizing and Provisioning project. Information comes from Oracle s Automatic Workload Repository (AWR), and AWR is licensed by Oracle under the Diagnostics Pack. 25
< Report Demo > 26
SQLD360 27
SQLD360 https://mauro-pagano.com/2015/02/16/sqld360-sql-diagnostics-collection-made-faster/ SQLd360 is a free tool that provides a 360-degree overview around a SQL statement. The output is a single zip file that allows offline analysis, trend analysis and detailed rootcause investigations. The content of the zip is a set of small reports, each specific to an area of interest, easy to navigate through an index file. SQLd360 doesn t require any installation and can be executed by any user that has access to dictionary views. SQLd360 works successfully in 10g, 11g and 12c, specifically on Linux/Unix platforms. 28
< Report Demo > 29
SQL Developer 30
SQL Developer http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html 31
SQL Developer - Common DBA Tasks Administration Blocking sessions Add space or increase size of database Create tablespace Create and modify schema objects Change init parameter values Manage memory components Gather Statistics Reorganize tables, indexes Add control file, redo log file User & password management Roles, Auditing Jobs & Scheduling Troubleshooting Find session Trace session Review alert log Recompile invalid objects Hung / slow database Performance Tuning Overall health of database Run AWR / ASH / Statspack report Find top SQL Tune SQL Explain Plan, Tuning Advisor Real-time SQL Monitoring Measure redo, undo Measure I/O, memory usage 32 32
SQL Developer - Common DBA Tasks Information Gathering Database health dashboard Space usage and growth Database wait events Users connected, activity Find amount of I/O operations Find amount of memory operations Monitor parameter settings against maximums Monitor redo, undo Manage Pluggable Databases Backup and Recovery Backup database Restore / Recover database, tablespace, schema, object Backup Status Reports Refresh table, schema, database Block corruption Flashback database, table Security Create and manage database users, roles Password management 33 33
SQLcl 34
SQLcl http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html 35
SQLcl 36 36
What s Different? Better than SQL*Plus, friendly formatted output. No SQLNET client required Java required Connect using EZ Connect User@//server:port/service TNS, LDAP, Native SSH tunnel connections supported Reuse commands and scripts using ALIAS CTAS command CTAS source_table destination_table DDL generated in buffer. Optionally edit buffer before execute. Easily generate DDL statement using DDL command. Uses DBMS_METADATA Various formatting options SET SQLFORMAT Html, xml, json, csv, insert, loader, ansiconsole and default SQL History using up/down keys Edit buffer ^R to run statement History usage History time Object metadata details and dependencies using INFOrmation command Info Info+ Change directory using cd 37 37
SLOB 38
SLOB https://kevinclosson.net/slob/ Oracle SLOB: The Silly Little Oracle Benchmark It s a complete toolkit for generating I/O through an Oracle database. If you are trying to analyze the I/O capabilities of your Oracle database there simply isn t a better tool out there. (From https://flashdba.com/slob/) 39
Essential (free) Tools for Apps DBA @ 8:30 AM
Thank you! Daily #oratidbit on Facebook and Twitter. Follow me! Tweets: @biju_thomas Facebook: facebook.com/oraclenotes Google+: +bijoosoraclenotes Blog: bijoos.com/oraclenotes Please complete session evaluation! 41