English edition Lab setup
Lab setupOracle 26ai SQL Tuning
The SQL scripts for the hands-on labs in the book — 13 files, one per chapter, so you can keep the book open beside the terminal and run along.
Download the scripts
One .zip file. No sign-up, no account needed.
Before you run it
- Oracle Database 26ai or 23ai, with a PDB open
- SYSDBA rights
- Three values in the script have to match your machine. Each one is marked with the comment -- CHANGE THIS
The three values
| PDB name | the example uses prod |
| Datafile and tempfile paths | point them at real paths on your server |
| Password for user TUNE | your choice |
How to run it
cd /u03/LABS/tune_script
sqlplus / as sysdba @setup_lab.sql | tee setup_lab.logThe script sets WHENEVER SQLERROR EXIT, so if anything goes wrong it stops right there instead of leaving you a half-built schema to puzzle over later. You can run it again — the head of the script drops the old objects first.
What the script creates
| TUNE.PRODUCTS | 5,000 rows |
| TUNE.CUSTOMERS | 200,000 rows |
| TUNE.SALES | about 5,000,000 rows |
Plenty of corporate firewalls block github.com. If the download above does not work from your office, fetch it from a machine outside the network and copy it across, or email me and I will send the .zip to you.
Something not working
If a script fails, or you found a mistake in the book, email me at pornchai.krong@gmail.com. Corrections are collected on the English edition page.