Oracle & MySQL DBA Handbook – Overview, SQL Health‑Check Guide, and Giveaway Details
This article introduces the 'DBA攻坚指南' book, detailing its Oracle and MySQL performance‑tuning content, author credentials, key chapters, SQL health‑check scripts, usage examples, and the accompanying giveaway event organized by the 爱可生开源社区.
The post announces the monthly book giveaway "DBA攻坚指南" (DBA Attack Guide), sponsored by 华章科技 and the 爱可生开源社区, and presents the featured book for the month.
华章科技, founded in 1995, is a leading IT publishing brand in China, offering more than 30 classic series covering computer science, data engineering, robotics, IoT, Java, intelligent systems, mathematics, and cybersecurity.
The book is authored by Oracle OCM and MySQL certification experts (叶桦, 徐浩, 张梦颖, 应以峰) and combines two major parts: the Oracle section covering daily operations, environment setup, stress testing, fault handling, migration, upgrade, and SQL optimization; and the MySQL section covering installation, backup/recovery, migration, architecture design, monitoring, and performance tuning.
Authors bring over a decade of DBA experience across telecom, finance, government, and manufacturing, with deep knowledge of Oracle and MySQL internals, shell and Python automation, and cloud database services.
Key reasons to read the book include practical guidance on locating problematic SQL, understanding factors that affect SQL execution (statistics, optimizer parameters, migration effects, data volume changes), and addressing issues such as cursor sharing and resource contention.
The guide explains how to use Oracle's AWR snapshots to identify high‑resource SQL, and introduces the SQL Tuning Health‑Check (SQLHC) script, which collects comprehensive diagnostic data without modifying the database.
Example commands for locating problematic SQL:
SQL> select p.inst_id,
p.spid,
a.sid,
a.serial#,
a.sql_id,
a.event,
a.status,
a.program,
a.machine
from gv$session a, gv$process p
where a.inst_id = p.inst_id
and a.paddr = p.addr
and p.spid =15883;Another example to find sessions waiting on a specific event:
SQL> select a.inst_id,
a.process,
a.sid,
a.serial#,
a.sql_id,
a.event,
a.status,
a.program,
a.machine
from gv$session a
where event = 'db file scattered read';To run SQLHC, download the zip package from Oracle MOS, unzip it, and execute the script with the appropriate parameters (license type T/D/N and the target SQL_ID):
shell> unzip sqlhc.zip
Archive: sqlhc.zip
creating: sqlhc/
inflating: sqlhc/sqlhc.sql
inflating: sqlhc/sqldx.sql
inflating: sqlhc/sqlhcxec.sql
shell> cd sqlhc
shell> ls -tlr
total 2
-rw-r--r-- 1 mfggprd dba 48747 Nov 11 2013 sqldx.sql
-rw-r--r-- 1 mfggprd dba 288298 Apr 16 2014 sqlhc.sql
-rw-r--r-- 1 mfggprd dba 292838 Apr 16 2014 sqlhcxec.sql
shell> sqlplus / as sysdba
SQL> @sqlhc.sql T d18wwg2f3txc0The script generates a zip file containing health_check, diagnostics, execution plan, sql_detail, 10053 trace, sqldx, and optional SQL monitor reports, providing a complete view of the SQL's performance characteristics.
The giveaway runs from now until July 30, 2021 16:00. Participants must follow the 爱可生开源社区 public account, scan the QR code, and can increase winning chances by inviting friends. Winners are announced automatically, must submit shipping information within three days, and the prize consists of three copies of the book.
For those who do not win, the book can be purchased directly via the provided links.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.