Purpose
Extracts random AMP samples from a target system and writes the samples to SystemFE.Opt_RAS_Table on that system.
For more information about random AMP samples, see:
- “DIAGNOSTIC HELP SAMPLES”
- “DIAGNOSTIC SET SAMPLES”
- SQL Request and Transaction Processing
Required Privileges
You must have INSERT privileges on SystemFE.Opt_RAS_Table to dump random AMP samples.
Syntax
Syntax Elements
- target_system_name
- Name used to designate the target (production) system from which random AMP sample information is to be estimated. For information on object naming, see SQL Fundamentals .
- database_name
- Name of the database in which table_name is defined.
- table_name
- Name of the table for which random AMP sample statistics emulation is to be performed.
ANSI Compliance
DIAGNOSTIC DUMP SAMPLES is a Teradata extension to the ANSI SQL:2011 standard.
DIAGNOSTIC DUMP SAMPLES and Target Level Emulation
DIAGNOSTIC DUMP SAMPLES does not require Target Level Emulation to be enabled in order to extract target system random AMP samples.
Session Mode Restrictions
You cannot perform DIAGNOSTIC DUMP SAMPLES in ANSI session mode or within explicit transaction boundaries in Teradata session mode.
Example: Extract Random AMP Samples
Dump the random AMP statistical samples on the current system for the payroll table in the employee database to SystemFE.Opt_RAS_Table. In this example, production_1 is the current system.
DIAGNOSTIC DUMP SAMPLES Production_1 TABLE Employee.Payroll;