
This is the introduction to the course, answering the obvious question : "Why you might need old dba scripts with OEM, AWR reports, ADDM, Chat GPT available for Performance Analysis and Tuning.
Learn practical Oracle performance tuning via a library of 70+ scripts, including health checks, wait events analysis, and FindSQL history to optimize SQL and storage.
Master performance troubleshooting by gathering user details and using Oracle Enterprise Manager, Performance Hub, Ash Analytics, and Grafana to identify degraded SQL and plan hash value changes.
Oracle database/instance architecture
Discussing CBO, Explain plan, Indexes, Partitioning, Tracing, Logon triggers
Explore a Unix/Linux health check script for Oracle environments that reports IPs, VIPs, and 70 checks across clusterware, databases, and services with color-coded outputs.
Analyze DBA registry health and interpret wait events using a color-coded Vue DBA registry, with vault considerations, to identify top SQL causes and row-level locking through 24-hour and per-container reports.
Analyze space usage in PDB and CDB files, autoextend, and redo size history. Assess ASM space with V$ASM, 90% and 85% thresholds, DBHIST changes, backups, and blocking insights.
The Services report, including roles, statuses, preferred nodes
The services report : the roles, statuses, preferred nodes and nodes where the services are running.
Monitor ip, vip, and scan ip with serverctl; collect service and node data, color-code matches as golden yellow or red, and extract oracle errors from alert logs.
The health check script which can be executed on Linux/Unix. Test it in your environment, set script_loc in the top of the script for your script location. Make sure you created .g.sh script as well at the same location.
Analyze wait events with scripts to identify bottlenecks; collect per-minute wait statistics from active session history and GV$ views, and generate Excel charts to visualize performance for pluggable databases.
Build and graph wait events data from production databases, using Excel data prep, text to column, and x/y scatter charts to visualize CPU, IEO, and scheduler weights spikes.
Identify performance degradation by querying view db.hist active session history. Configure prompts and parameters, including sqlid, plan hash, operation, seed, or serial, and set sql prompt to avoid wrong-database execution.
Use the findSql script to analyze past SQL IDs, bind values, and session activity, and use temp usage history scripts to identify temp space culprits and optimization opportunities.
Analyze wait history with the WaitHistSql script from DbHist to display past wait events for a specific interval, showing waiting time, owner, and object, aiding locking and blocking investigation.
Identify the top n sql consumers by elapsed time and cpu through an aggregation of sqlid, instance, and plan hash.
Set bind variable values for top N SQL scripts in SQL Developer, examine execution metrics like time per execution, total time, buffer gets, and use history to identify degrading queries.
Analyze the history of SQL executions to diagnose performance changes by comparing plan hash values, bind variables, and statistics, and identify missing indexes or stale data.
Analyze a history of SQL executions to identify degradation in Oracle performance from fragmentation, changes, or CPU bottlenecks, and learn to use segment advisor, space usage scripts, and index reorganization.
Apply Carlos Sierra SQLT scripts to create and import COEXFR SQL profiles, use hints and outline data to fix performance and deploy good execution plans across similar databases.
Analyze the runtime explain plan with actual execution statistics to identify bottlenecks. Apply hints and gather plan statistics, set statistics level all, assess time, starts, and buffers to guide tuning.
Analyze and address fragmented tables and indexes using segment advisor by creating and running a DBMS advisor task, reviewing findings, and applying a shrink script to rebuild indexes.
Import sql profiles to a migrated Oracle server to fix performance; monitor stale statistics and consider DBA tab stats history to restore table stats with dbms_stats.
Learn how table partitioning enhances performance via partition pruning, partition-wise loading, and parallel processing. Compare methods like dbms redefinition and golden gate replication, and review index and partition maintenance considerations.
Learn to use the SQL Tuning Advisor to create SQL profiles and plan baselines, tune with indexes and Gaza statistics, apply hints, and address snapshot too old.
Analyze large materialized view log issues and missed refreshes using slog, snap, and mlog insights for fast refresh. Learn to diagnose logon storm spikes with historical metrics and quick mitigations.
Explore selectivity, cardinality, and clustering to optimize sql with manual tuning and index strategies. Learn how bind variables enable soft parsing, reuse execution plans, and improve security.
Explore cluster-related waits and global cache delays, diagnose with a health check script and dbhist parameter history. Troubleshoot sequence mismatches to fix nodes and parameters across the cluster.
Discover a suite of additional Oracle performance scripts, covering active sessions, space usage, index and constraint information, SQL profiles, tracing, AWR, and more to optimize tuning.
Present a collection of Oracle performance scripts, including top-end SQL and history of SQL, with guidance to run in production and build performance analyses.
•The scripts, you are going to download, test and use are result of my over 24 years career as Oracle dba. The scripts which helped me to resolved thousands of performance issues.
•From my experience OEM, STA, AI are a great help in performance analysis and tuning, but you still need good old scripts. In very complex performance problem, STA usually is useless. The same true about ChatGPT.
•You need the scripts to quickly check the services status, the roles and the nodes (preferred and where the services are running) in RAC environment which is a standard nowadays) .
•You need the script to find mismatched sequences and identity columns and quickly fix them.
•You should know how to produce explain plan with a run time statistics and how to find bind variable values in the past executions.
•You should know how to get quickly the parameters changing history and the wait events history.
•In this course you will download the health check shell script to run over 70 individual health checks quickly ( up to 2 minutes).
•The top wait events script will let you create the performance graphs to identify critical spikes, based on various wait classes.
•The Find Sql script helps you to find the problem SQL in the past or all the history of specific session. The Temp Usage history and PGA Usage History could be very useful to the SQL statements responsible for ORA-1652 and ORA-4036 in the past.
•Top N SQL script will help you to find the top SQL in the past by elapsed time or buffer gets value or number of executions.
•The History of SQL executions could be very helpful in your performance analysis. The root cause analysis can start here with analyzing the dynamics of SQL statistics: PHV, elapsed time, buffer gets, rows returned, total waits etc.
•The other scripts will help you in special situations, such as there is no recommendations from STA and you need to get the run time statistics in explain plan, you need to import sql profile from another database with optimal performance, to get the bind variables values history, to identify the stale or locked statistics, to identify fragmented table or index storage, to deal with ORA-1555, to get parameters change history, to fix the sequences mismatch, to apply Sql Patch and sql profile ( including custom by Carlos Sierra), to deal with logon storm, with excessive cluster related waits and more.