1102 V 2 RR
1102 V 2 RR
1102 V 2 RR
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, Active Enterprise Intelligence, Applications Within, Aprimo, Aprimo Marketing Studio, Aster, BYNET, Claraview, DecisionCast,
Gridscale, Managing the Business of Marketing, MyCommerce, Raising Intelligence, Smarter. Faster. Wins., SQL-MapReduce, Teradata Decision
Experts, Teradata Labs Logo, Teradata Raising Intelligence Logo, Teradata Source Experts, WebAnalyst, and Xkoto are trademarks or registered
trademarks of Teradata Corporation or its affiliates in the United States and other countries.
Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
GoldenGate is a trademark of Oracle.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
IBM, CICS, RACF, Tivoli, and z/OS are registered trademarks of International Business Machines Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI is a registered trademark of LSI Corporation.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United
States and other countries.
NetVault is a trademark or registered trademark of Quest Software, Inc. in the United States and/or other countries.
Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.
Oracle, Java, and Solaris are registered trademarks of Oracle and/or its affiliates.
QLogic and SANbox are trademarks or registered trademarks of QLogic Corporation.
SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.
SPARC is a registered trademark of SPARC International, Inc.
Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States
and other countries.
Unicode is a registered trademark of Unicode, Inc. in the United States and other countries.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN AS-IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION
MAY NOT APPLY TO YOU. IN NO EVENT WILL TERADATA CORPORATION BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
The information contained in this document may contain references or cross-references to features, functions, products, or services that are
not announced or available in your country. Such references do not imply that Teradata Corporation intends to announce such features,
functions, products, or services in your country. Please consult your local Teradata Corporation representative for those features, functions,
products, or services available in your country.
Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated
without notice. Teradata Corporation may also make improvements or changes in the products or services described in this information at any
time without notice.
To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this
document. Please email: [email protected].
Any comments or materials (collectively referred to as Feedback) sent to Teradata Corporation will be deemed non-confidential. Teradata
Corporation will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform,
create derivative works of, and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, Teradata
Corporation will be free to use any ideas, concepts, know-how, or techniques contained in such Feedback for any purpose whatsoever, including
developing, manufacturing, or marketing products or services incorporating Feedback.
Copyright 2000 2012 by Teradata Corporation. All Rights Reserved.
Preface
Purpose
This book, Utilities, describes the utility programs that support Teradata Database and
consists of two manuals:
Topics covered in this volume include utilities whose names begin with letters L through Z.
Use this book in conjunction with the other volume.
Chapter names reflect the utility common name followed by the name of the executable utility
program enclosed in parentheses, for example, Control GDO Editor (ctl). Use the executable
program name to start the utility from the command line or Database Window.
A third manual, Support Utilities, describes utilities most often used to support Teradata
Database. These utilities are used primarily by Teradata Support and field engineers, and
should be used only under the direction of Teradata Support personnel.
Audience
The utilities described in this book are used primarily by Teradata Support Center field
engineers, Teradata Database developers, System Test and Verification, and Teradata Database
system administrators. For example, these utilities are used to display control parameters,
display DBS control record fields, find and correct problems within the file system, initialize
the Teradata Database, rebuild tables in the database, and manage the virtual processors
(vprocs). These utilities are used to abort transactions and processes; monitor system
performance, resources, and status, perform internal system checking, and perform system
configuration, initialization, recovery, and tuning.
Users should also be familiar with the Teradata Database console running the Database
Window (DBW) and your client (host) system.
For experienced utilities users please see the simplified command descriptions in the Utilities
Quick Reference. This book provides the syntax diagrams and a brief description of the syntax
variables for each Teradata Database utility.
Utilities
Preface
Supported Software Releases and Operating Systems
SLES 11
Note that SLES 11 will be supported after the initial release of Teradata Database 14.0.
Teradata Database client applications support other operating systems.
Prerequisites
You should be familiar with using the Database Window (DBW) to run the other utilities.
The following manuals contain related material:
Database Administration
Security Administration
SystemFE Macros
For detailed information about the Archive and Recovery, FastExport, FastLoad, MultiLoad,
and Teradata Parallel Data Pump utilities, see the following client utilities books:
Release
Utility
Description
Appendix A
Vproc Manager
Utilities
Preface
Changes to This Book
Release
Utility
Description
Lock Logger
(dumplocklog)
Priority Scheduler
Utilities
Reonfiguration
Reconfiguration
Estimator
Table Rebuild
Teradata Locale
Definition Utility
(tdlocaledef)
Teradata Network
Statistics (tdnstat)
Teradata Network
Tuner (tdntune)
TPA Reset
(tpareset)
Added -stop (-s) option, that keeps initiating node down when system
resets.
Update Space
Vproc Manager
Preface
Additional Information
Additional Information
URL
Description
www.info.teradata.com/
Search.
Order printed manuals:
Under Print & CD Publications, select How to Order.
www.teradata.com
www.teradata.com/t/TEN/
www.teradataatyourservice.com
developer.teradata.com/
To maintain the quality of our products and services, we would like your comments on the
accuracy, clarity, organization, and value of this document. Please email [email protected].
Utilities
Preface
Teradata Database Optional Features
Teradata Columnar
You may not use these features without the appropriate licenses. The fact that these features
may be included in product media or downloads, or described in documentation that you
receive, does not authorize you to use them without the appropriate licenses.
Contact your Teradata sales representative to purchase and enable optional features.
Utilities
Preface
Teradata Database Optional Features
Utilities
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Supported Software Releases and Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Changes to This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Teradata Database Optional Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Utilities
Table of Contents
Utilities
Table of Contents
schmon -c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
schmon -d. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
schmon -f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
schmon -h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
schmon -l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
schmon -m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
schmon -M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
schmon -p. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
schmon -s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
schmon -t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
schmon -w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Utilities
11
Table of Contents
12
Utilities
Table of Contents
Utilities
13
Table of Contents
14
Utilities
Table of Contents
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Utilities
15
Table of Contents
16
Utilities
CHAPTER 17
This chapter lists the Teradata Database utilities that are documented in Utilities: Volume 1 (AK), Utilities: Volume 2 (L-Z), and Support Utilities.
Purpose
Abort Host
(aborthost)
AMP Load
(ampload)
Displays the load on all AMP vprocs in a system, including the number of
AMP worker tasks (AWTs) available to each AMP vproc, and the number of
messages waiting (message queue length) on each AMP vproc.
AWT Monitor
(awtmon)
CheckTable
(checktable)
CNS Run
(cnsrun)
Configuration Utility
(config)
Defines AMPs, PEs, and hosts, and describes their interrelationships for
Teradata Database.
Note: Configuration is documented in Support Utilities.
Utilities
Displays the fields of the PDE Control Parameters GDO, and allows
modification of the settings.
Cufconfig Utility
(cufconfig)
Database
Initialization
Program
(DIP)
Executes one or more of the standard DIP scripts packaged with Teradata
Database. These scripts create a variety of database objects that can extend
the functionality of Teradata Database with additional, optional features.
DBS Control
(dbscontrol)
Displays the DBS Control Record fields, and allows these settings to be
modified.
Dump Unload/Load
(DUL, DULTAPE)
Saves system dump tables to tape, and restores system dump tables from
tape.
17
Utility
Purpose
Ferret Utility
(ferret)
Filer Utility
(filer)
Gateway Control
(gtwcontrol)
Gateway Global
(gtwglobal)
Lock Display
(lokdisp)
Lock Logger
(dumplocklog)
Priority Scheduler
(schmon)
(SLES 10 only)
Query Configuration
(qryconfig)
Query Session
(qrysessn)
Reconfiguration
Utility
(reconfig)
Reconfiguration
Estimator
(reconfig_estimator)
Estimates the elapsed time for reconfiguration based upon the number and
size of tables on the current system, and provides time estimates for the
following phases:
Redistribution
Deletion
NUSI building
Note: Reconfiguration Estimator is documented in Support Utilities.
Recovery Manager
(rcvmanager)
18
Utilities
Utility
Purpose
Resource Check
Tools
(dbschk, nodecheck,
syscheck)
Identifies slow down and potential hangs of Teradata Database, and displays
system statistics that help identify the cause of the problem.
Show Locks
(showlocks)
System Initializer
(sysinit)
Utilities
Table Rebuild
(rebuild)
Teradata Locale
Definition Utility
(tdlocaledef)
Teradata Network
Statistics
(tdnstat)
Teradata Network
Tuner
(tdntune)
Tpareset
(tpareset)
Two-Phase Commit
Console
(tpccons)
Task List
(tsklist)
Update DBC
(updatedbc)
Recalculates the PermSpace and SpoolSpace values in the DBASE table for
the user DBC, and the MaxPermSpace and MaxSpoolSpace values of the
DATABASESPACE table for all databases based on the values in the DBASE
table.
Update Space
(updatespace)
19
Utility
Purpose
Verify _pdisks
(verify_pdisks)
Verifies that the pdisks on Teradata Database are accessible and are mapped
correctly.
Vproc Manager
(vprocmanager)
20
See...
Security Administration
Utilities
CHAPTER 18
The Lock Display utility, lokdisp, provides a snapshot capture of all real-time database locks.
The database software uses locks for concurrency control. lokdisp displays locks used for
concurrency. A lock can be applied to a database object based on the following lock
granularity:
Database
Table
Rowhash Range
Rowhash
Optionally, you can specify the lock to be applied to a database object using the SQL Locking
Modifier.
lokdisp can obtain lock information from the following:
A specific AMP
A group of AMPs
All AMPs
Note: For a Teradata Database system with many AMPs and a heavy load, be careful when
selecting the number of AMPs from which to obtain information. The fewer the AMPs
selected, the lower the volume of lock information generated, and the more manageable the
output. Teradata recommends obtaining information from all AMPs only when the lock
information for a specific transaction is needed.
For detailed examples of returned data, see DB on page 27 and TABLE on page 37.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Utilities
21
Lock Modes
You can specify the following lock modes to a database object:
Access
Read
Write
Exclusive
Lock-Mode Contention
The lock-mode contention among all outstanding lock requests determines which lock
requests can be applied concurrently against a database object. This is illustrated by the
contention matrix shown below.
Lock Mode
Implicit
Access
Implicit
Read
Implicit
Write
Implicit
Exclusive
Access
Read
Write
Implicit Access
Implicit Read
Implicit Write
Implicit Exclusive
Access
Read
Write
Exclusive
Exclusive
22
Utilities
The success of acquiring all locks implied by the lock granularity of the request
lokdisp output shows separate sections for Granted and Blocked lock requests. In the case of a
blocked request, the level of the database object is shown by marking the associated field in the
output with the hash symbol (#). For example, if the blocked request involves a table, then the
table field is marked with the # symbol.
Description
BLOCKERS
DB
HELP
QUIT
Exits lokdisp.
ROWHASH
ROWRANGE
TABLE
TRAN
Utilities
23
BLOCKERS
Purpose
The BLOCKERS command identifies blocked transactions and the transactions that are
blocking them.
Syntax
BLOCKERS
TRAN
ProcId
ALL
Uniq1
Uniq2
LIMIT
NUMBER
NONE
KY01A098
Syntax element...
Specifies...
ProcId
the virtual processor number of the parsing engine processor handling the
transaction.
Since virtual processor numbers are designated as integer numbers, the
corresponding value for this option normally is specified in decimal notation.
This number is the first component of a transaction ID.
Uniq1
Uniq2
ALL
that all blocked transactions and their corresponding blocker transactions will
be considered.
ALL is the default if you do not specify a transaction ID.
LIMIT
NUMBER
NONE
24
Utilities
Usage Notes
A transaction is an internal database concept. A transaction can have more than one blocking
transaction. For example, a transaction can have five lock requests, and five transactions can
block those same lock requests. In other words, if you have five tables, then conceivably, five
other transactions can have the locks on those same five tables.
The following table shows the components of BLOCKERS command output.
Component....
Includes the...
Number of Blocked
Trans displayed
Blocked Trans
Blocker Trans
Utilities
Database ID
Database Name
Table ID
Table Name
RowHashS
RowHashE
25
Note: If the lock objectType is Rowhash, only RowHashS is displayed; if the Lock objectType
is RowRange, both RowHashS and RowHashE is displayed. RowHashS and RowHashE are the
lower- and upper-bound levels of the RowHash range, respectively.
Example
The following example shows one lock entry on AMP 0:
> blockers LIMIT 1
blockers LIMIT 1
- The following amps are available:
0
1
2
Which amp(s) do you want to request on
(S=Sampline/A=all/C=cancel/Q=quit):
> 0
0
---------------- AMP 0 REPORTS A LOCK ENTRIES ---------------Number of Blocked Trans displayed :
1
=========================================
Blocked Trans 16383 00001354
Number of blockers displays :
1
Number of blockers exists
:
1
Blocker Trans : 16383 00001324
lock mode
: Exclusive
lock status
: Granted
lock objectType : Table
lock objectID
: DBID
: 00000428
: DBNAME
: STAFF
: TableID
: 00000519,0000
: TableName : EMPLOYEE
: RowHashS
: 00000000
: RowHashE
: 00000000
26
Utilities
DB
Purpose
The DB command identifies the databases that have a database-level lock request.
Syntax
DB
D
DBname
ALL
KY01A096
Syntax element...
Specifies...
DBname
ALL
Usage Notes
The following table shows the components of DB command output.
Component...
Specifies...
Tran
Host
Session
Mode
Utilities
Access
Read
Write
Exclusive
User
Database
27
Example 1
The following example shows locks on a sampling on all AMPs for the RECBDQTAC
database:
>lokdisp
Amp Utility
_______
|
|
___
|
/
|
--|
\___
__
|/
|
|
____
____|
/
|
\____|
|
|
____|
/
|
\____|
____
____|
/
|
\____|
|
__|__
|
|
|__
____
____|
/
|
\____|
User: DBC
28
User: DBC
Utilities
Example 2
The following example tries to display database-level locks while trying to create database
USER1. The first lock is an Intentional Write Lock on database DBC (user DBC), and the
second lock is an Intentional Exclusive Lock on database USER1 (user DBC).
LOKDISP >>
DB ALL
- The following amps are available:
0
-> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit):
A
---------------- AMP 0 REPORTS 2 LOCK ENTRIES -------------
User: ??????????????????????????????
Database: ??????????????????????????????
Host:
7169 Session:
User: ??????????????????????????????
Database: ??????????????????????????????
Utilities
29
HELP
Purpose
The HELP command provides general help for Lock Display.
Syntax
HELP
H
KY01A097
Syntax element...
Specifies...
Help, H, or ?
Example
The following example shows basic Lock Display Help:
-> Please enter your selection from the list:
HELP
LOCK DISPLAY UTILITY
An optional command string may be used to limit the display to specific
requests; otherwise, all requests are displayed except for BLOCKERS.
Commands are case-insensitive and may be abbreviated. The default radix
for numeric entries is hex, but may be forced to decimal by terminating
with a period. For example, ten decimal must be entered as "10.", since
an unmodified "10" is interpreted in hex as 0x10 or sixteen decimal.
For the TRAN command, a set of lines displayed represents one lock
request.
Only object names relevant to a given lock request are displayed: for
example, only database name is displayed for a database lock, whereas
both database name and table name are displayed for a table lock. A "#"
after an object name means the lock has not yet been granted for that
level. For example, "Databasename Tablename# Rowhash1#" means the lock
has been granted at database level, but not yet at table or rowhash
level.
--more-- Please press <enter> to continue.
30
Utilities
QUIT
Purpose
The QUIT command exits lokdisp.
Syntax
QUIT
Q
1102A216
Utilities
Syntax element...
Specifies...
QUIT or Q
31
ROWHASH
Purpose
The ROWHASH command identifies a rowhash-level lock request.
Syntax
ROWHASH
ROWH
DBname .Tablename
TypeAndInde x
RowHash1
RowHash2
ALL
KY01A094
Syntax element...
Specifies...
DBname.Tablename
TypeAndIndex
a subtable identifier.
A table is composed logically of one or more subtables. TypeAndIndex
specifies one of these subtables. For example:
0 is the table header.
hex 400 (decimal 1024) is a primary subtable.
hex values 404, 408, and 40C (decimal values 1028, 1032, and 1036),
and other +4 incremental values, are secondary index subtables.
hex values 800, C00, and 1000 (decimal values 2048, 3072, and
4096), and other multiples of hex 400 (decimal 1024) are fallback
subtables.
RowHash1
RowHash2
ALL
that all tables that have a rowhash-level lock applied are considered.
ALL is the default if you do not specify an object name.
32
Utilities
Usage Notes
The following table shows the components of ROWHASH command output.
Component...
Specifies...
Tran
Host
Session
Mode
Access
Read
Write
Exclusive
User
Database
Table
Row Hash
Example
The following example shows locks on AMPs 0 and 2 on Database RECBDQTAC and Table
T1.
rowhash
- The following amps are available:
0
Utilities
0, 1000 Mode: WR
User: DBC
Table: T1
Subtable ID: 1536
33
34
0, 1000 Mode: WR
User: DBC
Table: T1
Subtable ID: 1024
0, 1000 Mode: WR
User: DBC
Table: T1
Subtable ID: 1536
Utilities
ROWRANGE
Purpose
The ROWRANGE command identifies a rowrange-level lock request.
Syntax
ROWRANGE
ROWR
DBname .Tablename
TypeAndInde x
ALL
KY01A095
Syntax element...
Specifies...
DBname.Tablename
TypeAndIndex
a subtable identifier.
A table is composed logically of one or more subtables. TypeAndIndex
specifies one of these subtables. For example:
0 is the table header.
hex 400 (decimal 1024) is a primary subtable.
hex values 404, 408, and 40C (decimal values 1028, 1032, and 1036),
and other +4 incremental values, are secondary index subtables.
hex values 800, C00, and 1000 (decimal values 2048, 3072, and
4096), and other multiples of hex 400 (decimal 1024) are fallback
subtables.
ALL
that all tables that have a rowrange-level lock request are considered.
ALL is the default if you do not specify the command parameters.
Usage Notes
The following table shows the components of ROWRANGE command output.
Utilities
Component...
Specifies...
Tran
Host
Session
35
Component...
Specifies...
Mode
Access
Read
Write
Exclusive
User
Database
Table
Row Range
Example
The following example shows locks on AMP 0 on Database STAFF and Table
MANAGEMENT.
> rowrange staff.management 0
rowrange staff.management 0
- The following amps are available:
0
36
0, 2053
Mode: Ac
User: TD
Table: MANAGEMENT
Subtable ID: 0
Row Hash2: 0,
2
Utilities
TABLE
Purpose
The TABLE command identifies a table-level lock request.
Syntax
TABLE
TA
DBname .Tablename
ALL
KY01A093
Syntax element...
Specifies...
DBname.Tablename
ALL
that all tables (from all databases) that have a table-level lock request
are considered.
ALL is the default if you do not specify an object name.
Usage Notes
The following table shows the components of TABLE command output.
Component...
Specifies...
Tran
Host
Session
Mode
User
Utilities
Access
Read
Write
Exclusive
37
Component...
Specifies...
Database
Table
Example 1
The following example shows the locks on AMP 0 on the database RECBDQTAC and table T1:
table
- The following amps are available:
0
User: DBC
Table: T1
Example 2
The following is an example of trying to display table-level locks on a table while trying to
create the table.
table all
- The following amps are available:
0
-> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit):
A
Host:
7169
Session:
Database: STAFF
0, 1441 Mode: EX
User: DBC
Table: ??????????????????????????????
38
Utilities
TRAN
Purpose
The TRAN command identifies currently running transactions with locks being applied.
Syntax
TRAN
TR
ProcId
ALL
Uniq1
Uniq2
KY01A092
Syntax element...
Specifies...
ProcId
Uniq1
Uniq2
ALL
Usage Notes
A transaction is an internal database concept. A transaction can have more than one blocking
transaction. For example, a transaction can have five lock requests, and five transactions can
block those same lock requests. In other words, if you have five tables, then conceivably, five
other transactions can have the locks on those same five tables.
Each logically grouped display represents one lock request. Only object names relevant to a
given lock request are displayed.
Utilities
39
For example, only the database name is displayed for a database lock, whereas both a database
name and a table name are displayed for a table lock.
The following table shows the components of TRAN command output.
Component...
Specifies...
Tran
Host
Session
Mode
Access
Read
Write
Exclusive
User
Database
Table
DUMMY LOCK
the specific row has lock applied on a distinct pseudo dictionary table when
applicable to facilitate concurrency control. The pseudo dictionary table
does not exist. The table ID is used as the value of the row hash.
Example 1
The following example shows the transactions on all AMPs, with AMP 0 having four lock
entries, and AMP1 having three lock entries.
-> Please enter your selection from the list: tr
- The following amps are available:
0
40
Utilities
0, 1001 Mode: Ac
User: DBC
Table: DBASE
0, 1001 Mode: Ac
User: DBC
Table: TVM
0, 1001 Mode: WR
User: DBC
Table: STORES
0, 1001 Mode: WR
User: DBC
Table: STORES
0, 1001 Mode: Ac
User: DBC
Table: DBASE
0, 1001 Mode: Ac
User: DBC
Table: TVM
0, 1001 Mode: WR
User: DBC
Table: STORES
Utilities
41
Example 2
This example shows a blocked row hash lock request. Note the hash mark (#) that appears
next to the blocked row hash, indicating that the lock was requested, but has not yet been
granted.
LOCK DISPLAY UTILITY Command String Syntax:
Help or ?
TRan
[ProcId Uniq1 Uniq2] | [ALL]
Db
[DBname] | [ALL]
TAble
[DBname.Tablename] | [ALL]
ROWRange [DBname.Tablename TypeAndIndex] | [ALL]
ROWHash [DBname.Tablename TypeAndIndex, RowHash1 RowHash2] | [ALL]
Blockers [TRAN [ProcId Uniq1 Uniq2] | [ALL]] | [LIMIT [Number] |
[NONE]]
Quit
-> Please enter your selection from the list: tr
- The following amps are available:
0
0,2013 Mode: EX
User: USER1
Table: TBL_1A
42
Utilities
CHAPTER 19
The Lock Logger utility, dumplocklog, creates a table of lock information extracted from
Teradata Database transaction logs. The data from this table can be used to analyze lock
contention issues between concurrent SQL statements.
When logging is enabled, Teradata Database logs the following:
Transaction identifiers
Session identifiers
Lock levels associated with executing SQL statements that have been delayed because of
database lock contention
Global deadlocks
Runs From
The Lock Logger utility runs from Database Window or comparable interface to the Teradata
Database console subsystem, such as cnsterm.
Type start dumplocklog to populate the lock log table with lock information.
To run the lock logger from scripts, such as for a scheduled cron job, use the CNS Run utility
to run dumplocklogb, the batch version of the program.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information about running utilities like dumplocklogb from
scripts, see the CNS Run chapter in Utilities - Volume 1.
Utilities
43
logger segments. For more information on the LockLogSegmentSize field and the DBS
Control Utility, see Utilities Volume 1.
When a transaction encounters a lock contention delay, the AMP writes an entry in the lock
log buffer that includes object identifiers containing the following information concerning the
delayed transaction:
The database and table identifiers of the table upon which the lock was requested
The host ID and session number of the transaction request that was locked
The host ID and session number of the transaction that imposed the lock
The lock level (database, table, row, or range of rows), and mode (read, write, exclusive), of
the lock request
The type of executing statement associated with the transaction (INSERT, UPDATE,
SELECT, and so forth)
Issuing the dumplocklog command causes the lock buffers to be dumped to a database table,
where the lock information can be further investigated. As an option, dumplocklog can run in
continuous mode, to provide an ongoing log of transaction locks encountered by each AMP.
Description
LockLogger
LockLogSegmentSize
44
Utilities
Description
Since Lock Logger uses standard Teradata SQL statements to create the lock
log table and insert the information from the lock log buffers, you must have
appropriate database access privileges.
If the table is new, you must have CREATE TABLE privileges.
If the table is existing, you must have table or database INSERT privileges.
Number of SQL
sessions
dumplocklog will
use to perform the
INSERT operation
The minimum is one session; the maximum is one session for each online
AMP.
The following restrictions affect the performance and ability of dumplocklog
to run.
If dumplocklog runs in continuous mode, there should be at least one or
more console sessions per PE. If the ratio of AMPs to PEs is at least three to
one, the utility should have no problem running. But if the ratio is six to
one or higher, dumplocklog cannot run in continuous mode.
If dumplocklog runs in snapshot mode, there must be one or more free
console session per PE (no matter what the ratio of AMPs to PEs) for
dumplocklog to run.
Note: The maximum number of sessions is limited by the number of PEs.
Utilities
Type of mode of
dumplocklog
Time constraints
that you want to
use for selecting
entries from the
lock log buffers
You can select lock log entries that were created for the following:
For detailed information on naming a table, see Basic SQL Syntax and
Lexicon in SQL Fundamentals.
45
Required
Information
Names of any
specific database
objects whose lock
log entries you
want to select.
Description
You can select the following objects:
A specific database and a specific table
A specific database and all of the tables
A specific table under the default database for your user name
You can select up to 10 objects. If you do not specify any objects, the default
specification selects all tables from all databases.
IF you answer...
continuous run mode whereby rows are added to your table as additional lock
log buffer entries are created. This continues until you terminate the utility, or
until the size of the table consumes all available Teradata Database system
storage.
If your username and password are validated, you go directly to Step 4.
If the username and password cannot be validated, the utility terminates at
this point.
single-snapshot mode whereby the utility creates or updates your lock log table
from a single copy of the lock log buffer for each Teradata Database system
AMP.
If you answer N, and specify the single-snapshot mode, the number of sessions
prompt appears.
46
Number of
concurrent sessions
Description
Minimum
Utilities
Number of
concurrent sessions
Description
Maximum
* (asterisk) - The default character set, which is usually ASCII for a network-attached
machine and EBCDIC for a channel-connected Teradata Database system.
? (question mark)- Lists the character sets installed on your Teradata Database system.
Note: Depending on the particular host connection of your machine, you might not be
able to use all of the following available character sets:
Code
127
ASCII
64
EBCDIC
65 - 126
User-defined
Enter the table name where the lock log entries will be written (?
for Help, Q/q to Quit):
Specify a new table or an existing table. You must have the appropriate database access
privileges.
Note: Table name entries on a Kanji machine must be in hex format, such as
'82eb82ae'XN, an even number of hex characters delimited by apostrophe characters
immediately followed by the letters XN.
Utilities
47
To specify a table...
Type...
Note: This is the first of two time constraint prompts that ask you to specify a time period
for selecting lock log entries.
To specify all entries that were created within a range of times, specify both an AT or
LATER and an AT or PRIOR time constraint.
To select all entries from the lock log buffers, regardless of time, type an asterisk (*).
YYYY=Year
1901 to 9999
MM = Month
01 to 12
DD = Day
01 to 31
HH = Hour
00 to 23
MM = Minute
00 to 59
SS = Second
00 to 59
Note: If you answered Y at Step 2 to specify the continuous run mode, skip to Step 8 and
specify the database object constraints for selecting lock log entries. If you entered N at
Step 2 to specify the single-snapshot mode, you are prompted to type the latest time of the
range of lock log entries that you want to select.
48
Utilities
If entries were created for a specified range of times, type the AT or PRIOR time of the
range using the same format as in Step 7.
9
You can specify up to 10 database objects for selecting lock log entries.
If you do not want to specify any database objects, type an asterisk (*) and skip to Step 11.
After you type the first object constraint, the utility prompts you to type another object.
To specify a...
Type...
The utility will redisplay the more? prompt until you have specified ten object constraints,
or until you press the carriage return key without specifying another object.
11 After you specify the database object constraints, the utility initiates the table CREATE and
Utilities
If you specified the single-snapshot mode in Step 2, or if you entered a prior-to time
constraint in Step 7, the utility stops when it completes the single-snapshot operation.
If you specified the continuous run mode in Step 1 with no prior-to time constraint in
Step 7, the utility runs continuously until you stop it by pressing the F2 function key, or
49
until the size of your table grows to consume all available Teradata Database system
storage.
12 The final display indicates the total number of rows that were inserted in the table that you
specified in Step 5:
<positive integer> rows have been inserted to table <tablename>
*** DumpLockLog is terminated ***
For a description of the structure of the lock log table that dumplocklog creates and example
procedures for joining your table with the Teradata Database system DBase, TVM, and
EventLog tables to produce a meaningful output report, see Producing a Lock Log Report
on page 51.
Hexadecimal Syntax
The hexadecimal format is as follows:
'...'XN.'...'XN
Syntax element...
Description
...
Digit
0 - 9.
Char
a - f or A- F.
50
Utilities
The following are examples of the same database names modified to be accepted as object
constraints by dumplocklog. The names are delimited, and double quotation marks within the
name are preceded by an apostrophe character.
"ABC'DB1"."cjh'single"
"JOSE'"DB"."table 'a"
"XYZ'S DATA'"BASE"."tes't'"3"
"'"DB '" 30' sl' dl' space' chars"."'"Tbl '" 30' sl' dl' spce' chars"
"'employee'''"database"."'''employee'"'"table"
For detailed information on naming objects, see Basic SQL Syntax and Lexicon in SQL
Fundamentals.
Utilities
51
Description
BEGDATE
BEGTIME
BLKDLEVEL
BLKDLOGHOST
BLKDMODE
BLKDSESSNO
BLKINGLOGHOST
BLKINGLEVEL
BLKINGMODE
BLKINGSESSNO
52
Utilities
Column
Description
DEADLOCK
MULTIPLEBLOCKER
PROCESSOR
STMTTYPE
TID
Internal identifiers for the object on which the lock was requested
Since the EventLog table usually is very large, the examples first try to reduce the size of
this table to minimize the execution time of the join operation.
Temporary tables are assigned names using non-alphabetic characters to avoid possible
conflicts with existing permanent tables.
MyLog represents the lock log table that was created by dumplocklog.
Utilities
53
The begdate and begtime values from the lock log table
For example, suppose that your lock log table (MyLog) and the DBC.EventLog table contain
the following rows.
MyLog Table
DBC.EventLog Table
begdatetime
blkdsessno
logondatetime
sessionno
user
T2
S1
T1
S1
T4
S2
T2
S2
T10
S1
T3
S1
T30
S2
T5
S1
T9
S2
T11
S1
T20
S2
To identify the user from DBC.EventLog for each row in MyLog, note the following:
The first row of MyLog is <T2,S1> and there are four rows from DBC.EventLog with
session number S1:
Since S1 was blocked at time T2, S1 must have been logged on before T2. Therefore, user A
was blocked at T2.
<T1,S1,A>
<T3,S1,C>
<T5,S1,D>
<T11,S1,F>
The third row of MyLog, <T10,S1>, has four rows from EventLog with session number S1,
and three of them have a logondatetime before T10:
<T1,S1,A>
<T3,S1,C>
<T5,S1,D>
In this case, user D was blocked at T10, since the last logon time for S1 before T10 was
at T5. Using the same process as before, the fourth row of MyLog identifies user G.
Some of the following example SQL queries use three temporary tables:
54
Utilities
Inserting Rows
The following SQL statements define a macro that inserts rows into the temporary tables. The
macro uses four parameters:
Utilities
55
t1date, t1time specifies that only the users logged on AFTER this time should be selected
from DBC.EventLog.
t2date, t2time specifies that only the blockages occurring BEFORE this time should be
selected from MyLog. This date and time should always be AFTER the date and time
specified by t1date, t1time.
Limiting the number of rows from DBC.EventLog before performing a join operation is very
important because DBC.EventLog could contain millions of rows if it is not purged frequently.
However, to ensure that you see all the rows from the lock log table, set the t1date, t1time
parameters early enough to catch all the logons of sessions that were active at any time while
dumplocklog was running (up until t2date, t2time). Therefore, if you have very long-lived
sessions, select a t1date, t1time farther back in time from t2date, t2time than you would have
selected if you knew all the sessions running were very short-lived.
Also, you could add other parameters to this macro to further limit the analysis. If, for
example, you are only interested in lock log table rows involving user Joe with account Joe1 in
some time range, you could add the following:
(t1date
t1time
t2date
t2time
date,
float,
date,
float) as
(
/*******************************************************/
/* To get all of the rows from MyLog whose blocked
*/
/* begin time is less than t2date/time, join with
*/
/* DBC.TVM to get the table name from the table ID
*/
/* and with DBC.Dbase to get the database name from
*/
/* the database ID. A database level lock row has
*/
/* table name of ALL.
*/
/*******************************************************/
del from "MYTEMPLOG_TWO";
locking MyLog for access
locking dbc.dbase for access
locking dbc.tvm for access
56
Utilities
Utilities
57
This results in a unique (possibly null, if no match on logical host/session number exists) row
from MYTEMPLOG_ONE for each row in MYTEMPLOG_TWO.
Using the sample rows described earlier:
("MYTEMPLOG_ONE".logicalhostid
= "MYTEMPLOG_TWO".blkdloghost) AND
("MYTEMPLOG_ONE".sessionno
= "MYTEMPLOG_TWO".blkdsessno )
returns:
58
Utilities
and:
("MYTEMPLOG_ONE".logondatetime =
(SELECT MAX(ev3.logondatetime)
FROM "MYTEMPLOG_ONE" AS ev3
WHERE (ev3.logicalhostid
= "MYTEMPLOG_TWO".blkdloghost) AND
(ev3.sessionno
= "MYTEMPLOG_TWO".blkdsessno ) AND
(ev3.logondatetime
< "MYTEMPLOG_TWO".begdatetime)
)
)
returns:
<T2,T1>, <T4,T2>, <T10,T5>, <T30,T20>
Hence, using the result from the correlated subquery above, we are able to identify the proper
users (A, B, D and G) for these rows:
<A> : <T2,S1><T1,S1,A> in <T2,T1>
^^
^^
^^ ^^
<B> : <T4,S2><T2,S2,B> in <T4,T2>
^^
^^
^^ ^^
<D> : <T10,S1><T5,S1,D> in <T10,T5>
^^^
^^
^^^ ^^
<G> : <T30,S2><T20,S2,G> in <T30,T20>
^^^
^^^
^^^ ^^^
The following two SQL statements create the global temporary table that contains the reduced
lock log information joined with the blocked user information:
DROP
TABLE "MYTEMPLOG_THREE";
CREATE GLOBAL TEMPORARY TABLE "MYTEMPLOG_THREE"
(
begdatetime
FLOAT
FORMAT 'zzz,zzz,zzz,zzz.zzz' NOT NULL,
begdate
DATE
NOT NULL,
begtime
FLOAT
FORMAT '99:99:99.999' NOT NULL,
delay
FLOAT
FORMAT '99:99:99.999' NOT NULL,
databasename
CHAR(30) NOT NULL,
tablename
CHAR(30) NOT NULL,
blkdlevel
CHAR(8)
NOT NULL,
blkdmode
CHAR(2)
NOT NULL,
blkdloghost
SMALLINT NOT NULL,
blkdusernm
CHAR(30) NOT NULL,
blkdsessno
INTEGER
NOT NULL,
blkdacctnm
CHAR(30) NOT NULL,
Utilities
59
VARCHAR(128),
CHAR(8)
NOT NULL,
CHAR(2)
NOT NULL,
SMALLINT NOT NULL,
INTEGER
NOT NULL,
SMALLINT
'zzzz9' NOT NULL,
CHAR(1)
NOT NULL,
CHAR(1)
NOT NULL,
VARCHAR(20)
NOT NULL
)
PRIMARY INDEX (begdate, begtime);
60
Utilities
SELECT
"MYTEMPLOG_THREE".begdate
(NAMED RequestedDate)
(FORMAT 'YYYY/MM/DD')
(CHAR(10))
, "MYTEMPLOG_THREE".begtime
(NAMED RequestedTime)
(FORMAT '99:99:99')
(CHAR(8))
, "MYTEMPLOG_THREE".delay
(NAMED Delay)
(FORMAT '99:99:99.999')
(CHAR(12))
, "MYTEMPLOG_THREE".databasename
(NAMED DataBaseName)
, "MYTEMPLOG_THREE".tablename
(NAMED TableName)
, "MYTEMPLOG_THREE".blkdlevel
(NAMED BlockedLockLevel)
, "MYTEMPLOG_THREE".blkdmode
(NAMED BlockedLockMode)
, "MYTEMPLOG_THREE".blkdloghost
(NAMED BlockedHostId)
(FORMAT 'zzz9')
(CHAR(4))
, "MYTEMPLOG_THREE".blkdusernm
(NAMED BlockedUser)
, "MYTEMPLOG_THREE".blkdacctnm
(NAMED BlockedAccount)
, "MYTEMPLOG_THREE".blkdlogonsrc
(NAMED BlockedLogonSource)
, "MYTEMPLOG_THREE".blkinglevel
(NAMED BlockingLockLevel)
, "MYTEMPLOG_THREE".blkingmode
(NAMED BlockingLockMode)
, "MYTEMPLOG_THREE".blkingloghost
Utilities
61
/********************************************************/
/* To analyze the lock rows for users logged on after
*/
/* 6:30 a.m. on 92/01/02 and delays that occurred
*/
/* before 12:00 p.m. on 92/01/03:
*/
/*
*/
/* > EXEC LockBldTmp(920102,063000,920103,120000);
*/
/*
*/
/* > EXEC LockDisplay;
*/
/*
*/
/* To clean up the temporary tables:
*/
/*
*/
62
Utilities
Example
The following shows a sample output:
>dumplocklog
_______
|
|
___
|
/
|
--|
\___
__
|/
|
|
____
____|
/
|
\____|
|
|
____|
/
|
\____|
____
____|
/
|
\____|
|
__|__
|
|
|__
____
____|
/
|
\____|
This utility writes lock log entries in memory to an user specified table.
Enter your logon string: <username,password> (Q/q to quit)
dbc,dbc
Do you want this utility to run continuously? (Y/N)
n
Enter number of sessions (? For Help, Q/q to Quit):
2
2 sessions will be logged on.
Enter the table name where the lock log entries will be written (? For Help, Q/q to Quit):
dmo.locklog
Do you want this utility to create table DMO.LOCKLOG? (Y/N)
y
Table DMO.LOCKLOG has been created.
Enter the time constraint to control selection of lock log entries that were generated AT
or LATER than this time YYMMDD HHMMSS (? For Help, Q/q to Quit):
970701 130000
Enter the time constraint to control selection of lock log entries that were generated AT
or PRIOR to this time YYMMDD HHMMSS (? For Help, Q/q to Quit):
970701 140000
Utilities
63
- <name1>
- name specifies a table under the user name specified in the logon.
- *
- <Return>
- Done.
- Q
Note that if database or table name is specified, it has to exist or an error will be
returned.
Enter the object constraint for selection of lock log entries (? For Help, Q/q to Quit):
dmo.*
more?
64
Message
Description
Utilities
Utilities
Message
Description
"Utility is about to be
terminated..."
"Utility resumes..."
65
66
Utilities
CHAPTER 20
The Modify MPP List utility, modmpplist, is an interactive utility that allows you to modify
the node list file (by default, named mpplist).
Modify MPP List can read the list from the Teradata Configuration directory, and can create
or modify a copy of the list in another location.
When you must shut down a node for hardware maintenance, you can use modmpplist to
place the node into an offline state, and to distribute the revised MPP list file on the Teradata
Database system. If you use modmpplist to take a node offline, you must use modmpplist to
bring the node back online.
Runs From
Modify MPP List runs from the Linux command line.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
modmpplist
-h
-m file_path
1102A165
Syntax Element
Description
-h
-m file_path
Utilities
67
Usage Notes
By default, modmpplist reads from and writes to the standard mpplist file: /etc/opt/teradata/
tdconfig/mpplist.
To read from a different file, use the -m option of modmpplist.
To write changed settings to a different file, use the -w option of the write command. For
more information, see WRITE on page 76.
Example 1
The following example shows how to start modmpplist to edit the default mpplist. Note the
minus sign prefacing the offline node in the output from the list command.
>modmpplist
reading default mpplist, /etc/opt/teradata/tdconfig/mpplist...
0:pdetnt5_bynet
3:pdetnt8_bynet
1:pdetnt6_bynet
2:pdetnt7_bynet
68
Utilities
Example 2
The following example shows how to start modmpplist to edit a user-specified mpplist file
named mympplist. Note that after writing to the local file, modmpplist will still ask if you want
to save the mpplist file. This refers to the default mpplist file. If you are just working with a
local file, with no desire to change the mpplist settings on all nodes, respond no to this
message.
>modmpplist -m mylist
reading users mpplist, mylist ...
0:pdetnt5_bynet
3:pdetnt8_bynet
1:pdetnt6_bynet
2:pdetnt7_bynet
Utilities
Command
Description
DISPLAY
69
Command
Description
LIST
Outputs the list of node names, their unique node IDs, and the status
of nodes in the current mpplist buffer to the STDOUT file.
OFF id_list
ON id_list
QUIT
WRITE
Forces the mpplist file to be written out to all nodes in the MPP system.
!COMMAND
70
Utilities
DISPLAY
Purpose
The DISPLAY command outputs the current mpplist buffer as it would appear in file format
to the STDOUT file.
Syntax
DISPLAY
D
1102A026
Utilities
71
LIST
Purpose
The LIST command outputs the list of node names, their unique node IDs, and the status of
nodes in the current mpplist buffer to the STDOUT file.
Syntax
LIST
L
1102A027
Usage Notes
The list shows the nodes in the following format:
IndexId:nodename
nodestatus
Component...
Specifies...
IndexId
nodename
nodestatus
Note: If a node is offline, the node appears with a dash (or minus sign) in front of the IndexID
in the mpplist as shown below:
-IndexId:nodename
Example
The following example lists the status and ID of the nodes.
mpp> l
0:pdetnt5_bynet
1:pdetnt6_bynet
2:pdetnt7_bynet
3:pdetnt8_bynet
72
Utilities
OFF id_list
Purpose
The OFF id_list command changes the status of the IDs in the space-separated list to NO
(offline).
Syntax
OFF id_list
1102A028
Syntax element...
Specifies...
id_list
Example
The following example changes node 2 to offline.
mpp> off 2
1 node is offline.
(Buffer has been Modified since last read)
Utilities
73
ON id_list
Purpose
The ON id_list command changes the status of the IDs in the space-separated list to YES
(online).
Syntax
ON id_list
1102A029
Syntax element...
Specifies...
id_list
Example
The following example changes node 3 to online.
mpp> on 3
all 4 nodes are online.
74
Utilities
QUIT
Purpose
The QUIT command causes modmpplist to quit the interactive session.
Syntax
QUIT
Q
1102A216
Usage Notes
If you modify the mpplist file, but you did not issue a WRITE command, you are asked if you
want to write the current mpplist buffer to all available nodes. The default is NO.
If you type Y (YES) at the prompt, the current mpplist buffer is written, and then the
session exits.
Example 1
The following example quits modmpplist if you just press RETURN.
mpp> quit
You have changed a value. Do you wish to save the mpplist file? (yes|no)
[no]
Example 2
The following example quits modmpplist if you type Y (YES) to the prompt.
mpp> quit
You have changed a value. Do you wish to save the mpplist file? (yes|no) [no]
y
All 1 node(s) have connected
MODE
SIZE
INODE USER
GROUP
FILE
-rw-r--r-375
54206 <anon>
<anon>
/etc/opt/teradata/tdconfig/mpplist
localhost:1043: send completed: 444 bytes received (1 files/0 directories)
Wrote and distributed mpplist to 1 node successfully.
Utilities
75
WRITE
Purpose
The WRITE command forces the mpplist file to be written out to all nodes in the MPP system.
Syntax
WRITE
W
-w file_path
-y
1102B030
Syntax element...
Specifies...
-w file_path
to write the modified mpplist settings to a file on the local node only.
This option allows you to save changes to the local node when a remote copy
fails.
If you specify a directory path only, then the file mpplist is written to that
directory.
If you specify a path and file, then the file specified is written to the path
specified.
If you specify a file name alone, then that file is written to the current
working directory.
-y
Example
The following example bypasses the prompt and writes the mpplist file to all live nodes.
76
Utilities
Syntax
!COMMAND
1102A031
Syntax element...
Specifies...
COMMAND
Example
The following example runs the dir operating system command, which shows a directory
listing.
mpp> !ls /
bin boot dev etc home lib lib64 log lost+found master.src media
mnt opt pkgs proc root sbin srv sys tdsh tmp tms usr var
Utilities
77
78
Utilities
CHAPTER 21
Allows you to define a prioritized weighting system based on user logon characteristics,
and on Workload Definition (Category 3) rules set in the Teradata Viewpoint Workload
Designer portlet.
Prioritizes the workload in your data warehouse based on this weighting system.
Offers utilities to define scheduling parameters and to monitor your current system
activity.
Priority Scheduler includes default parameters that provide four priority levels with all users
assigned to one level. To take advantage of Priority Scheduler capabilities, do the following:
Assign users to more than one of the default priority levels based on your work priority
strategy.
Define additional priority levels and assign users to them to provide a more sophisticated
priority strategy.
Assign very high priority users to a very high priority level to support Active Data
Warehouse applications.
The first part of this chapter generally describes the structure and relationships of the
scheduling components and parameters. The second part describes schmon, a command-line
interface to Priority Scheduler. For detailed information, see Schmon Utility (schmon) (SLES
10 only) on page 103.
Note: If Workload Definitions have been set in the Teradata Viewpoint Workload Designer
portlet, schmon cannot be used to make changes to Priority Scheduler.
Utilities
79
Overview
Priority Scheduler consists of the following three-tiered control structure to group user
sessions for scheduling purposes:
Resource Partition
Performance Group
Allocation Group
Each of these components includes parameters that relate them to each other. You define and
associate these components to design an environment that favors or inhibits the performance
of individual sessions based on their logon account attributes.
The following figure shows the hierarchical structure of Priority Scheduler.
Performance
Period
1:M
1:M
Performance
Group
Milestone Limit
Allocation Group
Milestone Type
1:1
Allocation
Group
Type
Weight
1102E421
80
Utilities
Component
Descriptions
Resource Partition
Performance Group
Performance Period
You must define at least one Performance Period, but you can have
up to eight Performance Periods per Performance Group.
A Performance Period links a Performance Group to an Allocation
Group.
Optionally, a Performance Period allows you to change Allocation
Group assignments based on time-of-day or resource usage.
Allocation Group
Utilities
81
Each Performance Group is associated with one Allocation Group at any time, however, as an
option, a Performance Group's Allocation Group can change as system conditions change.
Consequently, the jobs controlled by a Performance Group may have different priorities
assigned to them at different times, and their priorities can change as the jobs run.
The association between a Performance Group and an Allocation Group is mediated by the
Performance Group's Performance Periods. Performance Periods link Performance Groups to
Allocation Groups. As an option, the Allocation Group associated with a Performance group
can be dynamically changed based on current resource usage or time of day. A Performance
Group can define from one to eight Performance Periods, however the most common
approach is to define only a single Performance Period per Performance Group.
For more information on Priority Scheduler components, see the following:
To configure Priority Scheduler, see Schmon Utility (schmon) (SLES 10 only) on page 103.
82
You can change parameters at any time using the schmon utility.
Any changes you make to any parameter, including weight, take place immediately across
all nodes in the configuration.
You can delete the definitions of unused Resource Partitions, Performance Groups, and
Allocation Groups using a Teradata Database system utility like schmon. The element that
you want to delete cannot be in use when you perform the deletion. This means that an
Allocation Group or Resource Partition must not be referenced by a Performance Group,
and a Performance Group must not be referenced by a currently logged on user.
You can change the name of a defined but unused Resource Partition or Performance
Group to make it obvious it is unused. For example, you might name the unused Resource
Partition or Performance Group UNUSED or NULL.
Utilities
Resource Partitions
Resource Partitions divide the Teradata Database users into groups based on some use or
priority strategy, such as by subject area or type of work.
Priority Scheduler provides you with a default Resource Partition named Default. You can
create up to four more Resource Partitions. The default Resource Partition has a default
partition weight of 100 and has four Performance Groups accessible by users. You can define
additional Performance Groups in the default Resource Partition.
The following table presents a logical view of Resource Partition 0.
Performance group...
L (low)
5.
M (medium)
10.
H (high)
20.
R (rush)
40.
Resources are distributed to the Teradata Database system sessions that specify a Performance
Group within a Resource Partition. The parameters associated with the Performance Groups
and Allocations Groups of a Resource Partition control this resource allocation.
For detailed information, see the following:
Utilities
Parameter
Description
ID
A unique name for the Resource Partition. The name can contain no
more than 16 characters.
Weight
83
Parameter
Description
Limit
10.
20.
30.
Add the individual respective weights of the active Resource Partitions (10 + 20 + 30) for a
sum of 60.
Divide each respective weight (10, 20, and 30) by the sum of 60.
The relative weight for each partition is as follows:
Partition 1 = 16%
Partition 2 = 33%
Partition 3 = 50%
Note: The relative weight for Resource Partition 1 is 16%, rather than 17%, because
Teradata Database truncates fractional values when doing relative weight calculations.
84
Utilities
The normal distribution of resources prevails within the specified amount of CPU usage. Any
other CPU resource limits defined by a Teradata Database system CPU limit are observed.
20
60
tactical queries.
These are short, highly-tuned queries that facilitate
decision-making in a time-sensitive environment.
20
everything else.
Performance Groups
Every request is assigned to a Performance Group (PG) based on the session logon process and
by Teradata Active System Management (ASM), if enabled. PGs determine the priorities of
Teradata Database jobs (mostly database queries) that are run from the session. Each PG is
associated with a Resource Partition and one or more Allocation Groups. It is the interaction
of Resource Partition and Allocation Group weights that determines the priority of jobs that
are run from a particular Teradata Database session.
Allocation Groups are dynamically assigned to Performance Groups according to
relationships defined by Performance Periods. The specific Allocation Group associated with a
Performance Group can change based on the time of day or the resource usage of running
jobs. Performance Periods define which Allocation Group is assigned to a Performance Group
at any moment based on these conditions.
For more information on Performance Periods, see Performance Periods on page 88. For
more information on Allocation Groups, see Allocation Groups on page 93.
The Resource Partition and Performance Periods of a Performance Group are specified when
the PG is created using the schmon -p command. The following table briefly describes the
parameters used to define a Performance Group. For more information on the schmon -p
command, seeschmon -p on page 140.
Utilities
85
Parameter
Description
Performance Group ID
Resource Partition ID
Performance Periods
86
Utilities
Default Weight
10
20
40
Names longer than a single character require terminating dollar signs. Single-character
names do not require the terminal $, but may include it.
Because the entire account ID string is limited to 30 characters, try to keep PG names
brief.
Note: The Teradata Database enforces other rules for the length and format of account ID
strings, which may influence the choice of Performance Group names. For more information
on CREATE USER, MODIFY USER, and the Data Dictionary, see the books SQL Data
Definition Language and Data Dictionary.
The following are examples of valid Performance Group names that might appear in an
account ID string for a user granted access to five Performance Groups:
$L,'$L1$',$M$,$M2$',$tac1$
The following table describes how Teradata Database assigns Performance Groups to sessions
during the logon process.
Utilities
87
IF...
THEN...
logon fails.
Performance Periods
Performance Periods associate Performance Groups with Allocation Groups. A Performance
Period is a value pair that specifies a limit condition (milestone) and an Allocation Group.
Performance Periods are specified when Performance Groups are defined. Each Performance
Group can specify from one to eight Performance Periods. For more information on defining
Performance Groups, see schmon -p on page 140.
Every request is assigned to a Performance Group based on the logon process and by Teradata
ASM, if enabled. The Performance Group controls how resources are allocated to session
tasks, by means of Performance Periods. Performance Periods determine which Allocation
Groups govern tasks, based on time and resource criteria. A task assigned to a particular
Performance Group can be switched among different Allocation Groups based on the criteria
defined in the Performance Group's Performance Periods
Performance Groups typically have only a single Performance Period. This is the case for the
default Performance Groups in the default Resource Partition. Sessions controlled by these
Performance Groups will have their resource allocation determined by a single Allocation
Group.
Optionally, Performance Groups can have more than one Performance Period. When this is
the case, sessions controlled by these Performance Groups can have their Allocation Group
dynamically changed as system conditions change. Consequently, tasks running in those
sessions may be assigned different priorities as those tasks run.
88
Utilities
Defines the...
Milestone Type
Milestone Limit
Allocation Group
Query resource Performance Periods monitor the accumulated CPU time used by each
query. When the threshold for the Performance Period is exceeded, the query is transferred
to the next Performance Period and so placed under the control of a different Allocation
Group. Typically, long-running queries are switched to progressively lower priority
Allocation Groups. This prevents these queries from competing against the shorterrunning queries in higher priority Allocation Groups.
Note: Teradata recommends that query resource Performance Periods not be used with
online components of Teradata Applications, such as Demand Change Management
(DCM) and Customer Relationship Management (CRM). This prevents tactical online
queries, which require quick responses, from being demoted.
Utilities
89
Session resource Performance Periods monitor the accumulated CPU time used by each
session. When the threshold for the Performance Period is exceeded, the session is
transferred to the next Performance Period, and the tasks belonging to that session are
placed under the control of a different Allocation Group. Typically, the change is to a
lower- priority Allocation Group. Consequently access to resources will be progressively
reduced for longer-running sessions.
Time-of-day Performance Periods monitor the clock time, and optionally the day of the
week. These types of Performance Periods are used to dynamically switch the Allocation
Group of a session based on changes in business priority of different work at different
times of day. For example, a session can be switched to a higher-priority Allocation Group
after business hours or on weekends, when competition for database resources is not high.
Time-of-day
Minutes of military time, representing time periods during a 24hour day. For example, 0800 is 8:00 A.M.
90
Utilities
When a query under that control of Performance Group10 begins executing, all of its tasks
will be under the control of Allocation Group 9 until 15 seconds of CPU time are used by the
query on the node. At that time, Allocation Group 33 assumes control of the query until the
query completes.
Note: The time to accumulate 10 seconds of CPU time might be different from 10 seconds of
wall clock time.
Time-of-Day Milestones
When you express milestone limits in units of time-of-day, the respective Performance Period
and its associated Allocation Group control every task assigned to the Performance Group, up
until the time specified in that Performance Period.
The actual time-of-day selected for the Performance Periods represents an upper limit of time.
When this threshold is passed, the Performance Period with the next higher time-of-day and
its associated Allocation Group take control. This Performance Period will change as the day
proceeds through the 24-hour cycle. When the last-specified Performance Period expires, the
first Performance Period and its Allocation Group take control of the tasks assigned to the
Performance Group.
Suppose you rely on a window of time at night to perform batch work. To keep your query
users from interfering with night work without shutting them out completely, do the
following:
1
Between 8:00 a.m. and 5:00 p.m., give the query users an assigned weight of 20.
Between 5:00 p.m. and 11:00 p.m., reduce the assigned weight to 10.
Between 11:00 p.m. and 8:00 a.m., further reduce the assigned weight to 5.
At the same time, you can increase the weighting of any batch work. Suppose you raise the
assigned weight of the batch work Performance Group from 5 to 30 between 11:00 p.m. and
8:00 a.m. In doing so, you have helped the important batch work to finish, even if users issue
queries after hours.
Day-of-Week
Optionally, you can use a day-of-week specification with a time-of-day milestone for a
Performance Period to indicate days when the Performance Period is to be active. This
specification might indicate one or more individual days, or a range of days, but not both.
Days are numbered sequentially from 0 to 6, Sunday through Saturday. A range of days is
indicated by two day numbers separated by a hyphen.
If a day-of-week specification is present for one Performance Period, then day-of-week must
be present for all.
A time-of-day milestone for a Performance Period defines the end of a time period during
which the associated Allocation Group is to control tasks. The beginning of each period is the
end of the preceding period. This might be on a previous day if day of week has been specified.
Utilities
91
If you do not use a day-of-week specification, then the specified periods apply to all days. In
this case, the beginning of the first period is the end of the last period of the day. You might
specify one period to define the Allocation Group to be used for the entire day. The milestone
time given for this period is immaterial but must be a valid time.
Suppose you want to provide different levels of service on weekdays, Saturday, and Sunday.
On weekdays, one Performance Period is in effect between 0800 and 1800, another beginning
at 1800 and continuing until 0800 the next morning.
On Saturday the Performance Period from 1800 on Friday continues until 1400 and then
switches to another Performance Period that continues through Sunday and on until 0800
Monday morning. The Performance Period specification is as follows, where day of the week is
denoted by enclosing / characters:
/1-5/ 1800 2 Monday through Friday, use AG 2 until 1800. After 1800, use the next higher
period.
/6/ 1400 7 Saturday, use AG 7 until 1400. After 1400, use the next Performance Period,
which is the one specified for 0800 Monday that uses AG 5.
Note: If the Time Zone (TZ) is not set correctly, Priority Scheduler will not work as expected.
To view the TZ see the files in the /user/lib64 directory and the man pages for zic and environ.
If the Time Zone is changed, the current Priority Scheduler settings should be dumped (using
the schmon -c command) and re-executed after PDE comes up so that the limit values in the
system gdo are correct.
92
Utilities
For more information on schmon options, see Schmon Utility (schmon) (SLES 10 only) on
page 103.
Allocation Groups
An Allocation Group establishes how resources are allocated to tasks (threads). It defines the
following:
A method for disbursing resources among sessions active within that Allocation Group
An attribute that optionally expedites work requests for sessions controlled by the
Allocation Group
A weight
Performance
Group P2
Performance
Period
Allocation
Group 7
Performance
Period
Performance
Group B
Performance
Period
Allocation
Group 6
1102F423
An Allocation Group cannot be referenced by Performance Groups from more than one
Resource Partition.
Utilities
93
Description
Allocation Group ID
Expedite Attribute
Limit
Establish reasonable contrast between weights of Allocation Groups in the same Resource
Partition, but avoid extreme differences. For example, use 2:1, 3:1, and 4:1 ratios between
weights, rather than 12:1 or 20:1.
If strong priority differences are required, establish relative weights for different priority
Allocation Groups so that the contrast between them is a factor of two or more. For
example, consider relative weights of 5%, 20% and 50%, rather than 15%, 18% and 20%.
Expedite Attribute
You can specify an Expedite Attribute for an Allocation Group to indicate that work requests
for sessions controlled by the Allocation Group are to be expedited through the AMP worker
task (AWT) invocation procedures. Work requests controlled by the Allocation Group are
favored over non-expedited work requests controlled by other Allocation Groups during the
invocation procedure in two ways:
94
Expedited work requests receive increased priority in the work request input queue when
all AMP worker tasks are in use. They bypass normal work requests in the input queue and
have quicker access to an AWT.
Expedited work requests have access to a special pool of reserved AWTs that have been
dedicated for this expedited work by the Teradata Database system administrator.
Utilities
Caution:
Teradata recommends that only Allocation Groups supporting short, response-sensitive work,
such as single-AMP operations, be expedited. Work performed in this mode will have some
impact on resources available to non-expedited work. Use this option judiciously.
For more information on reserved AWT pool, see AMP Worker Task (AWT) Reservations
and Limits on page 98.
Allocation Group 1 = 5
Allocation Group 2 = 10
Allocation Group 3 = 20
Allocation Group 4 = 40
Add the individual respective weights of the three active Performance Groups (5 + 10 +
20) for a sum of 35.
Divide the weight (5, 10, and 20) of each Performance Group by the sum of 35.
The relative weight for each Allocation Group, relative to its Resource Partition, is as
follows:
If the relative weight of the Resource Partition is 50%, multiply the relative weight for each
Allocation Group by .50 to determine the relative weight for each Allocation Group.
The final Allocation Group weights are as follows:
If the relative weight of the Resource Partition is 50%, multiply the relative weight for each
Allocation Group by .50 to determine the relative weight for each Allocation Group.
Utilities
95
The following example shows how Priority Scheduler handles Resource Partitions and
associated Performance Groups.
Suppose you have three active Resource Partitions with the following weightings:
Default = 20
Tactical = 60
Standard = 20
Type of Work
For demotions
P2
10
Med/low priorities
P1
40
High priorities
20
Find the percentage of resources allocated to the Standard Resource Partition by dividing
the weight of the Standard Resource Partition (20) by the sum of the active Resource
Partitions (100):
20/100 = 20%
Add the assigned weights (5, 10, 40, and 20) of the active Allocation Groups within the
Standard Resource Partition:
5 + 10 + 40 + 20 = 75
Find the percentage of the Standard Resource Partition allocation that the med/low
priority users can expect by dividing the P2 group weight (10) by the sum of the active
Performance Groups (75):
10/75 = 13%
Multiply the percentage of resources (20%) allocated to the Standard Resource Partition
by the percentage (13%) of the Standard Resource Partition allocation that the med/low
priority users can expect:
20% x 13% = 2%
With all Resource Partitions and all Performance Groups in the Teradata Database system
active, the relative weight of the Allocation Group for med/low priority users is 2%. The
relative weight of the Allocation Group for batch load and report users is 5%. In this
example, the batch load and report users will have more than twice as much access to
resources than the med/low priorities.
96
Utilities
The number of users active at the same time within the Allocation Group
The nature of the queries (such as data skew, complexity of the work submitted, and how
long the queries take to complete)
The average query response time grows as active users in the same Allocation Group increase.
The following table shows how the number of users in Performance Group H (and its
associated Allocation Group) affects query response time of all queries in that Allocation
Group.
IF the number of active users in a Performance Group/
Allocation Group pair is...
7 seconds.
11 seconds.
10
19 seconds.
20
38 seconds.
Resource Accounting
Priority Scheduler resource accounting employs three user-settable parameters:
Age Time is the period of time over which Priority Scheduler measures the resource
consumption of Allocation Groups in order to balance usage and priority.
Active Time is the period of time over which Priority Scheduler monitors the activity level
of Allocation Groups. Groups with no tasks running for the length of time represented by
the Active Time are removed from Priority Scheduler resource accounting for the period.
CPU Usage Limit is the total amount of CPU resource that can be used at any point in
time by all Teradata Database sessions that are under the control of Priority Scheduler.
Resource use is tracked by means of a Scheduling Set data structure. There is one Scheduling
Set allocated for every session.
Age Time
Age Time tells Priority Scheduler how many seconds constitute recent in evaluating recent
resource consumption. The default value for Age Time is 60 seconds. Decreasing this Age
Time makes Priority Scheduler respond more quickly to changes in resource usage. This
responsiveness affects the frequency and degree of changes in task (thread) priorities, and how
Priority Scheduler manages resource allocation.
Utilities
97
Note: In this case, responsiveness is not the same as query response time. Modifying Age Time
does not necessarily affect query response time. You should monitor adjustments in Age Time
carefully to judge their effects on Teradata Database system performance.
Active Time
The default value for Active Time is 61 seconds. During this period, an Allocation Group
continues to participate in relative weight calculations and resource allocations, even when no
tasks are active, in anticipation of a new task being associated with the Allocation Group.
This period causes a smoothing effect in the scheduling algorithms when a few tasks are
associated with an Allocation Group at interrupted intervals.
Note: If no task controlled by an Allocation Group has consumed resources within the
preceding Active Time period, the Allocation Group is considered inactive. An Allocation
Group and Scheduling Set are inactive when they have no active tasks during the active time
interval. A Resource Partition is inactive when it has no active Allocation Group within the
active time. Priority Scheduler considers only active Resource Partitions and Allocation
Groups when computing the total weight used to calculate the relative weight of Resource
Partitions and Allocation Groups. You should monitor adjustments to Active Time carefully
to judge their effect onTeradata Database system performance.
Age Time and Active Time should be kept similar to each other. For example, if Age Time is
reduced from the default of 60 to 30 seconds, change the Active Time from the default of 61 to
31.
Has no affect on the scheduling strategy defined by other Priority Scheduler parameters
98
Utilities
should be executed relative to other work requests that are waiting to execute. Examples of
work types include the following:
Spawned work, sub-tasks that are required to accomplish a task (WorkOne and
WorkTwo).
An AWT can process requests of any work type. Queued requests are prioritized by work type,
and AWTs pick up the requests according to those priorities. New work has the lowest priority.
AWTs process spawned work requests before new work requests. Expedited work, whether
new or spawned, has a higher priority than non-expedited work.
The total number of active tasks is less than a Current Limit, where Current Limit = # of
AWTs - (Total Reserved - Active Reserved).
The number of active tasks of that type is below its reserved number.
The default Teradata Database system provides 80 AWTs for each AMP. Out of these 80, three
tasks are reserved for each of eight work types, yielding 24 reserved tasks. That leaves 56
unreserved tasks that can be used for any work type.
If only two work types are active, for example WorkNew and WorkOne, they can use up to 62
AWTs in combination. This includes the 56 unreserved tasks in addition to the three tasks that
are reserved for each of the active work types (56 + 3 + 3 = 62). The 56 unreserved tasks can be
divided in any way between the two work types.
Besides reserving work tasks, the AWT resource manager also enforces an upper limit of 50 on
requests of work type WorkNew. Since many queries rely on multiple work types to reach
completion, the limit on WorkNew insures that requests that start up new work do not use too
many unreserved AWTs. Other work types have no limit on the number of tasks they can
Utilities
99
request from the unassigned pool of 56, and are limited only by the availability of unassigned
tasks.
One or more expedited AGs has been defined (see schmon -a on page 105)
One or more PGs use expedited AGs in Performance Period definitions (see schmon -p
on page 140)
One or more AWTs is reserved for expedited AGs (see schmon -w on page 152)
It is possible to expedite an Allocation Group, yet set or leave its reserve number at zero. If the
number of reserved AWTs for expedited work types is zero, no AWTs will be reserved. Under
those conditions, expedited requests will be serviced before normal work but are not
guaranteed immediate access to an AWT.
If expedited work consists of short, single, or few AMP queries, the amount of time a reserved
work task is held by any such query might be very short, such that a single AMP worker task
could service hundreds of queries per second. Under these conditions, a reservation of one or
two tasks might be adequate, depending on the expected arrival and service rate of the queries.
If any queries running within an expedited Allocation Group are all-AMP queries, a
minimum reserve number of two should be selected. Teradata recommends that the reserve
limit be set the same as the limit for WorkNew, 50. (The reserve number cannot exceed 20 for
expedited work.)
100
Utilities
Note: The work request for a single-AMP query is processed by just one task of the AMP
vprocs of an MPP system. Each AMP in the Teradata Database system could be performing a
similar single-AMP request simultaneously.
The schmon -m display includes data indicating the queue length, queue wait time, and
service time for all Allocation Groups. This data might be useful for adjusting the Expedited
work type reservation and limit values. If the queue wait time is between zero and five
milliseconds for a non-expedited Allocation Group, then it might not benefit from being
expedited, because no shortage of AWTs is being experienced.
The optional Expedite attribute of an Allocation Group is intended to provide quicker and
more consistent response time for queries than might be experienced with a non-expedited
Allocation Group. This Allocation Group option is intended for use by sessions submitting
short, simple queries where quick response time is critical. This type of work is sometimes
referred to as tactical query work.
Example 2
This example shows awtmon run in summary mode, displaying information only if 8 or more
AMPs have a combined total of 50 or more AWTs in use. The final two numbers in the
command specify that awtmon will automatically run 3 times, with a 2-second delay between
runs.
> awtmon -S 8 -t 50 2 3
====> Tue Feb 16 08:53:44 2003 <====
LOOP_0: Inuse: 55: Amps: 5,6,11,12,17,18,23,29,30,35,36,41,42
LOOP_0: Inuse: 56: Amps: 0,47
LOOP_0: Inuse: 57: Amps: 24
====> Tue Feb 16 08:53:47 2003 <====
LOOP_1: Inuse: 54: Amps: 5,6,11,12,17,18,23,29,30,35,36,41,42
Utilities
101
102
Utilities
If Workload Definition (Category 3) rules have been set in the Teradata Viewpoint
Workload Designer portlet, schmon cannot be used to make changes to Priority Scheduler.
Teradata Data Warehouse Appliance supports only a subset of schmon commands, and
does not support changing any Priority Scheduler settings. Run schmon -h to see the
available commands.
Certain output data, such as priority and resource usage, may differ from the examples
shown in this chapter, depending on the operating system under which Teradata Database
is running.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Utilities
103
Syntax
schmon
-a
AG#
weight
div
-s
-S
limit
none
-T
-d
delay
reps
-x
-b
RP#
RPNAME
weight
limit
none
-s
-S
-T
-d
delay
reps
-x
-c
-a
-b
-p
-t
-w
-f path
-d
-f
path
-h
specific option(s)
-l
limit
none
-m
-S
-P
-b
-d
delay
reps
-L
-M
-n
-p
-s
-P
-b
-d
-V
delay
reps
-p
PG#
PGNAME
-s
-S
-T
PP
-d
delay
reps
-x
-s
all
-S
-T
-d
delay
reps
id
-t
age
active
disp
-w
reserve
maximum
1102G005
Note: Some internal and rarely-needed options have been omitted from the following
discussion. Those options are described in the online help for schmon.
104
Utilities
schmon -a
Purpose
The schmon -a option displays or sets Allocation Group parameters.
Syntax
schmon
-a
AG#
div
-s
-S
weight
X
limit
none
-T
-d
delay
reps
-x
1102F006
Syntax element
Description
-a
AG#
An integer from 0 through 199 that identifies the Allocation Group for which
parameters will be set or displayed.
To set parameters for a Allocation Group, follow AG# with the div and weight
specifications.
To view information about a specific Allocation Group, follow AG# with the -s
or -S options, or with no options.
To clear all parameters for a specific Allocation Group, follow AG# with the -x
option.
div
This option is obsolete, but remains for backward compatibility. div must have a
value of N or S when creating or modifying an AG. (That is, div must be specified
any time weight is specified.) N and S values are equivalent. The N and S values
must be entered as upper case letters.
Utilities
105
Syntax element
Description
weight
limit
A percentage limit on total CPU usage by all tasks controlled by the Allocation
Group.
The value range is from 1 through 100.
A value of 100 indicates that no limit is to be enforced.
If limit is not specified, no limit is enforced, and any previously defined limit for
the AG is removed.
none
Specifies that no limit is to be enforced. This is the default value for limit. It is the
same as specifying 100.
-s
Displays Priority Scheduler data for all sessions controlled by the specified
Allocation Group on the current node.
-S
Displays Priority Scheduler data for all sessions controlled by the specified
Allocation Group on all Teradata Database nodes.
-T
Displays tasks (threads) for the specified Allocation Groups on the current node
(the node from which schmon was invoked). Even when used in conjunction with
the -S option, -T will display only task data for the current node.
Note: The -T option should not be used for prolonged periods of time, because it
can interfere with the normal operation of Priority Scheduler.
The -T output includes the following columns:
106
Utilities
Syntax element
Description
-d
Displays the differences in data between sequential runs of schmon. Use the delay
[reps] option to control timing of automatic schmon runs.
The following symbols precede numbers that appear in the output from the -d
option.
For decimal numbers:
- (a minus sign) indicates the value has decreased by the indicated amount
since the previous schmon run.
An unsigned decimal number indicates the value has increased by the
indicated amount since the previous schmon run.
For task data (displayed if the -T option is used with the -d option):
n-> indicates a task has been moved from the control of AG n to the
control of the displayed AG since the previous schmon run.
+ indicates a task is new, started since the previous schmon run.
- indicates a task that ended since the previous schmon run.
* indicates a task that has changed sessions or requests since the previous
schmon run.
For examples of the -d option output, see schmon -m on page 123, and
schmon -s on page 145.
Note: The output of the -d option shows only those items for which data has
changed since the previous schmon run.
delay [reps]
Causes schmon -a to run again automatically after a specified delay using the
current session options. delay is a positive integer that specifies the number of
seconds between schmon executions.
Use the optional reps argument, a positive integer, to specify the number of times
schmon should run. If reps is not specified, schmon runs indefinitely with delay
seconds between executions. In this case, schmon can be stopped by pressing CtrlC or otherwise killing the schmon process.
Note: The difference between time stamps of successive information displays may
not precisely match the specified delay value due to the time required for the
collection activity itself.
-x
Clears the parameters that define the specified Allocation Group, effectively
deleting it from the system (though an empty group will still appear in the output
of schmon -a all).
The Allocation Group must not be referenced by any Performance Period defined
by any Performance Group.
Usage Notes
A sessions tasks are assigned to Allocation Groups based on the sessions Performance Group.
Each Performance Group may have from one to eight Performance Periods defined, each of
which specifies an Allocation Group. As a task runs, its Performance Period changes according
to limit criteria (milestones) that are defined along with the Performance Group.
Consequently, the Allocation Group that controls a task can change over time. For more
information, see Performance Periods on page 88.
Utilities
107
If a node is offline, it is not included in the output, and the node count reflects this;
however, information about this node being excluded is not displayed.
Example 1
To display parameters for all in-use Allocation Groups, type:
schmon -a
Example 2
The following example shows a four-node MPP system.
To display session data for Allocation Group 1 on the current node, type:
schmon -a 1 -s
8 14:47:16 2008
Session Usage
Query Usage
AG HostID
Session
Request
#tsk CPU(msec) DSK(blk) CPU(msec) DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========= ========= ======== == =================
1
0
0
0
9
60
10250
60
10250 0 L[0]
Example 3
The following example shows a four-node system.
Note: PDE was not up on one of the nodes.
To display session data for Allocation Group 1 on all nodes, type:
schmon -a 1 -S
108
Mon Mar
Session
8 14:50:32 2008
Request
#tsk
Session Usage
Query Usage
CPU(msec) DSK(blk) CPU(msec) DSK(blk) RP PG [PP]
Utilities
Example 4
To set the expedite attribute on an Allocation Group 1, type:
schmon -a 1 N X 30
Example 5
To change the weight of Allocation Group 5 from 1 to 10, type:
schmon -a 5 S 10
Utilities
10
109
schmon -b
Purpose
The schmon -b option displays or sets Resource Partition parameters.
Syntax
schmon
-b
RP#
RPNAME
-s
-S
weight
limit
none
-T
-d
delay
reps
-x
1102F004
Syntax element
Description
-b
RP#
An integer from 0 through 4 that identifies the Resource Partition for which
parameters will be set or displayed.
To set parameters for a Resource Partition, follow RP# with the RPNAME
and weight specifications.
To view information about a specific Resource Partition, follow RP# with
the -s or -S options, or with no options.
To clear all parameters for a specific Resource Partition, follow RP# with the
-x option.
RPNAME
weight
110
Utilities
Syntax element
Description
limit
A percentage limit on total CPU usage by all tasks controlled by the Resource
Partition.
The value ranges from 1 through 100.
A value of 100 indicates that no limit is to be enforced.
If limit is not specified, no limit is enforced, and any previously defined limit
for the RP is removed.
none
Specifies that no limit is to be enforced. This is the default value for limit. It is
the same as specifying 100.
-s
Displays Priority Scheduler data for all sessions controlled by the Resource
Partition on the current node.
-S
Displays Priority Scheduler data for all sessions controlled by the Resource
Partition on all nodes of the Teradata Database system.
-T
Displays tasks (threads) for the specified Resource Partition on the current
node (the node from which schmon was invoked). Even when used in
conjunction with the -S option, -T will display only task data for the current
node.
Note: The -T option should not be used for prolonged periods of time,
because it can interfere with the normal operation of Priority Scheduler.
The -T output includes the following columns:
Utilities
111
Syntax element
Description
-d
Displays the differences in data between sequential runs of schmon. Use the
delay [reps] option to control timing of automatic schmon runs.
The following symbols precede numbers that appear in the output from the -d
option.
For decimal numbers:
- (a minus sign) indicates the value has decreased by the indicated
amount since the previous schmon run.
An unsigned decimal number indicates the value has increased by the
indicated amount since the previous schmon run.
For task data (displayed if the -T option is used with the -d option):
n-> indicates a task has been moved from the control of AG n to the
control of the displayed AG since the previous schmon run.
+ indicates a task is new, started since the previous schmon run.
- indicates a task that ended since the previous schmon run.
* indicates a task that has changed sessions or requests since the
previous schmon run.
For examples of the -d option output, see schmon -m on page 123, and
schmon -s on page 145.
Note: The output of the -d option shows only those items for which data has
changed since the previous schmon run.
delay [reps]
Causes schmon -b to run again automatically after a specified delay using the
current session options. delay is a positive integer that specifies the number of
seconds between schmon executions.
Use the optional reps argument, a positive integer, to specify the number of
times schmon should run. If reps is not specified, schmon runs indefinitely
with delay seconds between executions. In this case, schmon can be stopped by
pressing Ctrl-C or otherwise killing the schmon process.
Note: The difference between time stamps of successive information displays
may not precisely match the specified delay value due to the time required for
the collection activity itself.
-x
Clears the parameters that define the specified Resource Partition, effectively
deleting it from the system (though an empty group will still appear in the
output of schmon -b all).
The Resource Partition must not be referenced by any Performance Group.
112
Utilities
Usage Notes
For information on the settings displayed using the -b option, see schmon -d on page 117.
The following apply to MPP configurations:
If a node is offline, it is not be included in the output, and the node count reflects this;
however, information about this node being excluded is not displayed.
Example 1
The following example shows a four-node MPP system.
To display session data for Resource Partition 0 on the current node, type:
schmon -b 0 -s
Mon Mar
8 15:02:06 2008
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
1
0
0
0
9
60
10250
60
10250
0 L[0]
2
0
0
0
2
640
0
640
0
0 M[0]
4
0
0
0
1
1
0
1
0
0 R[0]
Example 2
The following example shows a four-node MPP system.
Note: PDE was not up on one of the nodes.
To display session data for Resource Partition 0 on all nodes, type:
schmon -b 0 -S
Mon Mar
8 15:02:06 2008
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
1
0
0
0
19
80
20500
80
20500
0 L[0]
2
0
0
0
6
790
5836
790
58360
0 M[0]
4
0
0
0
3
5
0
5
0
0 R[0]
Utilities
113
Example 3
To limit CPU usage by tasks controlled by Resource Partition 1 to 40 percent of the total CPU
available, type:
schmon -b 1 RP1 50 40
Partition Name
RP1
Resource Partitions (0 - 4)
Weight Limit
50
none
50
40
Example 4
To reset the limit to none on Resource Partition 1, type:
schmon -b 1 RP1 50 none
Partition Name
RP1
Resource Partitions (0 - 4)
Weight Limit
50
40
50
none
Example 5
To change the Resource Partition name, the relative weight, and the total CPU limit for
Resource Partition 1, type:
schmon -b
114
Limit
40
none
Utilities
schmon -c
Purpose
The schmon -c option displays the current Priority Scheduler settings as schmon commands.
The output can also be sent to a specified file, which can be used as input to the schmon -f
command to reapply the current schmon settings.
Syntax
schmon
-c
-a
-b
-p
-t
-w
-f path
1102B022
Utilities
Syntax element
Description
-c
-p
-b
Displays schmon commands that can be used to re-create the current Resource
Partitions.
-a
-w
Displays schmon commands that can be used to re-create the current AWT
expedite parameters.
-t
Displays schmon commands that can be used to re-create the current Times
and Attributes parameters.
-f path
Saves the output of schmon -c to a specified file. The file can be used in
conjunction with the schmon -f command to reapply some or all of the
current schmon settings. This option can be used with any combination of the
other schmon -c options.
115
Usage Notes
If you do not specify any options with the schmon-c command, then all commands, including
those for setting system times and attributes, are displayed.
Example 1
To dump all settings, type:
schmon -c
Allocation Groups
-a
1 N
5 none
-a
2 N
10 none
-a
3 N
20 none
-a
4 N
40 none
#
schmon
schmon
schmon
schmon
Performance Groups
-p 0 L 0 S
-p 1 M 0 S
-p 2 H 0 S
-p 3 R 0 S
100
0.00
0.00
0.00
0.00
none
1
2
3
4
#
AWT Expedited work type limits (reserve maximum)
schmon -w
0
999
Example 2
To dump only Allocation Group parameters, type:
schmon -c -a
116
Allocation Groups
-a
1 N
5 none
-a
2 N
10 none
-a
3 N
20 none
-a
4 N
40 none
Utilities
schmon -d
Purpose
The schmon -d option displays the current Priority Scheduler settings in multi-line format.
Syntax
schmon
-d
1102A024
Usage Notes
The following table describes the Priority Scheduler settings.
Setting category
Description
Resource Partitions
Age Time specifies the time period over which recent resource usage
by a Scheduling Set is measured. The default is 60 seconds.
Active Time specifies the time period during which an Allocation
Group is considered active if any task assigned to the Allocation Group
has been scheduled. Inactive Allocation Groups are not included in
resource consumption calculations. The default is 61 seconds.
Limit specifies the Teradata Database system CPU limit or None if not
specified.
Utilities
117
Setting category
Description
Performance Groups
Allocation Groups
118
Utilities
Example
The following example shows the current Priority Scheduler settings in multi-line format.
> schmon -d
Scheduler Times & Attributes
Age Time(sec):
60
Active Time(sec):
61
Limit(%):
none
Resource Partitions (0 - 4)
Id Partition Name
Weight Limit
0 Default
100
none
Performance Groups (0 - 249)
Id Group Name
RP Type Milestones & Allocation Groups[0-7]
0 L
0 S
0.00
1
1 M
0 S
0.00
2
2 H
0 S
0.00
3
3 R
0 S
0.00
4
Allocation Groups (0 - 199)
Id Type Wght Lim Id Type Wght Lim Id Type Wght Lim Id Type Wght Lim
1 N
5 none
2 N
10 none
3 N
20 none
4 N
40 none
AWT Expedited work type limits
res
max
0
999
Utilities
119
schmon -f
Purpose
The schmon -f option reads schmon commands from a file or standard input device. This
command is most often used in conjunction with the schmon -c command to reapply Priority
Scheduler settings that were in effect at the time schmon -c was run.
Syntax
schmon
-f
path
1102A061
Syntax element
Description
path
Specifies a path from which input is to be read. If path is not specified, data
is read from standard input (STDIN).
Usage Notes
Input data is assumed to be a single file of schmon commands separated by new line
characters. A command that begins with the # character is treated as a comment. Each input
command is written to the standard error device when the command is read. Changes to
Priority Scheduler parameters are accumulated until the end of file is encountered and then
applied to the Teradata Database system.
An error in a command will terminate reading, and no changes will be applied. Errors are
reported on the standard output device.
To simplify creation of a suitable input file, see schmon -c on page 115.
Example
Assume that file sample contains the following lines:
schmon -t
schmon -a
120
10
Utilities
schmon -h
Purpose
The schmon -h option displays help for schmon.
Syntax
schmon
-h
specific option(s)
1102A063
Utilities
Syntax element
Description
specific option(s)
121
schmon -l
Purpose
The schmon -l option displays or sets the Teradata Database system CPU usage limit.
Syntax
schmon
-I
limit
none
1102A066
Syntax element
Description
-l
Displays or sets the system CPU usage limit. If no additional options are
specified, schmon -l displays the current CPU usage limit.
limit
none
Example 1
This sets the Teradata Database system per-node CPU resource limit from 60 percent to none.
>schmon -l none
System CPU Limit(%)
60
>>>>> Changed to:
none
Example 2
This sets the Teradata Database system per-node CPU resource limit from none to 90 percent.
>schmon -l 90
System CPU Limit(%)
none
>>>>> Changed to:
90
122
Utilities
schmon -m
Purpose
The schmon -m option displays or monitors Priority Scheduler resource usage statistics.
Syntax
schmon
-m
-S
-P
-b
-d
delay
reps
-L
1102D067
Syntax element
Description
-m
-S
-L
-P
-b
Displays resource usage over the last second. Without the -b option,
schmon shows resource usage information for the last age time period. The
age time period is defined by the schmon -t command.
-d
Utilities
123
Syntax element
Description
delay [reps]
Usage Notes
The statistics are described in the following table.
Statistics category
Description
Stats Collection
The date and time of the statistics displayed, as well as repetition number, if you specify multiple
repetitions.
Resource Partitions
The statistics for each active Resource Partition, including the following:
RP specifies the Resource Partition ID Number.
Rel Wgt specifies the weight of the Resource Partition relative to the active Resource Partitions.
Note: The sum of relative weights might be greater or less than 100 due to the following
considerations:
124
Utilities
Statistics category
Description
Allocation Groups
The statistics for each active Allocation Group, including the following:
AG specifies the Allocation Group ID number.
Rel Wgt specifies the weight of the Allocation Group relative to the active Allocation Groups of
the Resource Partition and the active Resource Partitions.
Note: The sum of relative weights might be greater or less than 100 due to the following
considerations:
Fractions are truncated as the final step in relative weight calculations.
Any relative weight calculated to be less than one is converted to one.
Avg CPU specifies resource usage by the Allocation Group during the preceding age period for a
single CPU. The CPU data is shown in two columns.
The % column is the percentage of total available CPU on the node consumed by the
Allocation Group. When statistics are collected from all nodes in an MPP system, this is the
average percentage for all nodes.
The msec column is the milliseconds of CPU usage consumed by the group.
Avg I/O specifies a normalized number of data blocks transferred by the Allocation Group. When
statistics are collected from all nodes in an MPP system, this is the average normalized resource
use per Allocation Group for all nodes on the Teradata Database system. I/O data is shown in two
columns.
The % column is the percentage of total I/O blocks transferred by the Allocation Group. When
statistics are collected from all nodes in an MPP system, this is the average percentage for all
nodes.
The sblks column is the number of blocks read and written by the group.
# of Tasks specifies a number of tasks assigned to the Allocation Group at the end of the
proceeding collection period. When statistics are collected from all nodes in an MPP system, this
is the average per Allocation Group for all nodes.
# of Sets specifies a number of Scheduling Sets associated with the Allocation Group at the end of
the preceding collection period. When statistics are collected from all nodes in an MPP system,
this is the total per Allocation Group for all nodes. There is one Scheduling Set per session.
Performance Groups Affected specifies all Performance Groups by name that reference the
Allocation Group at that time. Since Allocation Groups can be shared among Performance
Groups, this information is useful for resource usage traceback. (This information is not
displayed when statistics are collected from all nodes in an MPP system, unless you use the -p
option.)
Note: System information is listed under AG 200. This AG has Rel Wgt set to MAX, which indicates
that system work receives the maximum priority, but is not in any Rel Wgt calculations.
Work Requests
Displays work request statistics for each active Allocation Group. This data refers to the preceding age
period and is the average for all nodes on a multi-node Teradata Database system. The data includes
the following:
AG specifies the Allocation Group number.
# of requests specifies the number of work requests received.
Avg queue wait specifies the average time, in milliseconds, that a work request waited on an input
queue before being serviced.
Avg queue length specifies the average number of work requests waiting on the input queue for
service.
Avg service time specifies average time, in milliseconds, that a work request required for service.
Utilities
125
The count of nodes for a single repetition or for multiple repetitions is displayed.
If a node is offline, it is not be included in the output, and the node count reflects this;
however, information about this node being excluded is not displayed.
A status message that includes time of day regardless of the number of repetitions is
displayed.
Example 1
The following example shows a four-node MPP system.
To monitor current Priority Scheduler statistics for the current node, type:
schmon -m
Example 2
The following example shows a four-node MPP system.
Note: PDE was not up on one of the nodes.
To monitor Priority Scheduler statistics for all nodes with a monitoring interval with a fivesecond delay between repetitions of the display, type:
schmon -m -S 5 1
126
Avg CPU
% (msec)
Mon Mar
8 15:32:33 2004
Avg
Avg
Avg I/O
# of # of
% (sblks) Tasks Sets
Utilities
Avg
Node Resource Usage
# of
Minimum
Maximum
Sets
CPU
I/O Tasks
CPU
I/O Tasks
===== =================== ===================
0
22
0
4
22
0
4
Example 3
The following output is from an SMP configuration. The L option shows information on
CPU usage limits placed AGs by the System/RP/AG limit feature. This information includes a
count of delays imposed on each AG to keep CPU usage within the limits.
To monitor current Priority Scheduler statistics for the current node with information related
to System/RP/AG limits, type:
schmon -m -L
The following table explains the additional columns related to CPU limits and delays.
Utilities
Column
Explanation
Delay Count
The number of delays imposed on tasks in the AG over the Age Period. The
Age Period can be viewed and set using schmon -t.
Delay Skipped
Total Delay
The total number of milliseconds that all tasks in the AG have been delayed
over the Age Period. The Age Period can be viewed and set using
schmon -t.
127
Example 4
The following output is from an SMP configuration.
To monitor current Priority Scheduler statistics for the current node with a monitoring
interval of five seconds and two repetitions, type:
schmon -m 5 2
Example 5
The -P option shows a separate line of information for each Performance Group. The
following example compares the output from schmon -m and schmon -m -P.
>schmon -m
Stats: Mon Oct 30 14:33:19 2006
Rel
Avg CPU
Avg I/O
# of # of
RP Wgt % (msec)
% (sblks) Tasks Sets
=== === === ======= === ======= ===== ===== ==============================
0 66
0
95
0
0
2
1
1 33 24
14911 95
701
144
201
Rel
Avg CPU
Avg I/O
# of # of
AG Wgt % (msec)
% (sblks) Tasks Sets Performance Groups Affected
=== === === ======= === ======= ===== ===== ==============================
4 53
0
95
0
0
2
1 H, R
11 11 11
7180 70
519
49
1 PG10, PG11, PG12
12 22 12
7731 24
182
95
200 PG11, PG12, PG13
200 MAX
2
1709
4
31
140
1 System
Avg queue Avg queue Avg service
AG #requests wait(msec) length
time(msec)
=== ========== ========== ========== ===========
4
157
1.82
0.00
43.15
11
2375
346.68
13.72
259.41
12
4136
206.94
14.27
155.91
>schmon -m -P
Stats: Mon Oct 30 14:33:19 2006
Avg CPU
Avg I/O
# of # of
RP PG % (msec)
% (sblks) Tasks Sets
=== === === ======= === ======= ===== ===== ==============================
128
Utilities
3
10
11
12
13
0
9
10
3
1
95
5623
6256
2020
1012
0
51
24
19
0
0
379
182
140
0
1
19
51
30
22
1
36
61
98
111
Avg CPU
Avg I/O
# of # of
AG PG % (msec)
% (sblks) Tasks Sets Performance Groups Affected
=== === === ======= === ======= ===== ===== ==============================
4
3
0
95
0
0
1
1 R
11 10
9
5623 51
379
19
36 PG10
11 11
0
487
0
0
19
47 PG11
11 12
1
1070 19
140
0
43 PG12
12 11
9
5769 24
182
32
14 PG11
12 12
1
950
0
0
30
55 PG12
12 13
1
1012
0
0
22
111 PG13
200 40
2
1709
4
31
140
1 System
Avg queue Avg queue Avg service
AG PG #requests wait(msec) length
time(msec)
=== === ========== ========== ========== ===========
4
3
157
1.82
0.00
43.15
11 10
1205
266.38
5.35
818.12
11 11
1158
433.82
8.37
525.99
12 11
63
31.75
0.03
5313.52
12 12
1946
216.07
7.01
262.16
12 13
2113
205.12
7.22
300.01
Example 6
The following example displays changes in data over time using the default delay time of five
seconds.
> schmon -m -d
Using default 5 second delay.
Stats: Thu Feb 08 18:24:13 2007
Rel
Avg CPU
Avg I/O
# of # of
RP Wgt % (msec)
% (sblks) Tasks Sets
=== === === ======= === ======= ===== ===== ==============================
0
0
0
-3
0
0
4
0
1
0
1
652
1
123 -143
0
Rel
Avg CPU
Avg I/O
# of # of
AG Wgt % (msec)
% (sblks) Tasks Sets Performance Groups Affected
=== === === ======= === ======= ===== ===== ==============================
2
0
0
-1
0
0
0
0 M
4
0
0
-2
0
0
4
0 R
10
0 -2
-1006 -4
-125
21
0 PG10, PG11, PG12
11
0
3
1781
6
296 -230
0 PG10, PG11, PG12
12
0
1
661 -1
15
36
0 PG10, PG11, PG12
13
0 -1
-784 -2
-63
30
0 PG10, PG11, PG12
200 MAX -1
-232 -1
-13
0
0 System
Avg queue Avg queue Avg service
AG #requests wait(msec) length
time(msec)
=== ========== ========== ========== ===========
4
-1
-17.71
-0.09
-5.79
10
-809
3.56
0.14
11.41
11
-14
0.03
-0.00
1668.90
12
-624
3.17
-0.03
8.24
13
-418
21.21
1.20
2.81
Utilities
129
schmon -M
Purpose
The schmon -M option displays or monitors Priority Scheduler resource usage statistics for all
nodes of an MPP Teradata Database.
Syntax
schmon
-M
-n
-p
-P
-s
-V
-b
-d
delay
reps
1102D068
Syntax element
Description
-M
-n
Show names for nodes that have the minimum and maximum resource
usage and work requests. The displayed names come from the mpplist file.
Due to space limitations, names longer than nine characters may be
truncated.
-p
-s
-V
-P
-b
130
Displays resource usage over the last second. Without the -b option,
schmon shows resource usage information for the last age time period. The
age time period is defined by the schmon -t command.
Utilities
Syntax element
Description
-d
Displays the differences in data between sequential runs of schmon. Use the
delay [reps] option to control timing of automatic schmon runs.
The following symbols precede numbers that appear in the output from the
-d option.
- (a minus sign) indicates the value has decreased by the indicated
amount since the previous schmon run.
An unsigned number indicates the value has increased by the indicated
amount since the previous schmon run.
For examples of the -d option output, see schmon -m on page 123.
Note: The output of the -d option shows only those items for which data
has changed since the previous schmon run.
delay [reps]
Usage Notes
You can type this command from any node in an MPP system. The statistics are described in
the following table.
Statistics category
Description
Stats
The date and time of the statistics displayed, as well as repetition number, if you specify multiple
repetitions.
Utilities
131
Statistics category
Description
Resource Partitions
The statistics for each active Resource Partition, including the following:
RP specifies the Resource Partition ID Number.
Rel Wgt specifies the weight of the Resource Partition relative to the active Resource Partitions.
Note: The sum of relative weights might be greater or less than 100 due to the following
considerations:
132
Utilities
Statistics category
Description
Allocation Groups
The statistics for each active Allocation Group, including the following:
AG specifies the Allocation Group ID Number.
Rel Wgt specifies the weight of the Allocation Group relative to the active Allocation Groups of
the Resource Partition and the active Resource Partitions.
Note: The sum of relative weights might be greater or less than 100 due to the following
considerations:
Fractions are truncated as the final step in relative weight calculations.
Any relative weight calculated to be less than one is converted to one.
Avg CPU specifies the resource usage by the Allocation Group during the preceding age period
for a single CPU. The CPU data is shown in two columns.
The % column is the percentage of total available CPU on the node consumed by the
Allocation Group. When statistics are collected from all nodes in an MPP system, this is the
average percentage for all nodes.
The msec column is the milliseconds of CPU usage consumed by the Allocation Group.
Avg I/O specifies a normalized number of data blocks transferred by the Allocation Group. When
statistics are collected from all nodes in an MPP system, this is the average normalized resource
use per Allocation Group for all nodes on the Teradata Database system. I/O data is shown in two
columns.
The % column is the percentage of total I/O blocks transferred by the Allocation Group.
When statistics are collected from all nodes in an MPP system, this is the average percentage
for all nodes.
The sblks column is the number of blocks read and written by the Allocation Group.
Avg # of Tasks specifies the number of tasks assigned to the Allocation Group at the end of the
preceding collection period. When statistics are collected from all nodes in an MPP system, this is
the average per Allocation Group for all nodes.
Avg # of Sets specifies number of Scheduling Sets associated with the Allocation Group at the end
of the preceding collection period. When statistics are collected from all nodes in an MPP system,
this is the average per Allocation Group for all nodes. There is one Scheduling Set per session.
When you submit the -M command on an MPP system, the following minimum and maximum
values are displayed:
Minimum CPU specifies the lowest value in milliseconds of CPU resource usages from all nodes.
Minimum I/O specifies lowest value of I/O data blocks transferred from all nodes in sblks.
Minimum Tasks specifies the lowest number of tasks from all nodes.
Maximum CPU specifies the highest value in milliseconds of CPU resource usage from all nodes.
Maximum I/O highest value of I/O data blocks transferred from all nodes in sblks.
Maximum Tasks highest number of tasks from all nodes.
When you submit the -M command or specify the -p option on an SMP system, the affected
Performance Groups are displayed instead of the minimum and maximum values:
Performance Groups Affected specifies all Performance Groups by name that reference the
Allocation Group at that time. Since Allocation Groups can be shared among Performance
Groups, this information is useful for resource usage traceback. (This information is not
displayed when statistics are collected from all nodes in an MPP system unless you use the -p
option.)
Note: System information is listed under AG 200. This AG has Rel Wgt set to MAX, which indicates
that system work receives the maximum priority, but is not in any Rel Wgt calculations.
Utilities
133
Statistics category
Description
Work Requests
Displays work request statistics for each active Allocation Group. This data refers to the preceding
age period and is the average for all nodes on a multi-node Teradata Database system. The data
includes the following:
AG specifies the Allocation Group number.
# of requests specifies the number of work requests received.
Avg queue wait specifies the average time, in milliseconds, that a work request waited on an
input queue before being serviced.
Avg service time specifies average time, in milliseconds, that a work request required for service.
The count of nodes for a single repetition or for multiple repetitions is displayed.
If a node is offline, it is not be included in the output, and the node count reflects this;
however, information about this node being excluded is not displayed.
A status message that includes time of day regardless of the number of repetitions is
displayed.
Example 1
schmon -M
Stats: 4 node(s)
Avg
Rel
Avg CPU
Avg I/O
# of
RP Wgt % (msec)
% (sblks) Tasks
== === === ======= === ======= =====
0 100
8
5059 94
1362
10
Avg
Node Resource Usage
# of
Minimum
Maximum
Sets
CPU
I/O Tasks
CPU
I/O Tasks
===== ====== ===== ===== =============== ======
1 997
1224
9
17120
1611
11
Avg
Rel
Avg CPU
Avg I/O
# of
Wgt % (msec)
% (sblks) Tasks
=== === ======= === ======= =====
13
8
5059 94
1362
10
MAX
2
1577
5
73
83
Avg
Node Resource Usage
# of
Minimum
Maximum
Sets
CPU
I/O Tasks
CPU
I/O Tasks
===== ====== ===== ===== =============== ======
1 997
1224
9
17120
1611
11
1 211
63
82
5569
87
85
AG
==
2
200
134
Utilities
Example 2
The following example shows a four-node MPP system with one node where PDE is NULL.
Note: PDE was not up on one of the nodes.
To monitor Priority Scheduler statistics for all nodes with a five-second delay between two
repetitions of the display, type:
schmon -M 5 2
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
RP Wgt % (msec)
% (sblks) Tasks Sets CPU
I/O Tasks CPU
I/O Tasks
=== === === ======= === ======= ===== ===== ================= ==================
0 100
0
29
0
0
20
1
4
0
1 85
0
57
AG
===
2
4
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
Wgt % (msec)
% (sblks) Tasks Sets CPU
I/O Tasks CPU
I/O Tasks
=== === ======= === ======= ===== ===== ================= ==================
18
0
29
0
0
1
0
4
0
1 83
0
3
72
0
0
0
0
19
0
2
0
57
2
0
57
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
RP Wgt % (msec)
% (sblks) Tasks Sets CPU
I/O Tasks CPU
I/O Tasks
=== === === ======= === ======= ===== ===== ================= ==================
0 100
0
54
0
0
20
1
1
0
1 154
0
57
AG
===
2
4
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
Wgt % (msec)
% (sblks) Tasks Sets CPU
I/O Tasks CPU
I/O Tasks
=== === ======= === ======= ===== ===== ================= ==================
18
0
54
0
0
1
1
1
0
1 152
0
3
72
0
0
0
0
19
0
2
0
57
2
0
57
Example 3
The following example shows a four-node MPP system with one node where PDE is NULL.
This display also appears if you execute the -M command (with or without the -p option) on
an SMP system.
Note: PDE was not up on one of the nodes.
To display Performance Group names associated with the Allocation Groups that are
displayed with the -M command on an MPP system, type:
schmon -M -p
Utilities
135
Avg
Rel
Avg CPU
Avg I/O
# of
RP Wgt % (msec)
% (sblks) Tasks
=== === === ======= === ======= =====
0 100
0
44
0
0
1
Avg
# of
Sets
===== ==============================
1
Avg
Rel
Avg CPU
Avg I/O
# of
AG Wgt % (msec
% (sblks) Tasks
=== === === ======= === ======= =====
2 18
0
44
0
0
1
Avg
# of
Sets Performance Groups Affected
===== ==============================
1 M
Example 4
To display the names of the nodes that have the minimum and maximum resource usage,
type:
schmon -M -n
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
RP Wgt % (msec)
% (sblks) Tasks Sets
CPU
I/O Tasks
CPU
I/O Tasks
=== === === ======= === ======= ===== ===== ===================== ===================
0 100
8
5059 94
1362
10
1
997
1224
9
17120
1611
11
AG
===
2
200
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
Wgt % (msec)
% (sblks) Tasks Sets
CPU
I/O Tasks
CPU
I/O Tasks
=== === ======= === ======= ===== ===== ===================== ===================
13
8
5059 94
1362
10
1
997
1224
9
17120
1611
11
MAX
2
1577
5
73
83
1
211
63
82
5569
87
85
Node Names:
RP/AG CPU_min
===== ==========
RP0
tnt45_byne
AG2
tnt45_byne
AG200 tnt44_byne
CPU_max
==========
tnt47_byne
tnt47_byne
tnt47_byne
I/O_min
==========
tnt47_byne
tnt47_byne
tnt45_byne
I/O_max
==========
tnt46_byne
tnt46_byne
tnt47_byne
Tasks_min
==========
tnt45_byne
tnt45_byne
tnt45_byne
Tasks_max
==========
tnt44_byne
tnt44_byne
tnt44_byne
136
Names:
Rqsts_min
=========
tnt44_byn
tnt46_byn
Rqsts_max
=========
tnt47_byn
tnt47_byn
QWait_min
=========
tnt46_byn
tnt46_byn
QWait_max
=========
tnt47_byn
tnt47_byn
QLen_min
=========
tnt46_byn
tnt46_byn
QLen_max
=========
tnt47_byn
tnt47_byn
STime_min
=========
tnt44_byn
tnt46_byn
STime_max
========
tnt47_byn
tnt47_byn
Utilities
Example 5
To show RP and AG resource usage statistics, type:
schmon -M -s
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
RP Wgt % (msec)
% (sblks) Tasks Sets
CPU
I/O Tasks
CPU
I/O Tasks
=== === === ======= === ======= ===== ===== ===================== ===================
0 100
7
4637 95
1425
9
1
850
1203
9
15811
1608
11
AG
===
2
200
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
Wgt % (msec)
% (sblks) Tasks Sets
CPU
I/O Tasks
CPU
I/O Tasks
=== === ======= === ======= ===== ===== ===================== ===================
15
7
4637 95
1425
9
1
850
1203
9
15811
1608
11
MAX
2
1778
4
68
83
1
88
57
82
6652
81
85
Statistics:
RP 0 (4 Active Nodes):
CPU Median: 943.50
StdDev: 6451.43
Range
Freq
======================
850-2346
3
14323-15819
1
AG 2 (4 Active Nodes):
CPU Median: 943.50
StdDev: 6451.43
Range
Freq
======================
850-2346
3
14323-15819
1
AG 200 (4 Active Nodes):
CPU Median: 187.00
StdDev: 2814.08
Range
Freq
======================
88-744
3
6001-6657
1
Utilities
137
Example 6
To show statistics in verbose mode, which includes inactive nodes, type:
schmon -M -s -V
AG
===
2
3
4
200
Avg
Avg
Node Resource Usage
Rel
Avg CPU
Avg I/O
# of # of
Minimum
Maximum
Wgt % (msec)
% (sblks) Tasks Sets
CPU
I/O Tasks
CPU
I/O Tasks
=== === ======= === ======= ===== ===== ===================== ===================
13 11
6973 93
2422
10
1
2559
2273
9
19638
2602
12
26
0
92
0
0
2
1
92
0
2
92
0
2
53
0
11
0
0
0
1
11
0
0
11
0
0
MAX
3
2196
6
174
83
1
428
160
82
7351
189
85
Statistics:
RP 0 (4 Active Nodes):
CPU Median: 2849.00
StdDev: 7359.65
Range
Freq
======================
2559-4277
3
18030-19748
1
AG 2 (4 Active Nodes):
CPU Median: 2849.00
StdDev: 7315.07
138
Utilities
AG 3 (1 Active Node):
CPU Median: 92.00
StdDev: 0.00
Range
Freq
======================
92-92
1
Range
Freq
======================
9-9
1
10-10
1
11-11
1
12-12
1
Tasks Median: 2.00
StdDev: 0.00
Range
Freq
======================
2-2
1
AG 3 (All Nodes):
CPU Median: 0.00
StdDev: 39.84
AG 4 (1 Active Node):
CPU Median: 11.00
StdDev: 0.00
Range
Freq
======================
11-11
1
Range
Freq
======================
0-0
1
Range
Freq
======================
0-0
1
AG 4 (All Nodes):
CPU Median: 0.00
StdDev: 4.76
Range
Freq
======================
428-1120
3
6665-7357
1
Utilities
Range
Freq
======================
2273-2305
2
2504-2536
1
2570-2602
1
Range
Freq
======================
160-162
1
163-165
1
184-186
1
Range
Freq
======================
82-82
2
83-83
1
85-85
1
139
schmon -p
Purpose
The schmon -p option sets or displays Performance Group parameters.
Syntax
schmon
-p
PG#
PGNAME
-s
-S
R
-T
PP
-d
delay
reps
-x
1102G010
Syntax Element
Description
-p
PG#
An integer from 0 through 249 that identifies the Performance Group for which
parameters will be set or displayed.
To set parameters for a Performance Group, follow PG# with the PGName, R,
T, and PP specifications.
To view information about a specific Performance Group, follow PG# with
the -s or -S options, or with no options.
To clear all parameters for a specific Performance Group, follow PG# with the
-x option.
140
PGNAME
Specifies the name of the Performance Group with the Resource Partition.
Names with spaces must be enclosed in apostrophes.
Utilities
Syntax Element
Description
Specifies a single character that indicates the milestone type used in the
Performance Period definitions for that Performance Group, where:
Q indicates that milestone units are seconds (1 - 86400) of query resource
usage. Each query submitted by a session begins a new resource usage
accumulation at the first Performance Period defined for the Performance
Group.
R or S indicates that milestone units are seconds (1 - 86400) of session
resource usage. These two characters are equivalent.
T indicates that milestone units are time-of-day, in military time (0-2359).
Time-of- day units can be optionally preceded by a day-of-week indicator.
Day-of-week format is:
'/d1-d2/ or /d1,d2,...dn/'. Valid values for day are 0(Sun)-6(Sat). For
example, '/3-5/' indicates that the associated Performance Period would be
active Wednesday through Friday.
PP
Utilities
.01
2.5
3.1415
200
-s
Displays Priority Scheduler data for all sessions controlled by the Performance
Group on the current node.
-S
Displays Priority Scheduler data for all sessions controlled by the Performance
Group on all nodes of the Teradata Database system.
141
Syntax Element
Description
-T
Displays tasks (threads) for the specified Performance Group on the current
node (the node from which schmon was invoked). Even when used in
conjunction with the -S option, -T will display only task data for the current
node.
Note: The -T option should not be used for prolonged periods of time, because
it can interfere with the normal operation of Priority Scheduler.
The -T output includes the following columns:
-d
Displays the differences in data between sequential runs of schmon. Use the
delay [reps] option to control timing of automatic schmon runs.
The following symbols precede numbers that appear in the output from the -d
option.
For decimal numbers:
- (a minus sign) indicates the value has decreased by the indicated
amount since the previous schmon run.
An unsigned decimal number indicates the value has increased by the
indicated amount since the previous schmon run.
For task data (displayed if the -T option is used with the -d option):
n-> indicates a task has been moved from the control of AG n to the
control of the displayed AG since the previous schmon run.
+ indicates a task is new, started since the previous schmon run.
- indicates a task that ended since the previous schmon run.
* indicates a task that has changed sessions or requests since the
previous schmon run.
For examples of the -d option output, see schmon -m on page 123, and
schmon -s on page 145.
Note: The output of the -d option shows only those items for which data has
changed since the previous schmon run.
142
Utilities
Syntax Element
Description
delay [reps]
Causes schmon -p to run again automatically after a specified delay using the
current session options. delay is a positive integer that specifies the number of
seconds between schmon executions.
Use the optional reps argument, a positive integer, to specify the number of
times schmon should run. If reps is not specified, schmon runs indefinitely with
delay seconds between executions. In this case, schmon can be stopped by
pressing Ctrl-C or otherwise killing the schmon process.
Note: The difference between time stamps of successive information displays
may not precisely match the specified delay value due to the time required for
the collection activity itself.
-x
Clears the parameters that define the specified Performance Group, effectively
deleting it from the system (though an empty group will still appear in the
output of schmon -p all).
The Teradata Database must be in the logons enabled state to delete a
Performance Group. The Performance Group must not be referenced by any
system user.
Under certain circumstances, the deletion process of a Performance Group
within schmon may be rejected and the cleanup process may not be executed
successfully. In this situation, any subsequent attempts to delete the
Performance Group will fail and the following error message is reported:
schmon -p 4 -x
schmon: Performance Group is in remove state
command.
Recreating the Performance Group clears the remove status.
2 Delete the Performance Group created in step one by executing the proper
Usage Notes
If a Performance Group has only a single Performance Period, the milestone limit must be
zero.
If a Performance Group has multiple Performance Periods, the milestone limit of the final
Performance Period must be zero.
Utilities
143
The count of nodes for a single repetition or for multiple repetitions is displayed.
If a node is offline, it is not be included in the output, and the node count reflects this;
however, information about this node being excluded is not displayed.
A status message that includes time of day regardless of the number of repetitions is
displayed.
Example 1
To display session data for sessions assigned to Performance Group 1, type:
schmon -p 1 -s
Example 2
Suppose you want to provide different levels of service on weekdays, Saturday, and Sunday.
On weekdays, one Performance Period is in effect between 0800 and 1800, another beginning
at 1800 and continuing until 0800 the next morning.
On Saturday the Performance Period from 1800 on Friday continues until 1400 and then
switches to another Performance Period that continues through Sunday and on until 0800
Monday morning. The Performance Period specification is as follows, where day of the week is
denoted by enclosing / characters, as shown below:
/1-5/ 1800 2 Monday through Friday, use AG 2 until 1800. After 1800, use the next higher
period.
/6/ 1400 7 Saturday, use AG 7 until 1400. After 1400, use the next Performance Period,
which is the one specified for 0800 Monday that uses AG 5.
/6/ 1800 7
144
Group Name
M
2 /6/ 1800
Utilities
schmon -s
Purpose
The schmon -s option displays Priority Scheduler data for the specified sessions from the
current node or all nodes in the Teradata Database system.
Syntax
schmon
-s
all
-S
-T
-d
delay
reps
id
1102E071
Syntax Element
Description
-s
all
id
A positive integer that identifies a session for which Priority Scheduler data
will be displayed.
-S
-T
Displays tasks (threads) for the specified sessions on the current node (the
node from which schmon was invoked). Even when used in conjunction
with the -S option, -T will display only task data for the current node.
Note: The -T option should not be used for prolonged periods of time,
because it can interfere with the normal operation of Priority Scheduler.
The -T output includes the following columns:
Utilities
145
Syntax Element
Description
-d
Displays the differences in data between sequential runs of schmon. Use the
delay [reps] option to control timing of automatic schmon runs.
The following symbols precede numbers that appear in the output from the
-d option.
For decimal numbers:
- (a minus sign) indicates the value has decreased by the indicated
amount since the previous schmon run.
An unsigned decimal number indicates the value has increased by the
indicated amount since the previous schmon run.
For task data (displayed if the -T option is used with the -d option):
n-> indicates a task has been moved from the control of AG n to the
control of the displayed AG since the previous schmon run.
+ indicates a task is new, started since the previous schmon run.
- indicates a task that ended since the previous schmon run.
* indicates a task that has changed sessions or requests since the
previous schmon run.
Note: The output of the -d option shows only those items for which data
has changed since the previous schmon run.
delay [reps]
Causes schmon -s to run again automatically after a specified delay using the
current options. delay is a positive integer that specifies the number of
seconds between schmon executions.
Use the optional reps argument, a positive integer, to specify the number of
times schmon should run. If reps is not specified, schmon runs indefinitely
with delay seconds between executions. In this case, schmon can be stopped
by pressing Ctrl-C or otherwise killing the schmon process.
The difference between time stamps of successive information displays may
not precisely match the specified delay value due to the time required for the
collection activity itself.
Note: The delay option cannot be used alone with schmon -s. It must be
preceded by one or more of the id, all, -S, -T, or -P options.
Usage Notes
schmon -s displays the following columns:
146
Column
Description
AG
Host ID
Session
Request
#tsk
Utilities
Column
Description
CPU(msec)
DSK(blk)
Number of disk blocks transferred by the session or request during the previous
age period.
RP
PG
[PP]
Example 1
In this example and the following examples, session 0 indicates a session performing system
utility functions that might have tasks running in several allocation groups.
To display Priority Scheduler data for the specified sessions from the current node or all nodes
in the Teradata Database system, type:
schmon -s
8 15:49:57 2008
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
1
0
0
0
9
70
10250
70
10250
0 L[0]
2
0
0
0
2
2640
0
2640
0
0 M[0]
4
0
0
0
1
1
0
1
0
0 R[0]
Utilities
147
Example 2
The -T option displays per-AG task (thread) information for the specified sessions. This
example shows a portion of the output from a Linux system.
schmon -s all -T
Stats: Fri Feb
5 13:50:32 2010
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
5
1025
1000
4
9
245516
165488
245488
165488
1 PG5[0]
5
1025
1001
3
9
164620
103089
164600
103089
1 PG5[0]
Tsk Addr
Tskid Prio Session Request
Tskuse Setterm # Delay Delay Time
==================== ====== ==== ======= ======= ========== ======= ======= ==========
0xffffc20013310c20
8004 126
1000
4
28
78
0
0
0xffffc20011f6e420
8485 126
1000
4
30172
78
0
0
0xffffc20011fee620
8467 126
1000
4
29576
78
0
0
0xffffc20018484e20
8457 126
1000
4
30240
78
0
0
0xffffc20011f6f220
8492 129
1001
3
19460
100
0
0
0xffffc20013332720
8522 129
1001
3
23316
100
0
0
0xffffc20018486320
8473 129
1001
3
19872
100
0
0
0xffffc200135c6020
8520 129
1001
3
24208
100
0
0
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
200
0
0
0 554
32912
3795
3532
211
0 System[0]
200
0
6146
11
0
0
0
0
0
0 System[0]
200
0
6147
9
0
0
0
0
0
0 System[0]
200
0
6280
1002
0
0
0
0
0
0 System[0]
200
0
6284
1003
0
0
0
0
0
0 System[0]
200
0
6285
1003
0
0
0
0
0
0 System[0]
Tsk Addr
Tskid Prio Session Request
Tskuse Setterm # Delay Delay Time
==================== ====== ==== ======= ======= ========== ======= ======= ==========
0xffffc20011be0020
7015 116
0
0
0
0
0
0
0xffffc20011be0720
7136 116
0
0
0
0
0
0
0xffffc20011be0e20
7137 116
0
0
0
0
0
0
0xffffc20011be1520
7138 116
0
0
0
0
0
0
0xffffc20011be1c20
7139 116
0
0
124
0
0
0
0xffffc20011e74720
7144
1
0
0
0
0
0
0
0xffffc20011f2a020
7142
1
0
0
0
0
0
0
Example 3
This example displays differences in session data over three automatic runs of schmon spaced
five seconds apart.
> schmon -s -d 5 3
Stats Collection #1: Mon Aug 04 17:53:14 2008
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
200
0
0
0
0
1710
12
1710
12
0 System[0]
Stats Collection #2: Mon Aug 04 17:53:19 2008
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
200
0
0
0
0
1545
0
1545
0
0 System[0]
Stats Collection #3: Mon Aug 04 17:53:24 2008
No difference in data this period
148
Utilities
Example 4
This example shows a portion of the output that displays differences in session data over three
automatic runs of schmon spaced five seconds apart, and includes information on tasks for
the current node.
schmon -s -T -d 5 3
Stats Collection #1: Fri Feb
5 14:13:22 2010
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
5
1025
1000
5
-2
2796
1724
2796
1724
1 PG5[0]
5
1025
1001
4
0
7396
5288
7396
5288
1 PG5[0]
Tsk Addr
Tskid Prio Session Request
Tskuse Setterm # Delay Delay Time
==================== ====== ==== ======= ======= ========== ======= ======= ==========
0xffffc20013a4b320
10425
0
1000
5
640
0
5
3724
0xffffc20013a49720
10428
2
1001
4
1064
11
5
3724
5 14:13:27 2010
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
5
1025
1000
5
0
176
116
176
116
1 PG5[0]
5
1025
1001
4
0
220
148
220
148
1 PG5[0]
Tsk Addr
Tskid Prio Session Request
Tskuse Setterm # Delay Delay Time
==================== ====== ==== ======= ======= ========== ======= ======= ==========
0xffffc20013a4b320
10425
-1
1000
5
44
-5
5
4956
0xffffc20013a49720
10428
1
1001
4
28
11
5
4956
5 14:13:32 2010
Session Usage
Query Usage
AG HostID
Session
Request #tsk CPU(msec)
DSK(blk) CPU(msec)
DSK(blk) RP PG [PP]
=== ====== ========== ========== ==== ========== ========== ========== ========== === ===============
5
1025
1000
5
-1
2648
1738
2648
1738
1 PG5[0]
5
1025
1001
4
0
3920
2758
3920
2758
1 PG5[0]
Tsk Addr
Tskid Prio Session Request
Tskuse Setterm # Delay Delay Time
==================== ====== ==== ======= ======= ========== ======= ======= ==========
- 0xffffc20013a4b320
10425 -128
1000
5
-35856
-95
-44
-33800
0xffffc20013a49720
10428
0
1001
4
380
0
5
4376
Utilities
149
schmon -t
Purpose
The schmon -t option sets or displays Age Time, Active Time, and Dispatch Wait Time.
Syntax
schmon
-t
age
active
disp
1102C072
Syntax element
Description
-t
Sets or displays Age Time, Active Time, and Dispatch Wait Time.
If no additional options are specified, schmon -t displays the current settings. If
any options are specified, all three options must be specified, regardless of
operating system.
age
Age Time. The time period, in seconds, over which recent Allocation Group
resource usage is measured.
The range is 1 to 60 seconds. The default is 60 seconds.
active
Active Time. The time period, in seconds, during which an Allocation Group is
considered active if any task assigned to the Allocation Group has been scheduled.
Inactive Allocation Groups are not included in resource consumption
calculations.
The range is 1 to 1800 seconds. The default is 61 seconds.
disp
Note: This option is meaningful only on Linux. The Dispatcher Wait Timer is
also known as the anti-starvation mechanism.
Dispatch Wait Time. The maximum period of time, in seconds, that a task can
wait in a ready-for-execution state in a dispatch queue without receiving access to
a CPU. After this time, the task priority is increased and its wait period is reinitialized.
The range is -1 through 127. The default is 4 seconds.
The following values apply:
0 specifies that the Dispatch Wait Time be set to the factory default of four
seconds.
-1 specifies that the Dispatch Wait Timer be disabled.
Note: The Dispatch Wait Timer is enabled by default.
Caution:
Teradata recommends that you do not use this setting unless absolutely
necessary.
1 -127 specifies a wait period in seconds.
150
Utilities
Example
To view the current settings, type:
schmon -t
60
Active Time(sec):
61
Disp Age(sec):
Utilities
Active Time(sec):
61
Disp Age(sec):
Active Time(sec):
31
Disp Age(sec):
151
schmon -w
Purpose
The schmon -w option sets or displays the number of tasks available on each vproc for use by
work requests assigned to Allocation Groups having the Expedite attribute.
Syntax
schmon
-w
reserve
maximum
HH01A011
Syntax element
Description
-w
Sets or displays the number of tasks available on each vproc for use by work requests assigned to
Allocation Groups having the Expedite attribute.
Without options, schmon -w displays the current settings.
reserve
A number from 0 through 20, that indicates the number of AWTs reserved within each AMP for work
requests assigned to Allocation Groups having the EXPEDITE attribute.
This reserve ensures that at least this specified number of AWTs will be ready to service a work request
when it arrives. When the number of expedited work requests exceeds this reserve, arriving expedited
work requests might be forced to wait in an input queue, depending on overall work load conditions.
This reserve determines the minimum number of expedited work requests that will run concurrently.
This reserve, multiplied by three, is deducted from the general pool of AWTs and will impact the
number of tasks available for normal non-expedited work requests.
Teradata recommends the following:
Initially select a low number for reserve (1-3).
Expedite only Allocation Groups supporting short, response-sensitive queries.
maximum
A number between 1 and 999, inclusive, that indicates the maximum number of AWTs that can run at
any time.
The number of tasks that run might be less than this maximum, depending on the current limit. Since
the special reserve work type supports new work, similar to MSGWORKNEW, one reasonable setting
for the parameter is the same as the MSGWORKNEW maximum(50).
Note: Since most systems have a practical limit of 80 AMP worker tasks per AMP that can be supported
at any one time, the 999 value has no real function.
152
Utilities
Usage Notes
The Expedite attribute is defined by an Allocation Group. For more information see Expedite
Attribute on page 94 and AMP Worker Task (AWT) Reservations and Limits on page 98.
Consider scripting a set of schmon commands for each restoration and maintenance.
Example 1
To display the number AWTs reserved within each AMP vproc for work requests assigned to
Allocation Groups having the EXPEDITE attribute and the maximum number of AWTs that
can run at any time, type:
schmon -w
max
999
Example 2
To set the number AWTs reserved within each AMP vproc for work requests assigned to
Allocation Groups having the EXPEDITE attribute and the maximum number of AWTs that
can run at any time, type:
schmon -w 5 10
max
999
Utilities
153
154
Utilities
CHAPTER 22
The Query Configuration utility, qryconfig, reports the current Teradata Database system
configuration from a Teradata Database system console running the Database Window or
from a host terminal. This configuration is defined using the Configuration and
Reconfiguration utilities. For more information on the Configuration utility, see Utilities
Volume 1. For more information on the Reconfiguration Utility, see Chapter 25:
Reconfiguration Utility (reconfig).
The Query Configuration utility is also referred to as Configuration Display.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Display Options
The Query Configuration utility can display a variety of status and configuration information
for the entire Teradata Database system or portions of the system including the following:
Utilities
155
Complete configuration
ALL
Processors
Online processors
Offline processors
AMPs
Online AMPS
Offline AMPs
PEs
Online PEs
Offline PEs
In a large Teradata Database system configuration, use discretion when selecting the All,
AMPs, and Online AMPs options, because of the potentially large numbers of output lines
that may be produced.
Instead of the All, AMPs, and Online AMPs options, consider Processor level options or the
Offline AMPs and Offline PEs options when the configuration is large, to avoid having to deal
with large numbers of Query Configuration output lines consuming valuable space and time
resources.
ALL Option
To produce a display of all the components in the Teradata Database system and their current
status, use the ALL option. The following is an example of an ALL display.
Enter display option,
all
156
Vproc
Node Config Config Cluster/
Number
ID
Type Status Host No.
------ ------- ---- -------- -------1
1-01 AMP Online
0
3
1-01 AMP Online
1
Utilities
1-01
1-01
1-01
1-01
1-01
1-01
1-01
1-01
1-01
1-01
AMP
AMP
AMP
AMP
AMP
AMP
AMP
AMP
PE
PE
Online
Online
Online
Online
Online
Online
Online
Online
Online
Online
2
3
4
5
6
7
8
9
1
5
7
9
11
13
15
17
19
16381
1-01
1-01
1-01
1-01
1-01
1-01
1-01
1-01
1-01
AMP
AMP
AMP
AMP
AMP
AMP
AMP
AMP
PE
Online
Online
Online
Online
Online
Online
Online
Online
Online
2
3
4
5
6
7
8
9
1
The information in the ALL display is ordered by vproc number. The display shows the
following for each vproc:
The identifier (Node ID) of the Node associated with each vproc (virtual processor).
The status (online or offline) of each vproc. A status of Online means that the associated
Node is available and online to the operating system.
The cluster (for an AMP) or host number (for a PE) associated with each vproc.
Processors Option
To obtain configuration information for all processors in the Teradata Database system, use
the Processors option. This option produces a display identical to that produced by the ALL
Option on page 156.
Utilities
Node
Config Cluster/
ID
Type HostId
------- ---- -------1-01
AMP
0
1-01
AMP
1
1-01
AMP
2
1-01
AMP
3
1-01
AMP
4
1-01
AMP
5
1-01
AMP
6
1-01
AMP
7
1-01
AMP
8
1-01
AMP
9
1-01
PE
1
Vproc
Number
-----1
3
5
7
9
11
13
15
17
19
16381
Node
Config Cluster/
ID
Type Host No.
------- ---- -------1-01
AMP
0
1-01
AMP
1
1-01
AMP
2
1-01
AMP
3
1-01
AMP
4
1-01
AMP
5
1-01
AMP
6
1-01
AMP
7
1-01
AMP
8
1-01
AMP
9
1-01
PE
1
157
1-01
PE
16383
1-01
PE
To obtain configuration information for offline processors, use the Offline Processors option.
The information displayed is similar to that for all processors, but the Status column does not
appear, since only offline processors are displayed.
AMPs Option
To obtain configuration information for all AMPs in the Teradata Database system, use the
AMPs option. It produces a display containing AMP numbers, node identifiers, status (online
or offline), and cluster numbers. The following is an example of an AMPs configuration
display.
Enter display option,
amps
Vproc
Node Config Config Cluster/
Number
ID
Type Status Host No.
------ ------- ---- -------- -------1
1-01 AMP Online
0
3
1-01 AMP Online
1
5
1-01 AMP Online
2
7
1-01 AMP Online
3
9
1-01 AMP Online
4
11
1-01 AMP Online
5
13
1-01 AMP Online
6
15
1-01 AMP Online
7
17
1-01 AMP Online
8
19
1-01 AMP Online
9
PEs Option
To obtain configuration information for all PEs in the Teradata Database system, use the PEs
option. It produces a display containing PE numbers, node identifiers, status (online or
offline), and host numbers. The following is an example of a PEs configuration display.
158
Utilities
Vproc
Node Config Config Cluster/
Number
ID
Type Status Host No.
------ ------- ---- -------- -------16381
1-01 PE
Online
1
16383
1-01 PE
Online
1
Getting HELP
To produce a list of all of the Query Configuration options, type HELP or question mark (?).
The list of options appears as follows:
Enter display option,
help
As indicated in the HELP option list, type a keyword to produce the desired display.
Utilities
159
160
Utilities
CHAPTER 23
The Query Session utility, qrysessn, provides information about active Teradata Database
sessions. It allows you to monitor the state of all or selected database sessions on all or selected
logical host IDs attached to the Teradata Database. Query Session is also known as Session
States.
This chapter provides an overview of the information Query Session reports as well as several
sample Query Session displays.
Because the Query Session displays for sessions involved in Archive and Recovery, FastLoad,
MultiLoad (MLOAD), and FastExport operations are different from other session displays,
these displays are described at the end of this chapter.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Utilities
Indicates that...
ABORTING
ACTIVE
the session has sent steps to the dispatcher and possibly to one or
more AMP vprocs.
BLOCKED
DELAYED
161
Indicates that...
IDLE
INDOUBT
INDOUBT PARSING
PARSING
the session is active in the Teradata SQL parser phase, before the
steps are dispatched to the AMP vprocs.
QTDELAYED
QUIESCED ABORT
QUIESCED INDOUBT
RESPONSE
SESDELAYED
162
Utilities
You can type any of the following responses when you are prompted for the logical host ID.
IF you type...
THEN...
an integer
an asterisk (*)
You can input any of the following when you are prompted for the Session ID.
IF you type...
an asterisk (*)
Utilities
163
Note: If an unsuccessful attempt was made to obtain temporary table information for the
given session, the following query session message could appear:
WARNING: Session may contain incomplete temporary table information due
to deadlock!
If temporary table information is important to you, then you should retry querying the
session at a later time.
The columns for the Session Identifier display the following information.
The column named...
Contains the...
Host
Session
session identifier.
PE
DBC User ID
If a session is active, and not part of a FastLoad, MultiLoad, FastExport, or Archive and
Recovery operation, the following session state detail information displays.
Session State Query Results : 00/06/15 14:14:13
Host Session PE DBC User ID
---- ------- -- ----------110 1006
11 DBC
State Details : ACTIVE
Statements Dispatched Time
CPU Usage Accesses
---------- ---------- -------- --------- -------1
1 14:22:09
2
22
164
Utilities
The State Details correspond to the latest SQL request that the stored procedure executed.
Session
------1893
PE
----16383
DBC User ID
----------USER1
Utilities
ABORTING
ACTIVE
BLOCKED
DELAYED
IDLE
INDOUBT
INDOUBT PARSING
PARSING
QTDELAYED
QUIESCED ABORT
QUIESCED INDOUBT
RESPONSE
SESDELAYED
165
ABORTING State
The ABORTING state indicates that the session is aborting its latest request.
The ABORTING state display is shown below.
State Details : ABORTING
Statements Code Time
CPU Usage Accesses
---------- ---- -------- --------- -------1 1043 14:22:09
2
22
The columns on the ABORTING state display provide the following information.
The column named...
Contains the...
Statements
Code
Time
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the
session request.
ACTIVE State
The ACTIVE state indicates that the session has sent steps to the dispatcher and possibly to
one or more AMP vprocs.
The ACTIVE state display for a session not part of a FastLoad, MultiLoad, FastExport or
Archive and Recovery operation is shown below.
State Details : ACTIVE
Statements Dispatched Time
CPU Usage Accesses
---------- ---------- -------- --------- -------1
1 14:22:09
2
22
The columns on the ACTIVE state display provide the following information.
166
Contains the...
Statements
Dispatched
Time
time that the last step in the highest statement number was sent to
the AMPs.
CPU Usage
Utilities
Contains the...
Accesses
total number of segment access calls executed on all AMPs for the
session request.
BLOCKED State
The BLOCKED state indicates that an active session is waiting for a database lock to be
released.
The BLOCKED state display for a session is shown below.
State Details : BLOCKED
Resource
------------------------------------------------------X.T
Statement AMPs Mode AMP Vproc HUT
--------- ---- ---- --------- --1
1 READ
19 NO
The columns on the BLOCKED state display provide the following information.
The column named...
Contains the...
Resource
Utilities
Statement
highest statement number for which steps have been dispatched to the
AMPs.
AMPs
Mode
AMP Vproc
HUT
167
DELAYED State
The DELAYED state indicates that an SQL request is delayed because a query limit has been
exceeded. When the limit is no longer exceeded, the delayed requests are processed.
Teradata Viewpoint Workload Designer portlet allows you to define and manage throttle
rules, which restrict the number of requests that can be simultaneously executed against
Teradata Database. These rules delay or reject database requests based on specified conditions,
such as the number of concurrent queries or the duration of queries. A delayed request is
allowed to proceed when the rules limit is no longer exceeded.
The DELAYED state display for a session is shown below.
State Details : DELAYED
IDLE State
The IDLE state indicates that the Teradata Database system recognizes a session, but no
processing is taking place.
The IDLE state display for a session is shown below.
State Details : IDLE
INDOUBT State
The INDOUBT state indicates that a two-phase commit session is in doubt. This state
continues until an abort or commit is received from the host application.
The INDOUBT state display for a session is shown below.
State Details : INDOUBT
PARSING State
The PARSING state indicates that the session is active in the Teradata SQL parser phase, before
the steps are dispatched to the AMP vprocs. The PARSING state displays no column
information and only the word PARSING.
The PARSING state for a session display is shown below.
State Details : PARSING
168
Utilities
QTDELAYED State
The QTDELAYED state indicates that a session is waiting for rows to be inserted into a queue
table. The QTDELAYED state is limited to 20% of the total possible sessions, which is 120 x
the number of PEs. If the 20% limit is exceeded, then error message 3128 appears:
3128 Transaction aborted due to exceeding the maximum consume statement
limit.
You must decrease the number of sessions consuming queue table rows. For detailed
information on error message 3128, refer to Messages.
The QTDELAYED state display for a session is shown below.
State Details : QTDELAYED
RESPONSE State
The RESPONSE state indicates a response to a session request is in process.
The RESPONSE state for a session display is shown below.
State Details : RESPONSE
Statements
---------1
Utilities
169
This column for the RESPONSE display contains the following information.
The column named...
Contains the...
Statements
SESDELAYED State
The SESDELAYED state indicates that a session is delayed because a utility limit has been
exceeded. The utilities that can be limited are FastLoad, MultiLoad, FastExport, and ARC.
When the limit is no longer exceeded, the delayed requests are processed.
Teradata Viewpoint Workload Designer portlet allows you to define and manage throttle
rules, which restrict the type and number of utilities that are allowed to run concurrently.
The SESDELAYED state display for a session is shown below.
State Details : SESDELAYED
Child Session
The Active State Display for a parent session involved in processing an Archive and Recovery
request contains the following information.
170
Utilities
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to
the AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the
session request.
Byte Count
The directed request active state display for a parent session involved in processing an Archive
and Recovery request contains the following information.
Utilities
Contains the...
Request #
Operation
Time
time that the last step for the highest statement was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the
session request.
Byte Count
171
The inactive state display for a parent session involved in processing an Archive and Recovery
request contains the following information.
The column named...
Contains the...
Operation
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the
session request.
Byte Count
State
-------Inactive
Active
Inactive
Child sessions involved in Archive and Recovery operations display these columns.
172
Contains the...
Session #
session identifier.
Request #
State
TimeStamp
Byte Count
Utilities
Child Sessions
If you request detail information, Query Session reports child sessions as well. These displays
are identified after the phrase State Details by two lines describing the current phase.
Information for a FastLoad session in the loading phase is different from information for a
non-loading phase of FastLoad.
The display for an active parent session in the loading phase of a FastLoad operation contains
the following information.
Utilities
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
Row Count
173
The display for an active parent session in any phase other than the loading phase of a
FastLoad operation contains the following information.
The column named...
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
The display for an inactive parent session in the loading phase of a FastLoad operation
contains the following information.
174
Utilities
Contains the...
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
Row Count
The inactive parent session display for sessions involved in any phase other than the loading
phase contains the following information.
The column named...
Contains the...
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the
session request.
Utilities
State
-------Inactive
Active
175
The display for Child sessions involved in FastLoad operations contain the following
information.
The column named...
Contains the...
Sessions#
session identifier.
Request #
State
TimeStamp
Row Count
In addition to the phase State Detail line, a line describing the current phase is displayed.
If the session is in the Preliminary or Application phase, the current task type (Delete or
Apply) is displayed. The information displayed is different for each phase: Preliminary,
Application, and Acquisition. In the Application phase, each of the two task types is displayed.
When the action involves more than one AMP, row count summaries are meaningless and are
not reported.
176
Utilities
The possible tasks include Apply Task and Delete Task. These are the Subphases:
The state display for the preliminary phase of a MultiLoad operation contains the following
information.
The column named...
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
DML Count
number of DML steps received if the current phase is Received all DML
Steps.
= SPOOL_RES.WT_TDEM_PAIMT_MED
= Process Data and Secondary index
= 1,210,838
= 51,639,908
=
0
=
0
The display for active parent sessions involved in the Apply Task of a MultiLoad operation
provides the following information.
Utilities
177
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
Description
DataBase.Table
Action
# of WorkRows applied
Total # of WorkRows
= SPOOL_RES.WT_TDEM_PAIMT_MED
= Process Data
= 22,357
= 245,349
Note: The values shown include both the primary and the fallback count.
178
Utilities
The Delete Task display for a MultiLoad operation contains the same information as described
for the Apply Task display except that it reports the number of rows processed and deleted
rather than the rows processed by the apply phase.
If you request detail information, Query Session reports child sessions as well. These are the
descriptions of the phase:
The display for active parent sessions involved in MultiLoad operations provides the following
information.
The column named...
Contains the...
Statements
Dispatched
Time
time that the last step for the highest statement number was sent to the
AMPs.
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
Row Count
Utilities
179
The display for inactive parent sessions involved in a MultiLoad operation contains the
following information.
The column named...
Contains the...
CPU Usage
Accesses
total number of segment access calls executed on all AMPs for the session
request.
Row Count
State
-------Inactive
Active
180
Contains the...
Session #
session identifier.
Request #
State
TimeStamp
time that is updated whenever a request is received from the host, a request
is reinitiated to another AMP, or a response is sent to the host.
Row Count
Utilities
Inactive
Vertical data redistribution and horizontal data redistribution are processes executed to
prepare the response data from a SELECT request for transfer back to the host. Vertical
redistribution occurs only if the SELECT contains an ORDER BY clause. The idle state occurs
before the select request is transmitted to the Teradata Database system, or while the
FastExport sessions are transmitting data to the host.
FastExport sessions are children of the Teradata SQL session that executes the select request. A
child session exists in one of two states. A child session in the inactive state means that either
the select has not completed, or that the host utility has not yet issued a request for this child
session in returning response data. A child session in the active state is currently transmitting
response data.
Like FastLoad and MultiLoad, the FastExport utility executes bulk activities. The Teradata
Database system limits the maximum number of load operations (that is, FastExport,
FastLoad, or MultiLoad) to the number specified in DBS Control field MaxLoadTasks.
Examples of Teradata SQL sessions involved in FastExport activity and examples of the output
for a FastExport session are shown in the following sections.
Utilities
181
The following example shows that the Teradata Database system continues to process the
vertical redistribution phase.
Session State Query Results : 00/06/12 18:38:59
Host Session PE DBC User ID
---- ------- --- ----------114 1090
1-4 DBC
State Details : Active PARENT session involved in FastExport
FastExport Phase : Horizontal redistribution.
Statements Dispatched Time
CPU Usage Accesses
---------- ---------- -------- --------- -------1
1 18:42:35
6603
3,314
Detail information for CHILDREN sessions in FastExport Util.
Session # Request # State
--------- --------- -------1091
0 Inactive
1092
0 Inactive
182
Utilities
0 Inactive
0 Inactive
The CPU Usage and the Accesses counts have increased, indicating the Teradata Database
system is in operation.
Utilities
183
FastExport transmission continues. As shown in the following example, the session has
returned four data blocks to the host. In this way, the user is able to monitor the progress of
the data transmission phase.
Session State Query Results : 00/06/06 18:50:52
Host Session PE DBC User ID
---- ------- --- ----------114 1091
1-5 DBC
State Details : Child Session involved in FastExport Utility
FastExport Phase : Returning data.
Request # State
Statement Blocks Returned Total Block
--------- -------- --------- --------------- ----------1000 Active
1
4
69
184
Utilities
CHAPTER 24
Reconfiguration Estimator
(reconfig_estimator)
The Reconfiguration Estimator utility chapter has been moved to the Support Utilities manual.
Utilities
185
186
Utilities
CHAPTER 25
The Reconfiguration utility chapter has been moved to the Support Utilities manual.
Utilities
187
188
Utilities
CHAPTER 26
The Recovery Manager utility, rcvmanager, monitors and provides information about the
progress of a Teradata Database system in recovery, including transaction rollbacks, because of
a Teradata Database system crash or user abort.
The recovery process might include one or more of the following:
Cancel the rollback of one or more specified host and session IDs
Set the priority level of rollbacks in progress for a specified host and session ID
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Prerequisites
You can run rcvmanager only while the Teradata Database is in one of the following states:
Logon
Logon/quiet
Logoff
Logoff/quiet
Startup (if the Teradata Database system has completed voting for transaction recovery)
If you attempt to start rcvmanager while the Teradata Database system is not in one of the
allowable states, the utility displays the following error information and terminates:
Utilities
189
HIGH
MEDIUM
LOW
Description
No work load
competition
Computeintensive work
load
If the online Teradata Database system work load is heavily compute intensive,
raising the priority of the I/O intensive recovery operations can dramatically
improve the recovery (including rebuild).
The high recovery will have a relatively minor impact on the online Teradata
Database system operations. However, it will provide a better resource
utilization and result in better Teradata Database system throughput. Similarly,
a low priority of recovery in this work load will dramatically slow down
recovery with only a moderate gain in online throughput.
Moderate or
heavy disk work
load
190
Utilities
Guideline
Description
I/O saturation
Rolling back transactions that were not completed at the time of the crash or restart
Changes made to underlying data by transactions are recorded in the Transient Journal (TJ).
AMPs keep track of transactions in progress using the TJ which is stored on each AMPs disk.
IF...
THEN...
Utilities
191
The status of each transaction on each online AMP is determined by the Teradata
Database system.
All of the online AMPs at the time of the restart work together to determine which
transactions were complete, and which ones were not completed. Completed transactions
are ignored and incomplete ones are backed out. The process of rolling back incomplete
transactions might take some time.
Write and exclusive locks are set against all data modified by incomplete transaction.
All locks needed for the recovery are set, and the Teradata Database system begins roll back
or completion of the transactions.
The first one that was created for the previous restart
The new one that was created for the current work
Since there is a sequential relationship between these two recovery sets and they are inherently
mutually exclusive, they are kept as separate operations.
Therefore, if a system crash or user abort occurs and the amount of work to be done in each
recovery session is large, then three, four or more recovery sessions may be created. Each
session exists until all the incomplete transactions of the session are rolled back.
The issue of multiple recovery sessions may be avoided by having all the restarts be
COLDWAIT, since the WAIT means to wait for recovery to complete before allowing the
Teradata Database system to accept new work from the hosts. Although the recovery proceeds
faster, since it is not competing with any other new work for computing resources, the
Teradata Database system remains totally unavailable to the database users.
192
Utilities
Restoring the data to a consistent state, relative to the transactions the down AMP was
working on at the time of the failure.
The down AMP applies the information in its Transient Journal against its underlying
data. Moreover, the down AMP must concur with the choice of the rest of the Teradata
Database system whether to rollback or commit each transaction.
Updating the restored data to match all changes made to the online Teradata Database
system while the AMP was down (Down AMP Recovery).
Utilities
Pass
---0
Current Pass
OJ
CJ
----------0
0
Next
OJ
--1
Pass
CJ
-------1,081
193
25,081
0003
1
0
2,142
0
0
- AMP Status: Online Catchup
- Change Row Recovery: 26% complete in this pass
0004
2
2
201,558
0
4,228
- AMP Status: Offline Catchup
- Rebuilding Database1.Table1: 45% complete
0005*
4
0
0
0
2,888
- AMP Status: Offline Catchup
- Between passes
* - would probably be placed in online catch up if a restart occurred
Previously down AMPs that are now available begin their local transaction recovery
(referred to as offline catchup AMPs). This step must be completed before going to step 2.
The extracted Ordered System Change Journal (OJ) is processed, rebuilding various
subtables.
The extracted Changed Row Journal (CJ) rows are then processed by sending the changed
rows (or notification that the rows were deleted) to the catchup AMP.
The OJ entries are applied. Ones which take a significant amount of time are the build
operations.
Current CJ entries are applied. Each CJ entry represents one row to be updated (insert,
delete, update).
Online AMPs in the down AMP cluster extract all the current build records from the OJ
and CJ, and sort them to eliminate duplicates. Any CJ entries referring to rows in a table
which will be rebuilt are deleted. Other OJ operations are sent to the catchup AMP for
execution.
The Next Pass OJ and CJ entries become the Current Pass entries.
After the AMP is sufficiently caught up, it becomes eligible to become an online catchup
AMP on the next restart. This is denoted by displaying an asterisk (*) under the column
entitled, AMP to be caught up, in the DOWN AMP RECOVERY STATUS screen of the
rcvmanager status display. See the previous display screen.
Recovery Journal
When an AMP in a cluster goes down, and the fallback option is specified for a table, the
Down AMP Recovery Journal (RJ) records changes made to the fallback tables that are
applicable to the down AMP. The journal is active only during an AMP failure and is only used
for fallback tables.
194
Utilities
Operational AMPs in the cluster begin logging entries into the Down AMP RJ.
The Down AMP RJ records the changes that should have been made to fallback-protected
rows of the inoperative AMP.
Function
Logs events such as, building the index, creating a permanent journal,
and performing a table rebuild.
These types of changes may be termed Teradata Database system-level
changes and involve Data Definition Language (DDL) operations, since
they affect all AMPs, not only a single row update.
Utilities
195
example, drop a column. For these types of operations, recovery involves copying every single
row of the table, for those rows the AMP owns, over to that down AMP (a table rebuild).
Therefore, the majority of the rows found in the OJ are build records that identify tables that
need to be built for created tables, or rebuilt when the AMP is recovered. Other OJ records are
HUT Lock set and release records, and in-doubt two-phase commit transaction.
Offline catchup
Online catchup
While in the offline mode, the AMP has OJ build records to process and/or a large number
of CJ rows. This reduces the amount of data that is locked, but any new transactions on the
online Teradata Database system creates additional OJ and CJ rows. Since you cannot place
196
Utilities
an offline AMP into the online Teradata Database system, these passes could continue
forever or until the Teradata Database system restarts.
A screen similar to the following appears:
DBS LOGICAL CONFIGURATION
Vproc
Rel.
Node
Crash
Vproc
Config
Config Cluster/
RvcJrnl/
Number Vproc# ID
Movable Count
State
Status
Type
Host No.
Host Type
0*
1
0-0
No
0
Online Online
AMP
0
On
1
2
0-0
No
0
Utility Catchup AMP
0
On
16383
3
0-0
No
0
Online Online
PE
52
COP
__________________________________________________________________________________
* DBS Control AMP
DBS State: Logons are enabled - The system is quiescent
DBS RestartKind: COLD
The disable list is empty
Start rcvmanager.
Note: Sufficiently recovered refers to the third message in the table above.
If a COLDWAIT restart is performed, the operations are similar to those of Transaction
Recovery. In COLDWAIT, the Teradata Database system remains offline with no incoming
transactions until all recovering AMPs have fully recovered. After recovery, the AMPs are all
set to online status, and the Teradata Database system completes start-up.
In offline catchup, catchup tries to run faster than the new update transactions coming in
online. The other AMPs handle the fallback responsibility for the down AMP, as well as the
additional work involved in writing CJ or OJ records.
If an AMP is designated to be in offline catchup mode, then you must initiate a COLD restart,
but only after the AMP has sufficiently recovered, to bring the offline AMP back online.
Online Catchup Mode
In online catchup mode, the previously down AMP will also accept transactions, as will the
rest of the Teradata Database system. In this mode, all the data that needs updating is locked,
so that new data does not operate on the obsolete data.
Utilities
197
When the down AMP has a small amount to recover, it can be placed into online catchup. To
begin online catchup mode, see Offline Catchup Mode on page 196.
Since the AMP is online and participating in the new transaction coming into the Teradata
Database system, no new CJ or OJ entries are being created for it. After all of the residual CJ
processing is completed, the Teradata Database system becomes online. Start the
VprocManager utility and check the status of the Teradata Database. The Vproc State and
Config Status should appear as Online. At this point, the AMP rejoins the other online AMPs
automatically without the need of a Teradata Database system restart.
Startup/Restart Messages
At startup, messages are displayed to report the startup progress and the Teradata Database
system status. This report includes some recovery process messages as shown below:
H005 Control AMP 001-2
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
98/02/06
11:35:31
11:35:31
11:35:32
11:35:32
11:35:32
11:35:33
11:35:36
11:35:36
11:35:40
11:36:02
11:36:05
11:36:16
11:36:18
11:36:18
11:37:03
11:37:05
11:37:05
The following table lists and explains these and other messages.
198
Message #...
Means...
Utilities
Message #...
Means...
5 - Completed transaction
recovery
8 - Starting transaction
recovery
Restarts
Two types of restarts exist:
Automatic
User-initiated
Automatic Restarts
When a software or hardware failure occurs, the Teradata Database system automatically
attempts to bring itself back up into an operational state. This type of restart results in an
automatic execution of a Teradata Database system-recovery operation. As part of the restart
processing, the Teradata Database system saves the error codes that were generated, reloads
Teradata Database system software, and enables logons.
User-Initiated Restarts
Manual restarts are activated by the user. Users can initiate a restart from any of the hardware
switches or by one of the following methods:
Utilities
199
Issue the RESTART command. For information on the RESTART command, see
Chapter 39: Vproc Manager (vprocmanager).
Caution:
Teradata recommends that you use the CANCEL ROLLBACK ON TABLE command with
caution because the target table becomes invalid and unusable after executing this command.
Teradata highly recommends that you perform a DELETE ALL operation on the table after
cancelling rollback on it.
The typical process of cancelling rollback on a table is as follows:
1
You identify a large table(s) that can be restored faster than the rollback will take.
You perform a LIST ROLLBACK TABLES to see which tables are undergoing rollback.
The only time that you would not restore the table(s) immediately is if you do not need the
table(s). You still should perform a DELETE ALL immediately. You have to know what you are
going to do about the invalid table prior to performing the CANCEL ROLLBACK ON TABLE.
And you will have to do it immediately to get the Teradata Database system back online.
200
Utilities
You can reuse the table only when one of the following occurs:
You perform a DELETE ALL operation on that table if you do not want to lose the DDL
associated with the table. When you issue a DELETE ALL, the partially rolled back rows
can be removed, and the table is made usable.
Start rcvmanager.
rcvmanager displays the names and details of the tables undergoing rollback.
3
The table IDs specified must appear on the rollback list from step 2.
rcvmanager displays the following:
Type the password for user DBC or press the Enter key to return:
Note: You need to specify the DBC password only for the first use of the CANCEL
ROLLBACK ON TABLE command in a rcvmanager session. For subsequent use of the
command, rcvmanager does not ask for the DBC password.
4
Type the password for user DBC or press the Enter key.
If logon fails due to an incorrect password or for some other reason, the following message
appears:
*** Logon failed ***
Teradata Database returns to the RcvManager command prompt. Repeat step 2 if this
occurs.
If you successfully logon to the Teradata Database system, the following message appears:
Rollback will be cancelled for:
mmmm:nnnn "DBname"."TableName"
Confirm y/n ?
For other possible messages, see CANCEL ROLLBACK Messages on page 206.
5
Type Y to confirm.
Utilities
201
Retrieving Tables
You can perform a single table retrieve operation on tables whose rollback was cancelled. To
do so, use the LOCKING request modifier with the READ OVERRIDE option. You cannot
perform update operations (UPDATE, INSERT, DELETE, and MERGE requests) on such
tables. For more information, see LOCKING Modifier in SQL Data Manipulation Language.
Description
CANCEL ROLLBACK ON
TABLE
DEFAULT PRIORITY
HELP
LIST LOCKS
LIST STATUS
QUIT
Exits rcvmanager.
REBUILD/RECOVERY
PRIORITY
Sets or displays a priority level for use by the Table Rebuild utility
and a Teradata Database system recovery operation.
ROLLBACK SESSION...
PERFORMANCE GROUP
The following sections describe each of the Recovery Manger commands in more detail.
202
Utilities
Purpose
The CANCEL ROLLBACK ON TABLE command allows you to cancel rollback processing on
tables currently undergoing rollback as part of a Teradata Database system recovery or an
online, user-transaction abort.
Note: Before using CANCLE ROLLBACK ON TABLE, you should use the LIST ROLLBACK
TABLES command to obtain the table IDs of tables undergoing rollback. CANCLE
ROLLBACK ON TABLE will fail for tables that do not appear on this list.
Syntax
CANCEL ROLLBACK
ON
TABLE
,
table_id
;
YsRcv006
Syntax element...
Specifies...
table_id
the identifier for the table whose rollback is to be cancelled. This is specified
in hexadecimal format.
You can specify any number of table_ids by separating them with commas.
The table_id must be in the rollback tables list, meaning the table specified
must be undergoing rollback. For other rules, see Usage Rules on page 204.
Usage Notes
When the CANCEL ROLLBACK ON TABLE command is executed for a table, the Teradata
Database marks the related table header invalid. Only the rollback pertaining to the specified
table in the transaction is cancelled. The rollback processing for the rest of the transaction is
not impacted.
Use the CANCEL ROLLBACK ON TABLE command when one of the following occurs:
Caution:
Teradata recommends that you use the CANCEL ROLLBACK ON TABLE command with
caution because the target table becomes invalid and unusable after executing this command.
Teradata highly recommends that you perform a DELETE ALL operation on the table after
cancelling rollback on it.
Utilities
203
You identify a large table(s) that can be restored faster than the rollback will take.
You perform a LIST ROLLBACK TABLES to see which tables are undergoing rollback.
The only time that you would not restore the table(s) immediately is if you do not need the
table(s). You still should perform a DELETE ALL immediately. You have to know what you are
going to do about the invalid table prior to performing the CANCEL ROLLBACK ON TABLE.
And you will have to do it immediately to get the Teradata Database system back online.
You can reuse the table only when one of the following occurs:
You perform a DELETE ALL operation on that table if you do not want to lose the DDL
associated with the table. When you issue a DELETE ALL, the partially rolled back rows
can be removed, and the table is made usable.
Upon specifying the CANCEL ROLLBACK ON TABLE command for the first time in a
rcvmanager session, you are prompted to type the password for user DBC. Although any user
can execute this command, the DBC password is required. This is a built-in safeguard to
restrict the use of the feature.
This command is not instantaneous. It takes effect after reading the Transient Journal (TJ)
rows for all the tables specified with the command.
You can cancel the rollback on a table even after a part of the transaction rollback is complete
on that table.
The priority level in effect during a rollback also applies to the aborting of rollback.
Usage Rules
The following usage rules apply to the CANCEL ROLLBACK ON TABLE command:
The table-id specified with the CANCEL ROLLBACK ON TABLE command must exist in
the rollback tables list, meaning the table must have been marked for rollback.
You can specify any number of tables for cancelling rollback. rcvmanager verifies each
table-id. If some of these tables do not exist in the rollback list, rcvmanager reports error
messages for the non-existing tables and asks for a single confirmation for cancelling
rollback on all the valid tables.
Example 1: Valid Command
Assume that the table with table-id 6712 exists.
> CANCEL ROLLBACK ON TABLE 0:6712;
Type the password for user DBC or press the Enter key to return:
204
Utilities
rcvmanager has ignored the command because the table does not exist.
You cannot cancel rollback on tables that have any referential integrity constraints.
Note: An exception to this rule is the self-referencing table.
The table-ids of all referenced and referencing tables are marked with an asterisk (*) in the
rollback list generated by the LIST ROLLBACK TABLES command.
When you specify multiple tables in the CANCEL ROLLBACK ON TABLE command,
rcvmanager verifies each table for referential integrity constraints.
Assume three tables T1 (table-id 6710), T2 (table-id 6711) and T3 (table-id 6712) exist in a
rollback list, and T2 has a foreign key referencing T1. Assume that T3 has only a selfreference and no constraints that reference other tables.
> CANCEL ROLLBACK ON TABLE 0:6710;
Entry ignored as table 0:6710 has referential integrity constraint.
Enter command, "QUIT;" or "HELP;" :
> CANCEL ROLLBACK ON TABLE 0:6711;
Entry ignored as table 0:6711 has referential integrity constraint.
Enter command, "QUIT;" or "HELP;" :
> CANCEL ROLLBACK ON TABLE 0:6712;
Rollback will be cancelled for:
0000:6712 "SG"."T3"
Confirm y/n ?
> y
If the tables specified for cancelling rollback are associated with join or hash indexes, then
rcvmanager lists all such tables and asks for a single confirmation.
Upon confirmation (y), the tables, as well as the associated join and hash indexes, are
marked as invalid.
When you specify multiple tables with the CANCEL ROLLBACK ON TABLE command,
and some tables have join or hash indexes and some have errors, then rcvmanager asks for
a single confirmation for all the valid tables.
Assume that Temp_Table with table-id 6707 is associated with a join index.
> CANCEL ROLLBACK ON TABLE 0:6707;
Rollback will be cancelled for:
0000:6707 "EmployeeDB"."Temp_Table"
The following join and/or hash indexes will be invalidated:
"EmployeeDB"."Sal_Join"
Confirm y/n ?
> y
Utilities
205
If the table-id specified with the CANCEL ROLLBACK ON TABLE command was
specified previously or more than once in the same command, then rcvmanager reports a
message indicating a duplicate entry.
Assume that a rollback was cancelled previously on table-id 6712.
> CANCEL ROLLBACK ON TABLE 0:6712;
When you cancel rollback on a table, it becomes invalid and unavailable for any
subsequent transactions.
If any user attempts an update on such tables, then the following message appears:
"Invalid operation on table table-name."
In the following example, the INSERT into LogTable fails because rollback on the table was
cancelled earlier, and the table is invalid.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
INSERT INTO EmployeeDB.LogTable;
*** Failure 5792 Invalid operation on table 'LogTable'.
Statement# 1, Info =0
*** Total elapsed time was 1 second.
206
Utilities
To...
Use the...
delete all the rows in the table and make it valid again
RESTORE command.
DUMP command.
Note: CheckTable utility skips checking on tables whose rollback you cancel.
Utilities
207
DEFAULT PRIORITY
Purpose
The DEFAULT PRIORITY command sets the priorities to the default values (that is,
REBUILD will be set to MEDIUM and RECOVERY to LOW).
Syntax
DEFAULT
PRIORITY
;
GS04A035
Usage Notes
If the PRIORITY command has never been executed or a SYSINIT has been performed on the
Teradata Database system, the priorities are set to the default values. The priority remains the
same until an initial or subsequent PRIORITY command changes it again. When the priority
command is entered during a rebuild or recovery operation, several minutes may elapse
before the new priorities take effect.
When you type the DEFAULT PRIORITY command, the event is logged in the /var/adm/
streams/error.mm-dd file in the Teradata Database system you are working on, and the
following messages are displayed.
YY/MM/DD HH:MM:SS RECOVERY priority changed to LOW; it was
<old priority>
YY/MM/DD HH:MM:SS REBUILD priority changed to MEDIUM; it
was <old priority>
When the default priority command is entered, both messages are generated.
208
Utilities
HELP
Purpose
The HELP command displays the syntax for the commands supported by rcvmanager.
Syntax
HELP
GT11A001
Example
The HELP command displays information for all the rcvmanager commands:
RCVMANAGER provides a means for the user to interact with the recovery sub-system.
The syntax of an RCVMANAGER command is:
HELP;
QUIT;
{
{
LIST {
{
STATUS [<proc-id>]
LOCKS
ROLLBACK TABLES
CANCEL ROLLBACK TABLES
{ REBUILD }
{
}
{ RECOVERY }
DEFAULT
PRIORITY
}
}
}
};
[ Low
]
[ Medium ] ;
[ High
]
PRIORITY;
Utilities
209
Purpose
The LIST CANCEL ROLLBACK TABLES command displays a report containing the table-id,
database name, and table name of the tables whose rollback processing during an online, userrequested abort or during Teradata Database system recovery is cancelled.
Syntax
LIST
;
1102A046
Syntax element...
Specifies...
CANCEL ROLLBACK
TABLES
Usage Notes
This report lists all the tables for which rollback is being cancelled, as the process of
cancellation of rollback is not instantaneous. The report is in alphabetical order, by the
database name and table name.
Note: The LIST ROLLBACK TABLES command report does not include invalid tables, that is,
tables on which rollback is being cancelled. Therefore, if all the tables in a session have been
specified for rollback cancellation, they appear only in the output of the LIST CANCEL
ROLLBACK TABLES command.
If no tables on which rollback is cancelled exist, then only the column headings are displayed.
Example
The following is sample output of the LIST CANCEL ROLLBACK TABLES command.
PENDING CANCEL ROLLBACK TABLES AT 03:02:25 01/11/15
Table ID
Name
----------- ---------------------------------------------0000:6707
"Department"."Dept_Details"
0000:6712
"Department"."Temp_Table"
210
Utilities
LIST LOCKS
Purpose
The LIST LOCKS command displays all locks currently held by transaction recovery.
Syntax
LIST
LOCKS
;
1102A047
Syntax element...
Specifies...
LOCKS
Usage Notes
The report displays the mode of the lock held (write or exclusive), the object type locked
(database, table, row range, or row hash) and the name of the object. The report is sorted
alphabetically by object name.
For row range and row hash locks, the row information does not display. Only the table within
which the row resides is displayed.
If rcvmanager is unable to determine the database name associated with an object,
rcvmanager displays the database ID in decimal and hex. The same is true if the table name
cannot be determined.
LIST LOCKS displays only those locks currently held by transaction recovery. You cannot
Example
Only a single report is generated by the LIST LOCKS command. An example of this report is
shown below:
LOCKS HELD BY ONLINE TRANSACTION RECOVERY at
02:29:16 04/06/16
Lock
Mode
---Write
Write
Write
Exclusive
Exclusive
Utilities
Lock
Object
-----Database
Row hash
Row hash
Row hash
Table
Object
Name
---"AssetsDB"
"Clients"."TurnOver"
"EmployeeInfo"."NewHires"
"SampleDB"."pseudo table"
"SampleDB"."SampleTable"
211
Purpose
The LIST ROLLBACK TABLES command displays a report with the names and details of the
tables undergoing rollback in the Teradata Database system.
Syntax
LIST
ROLLBACK TABLES
;
1102A048
Syntax element...
Specifies...
ROLLBACK TABLES
Usage Notes
The tables undergoing rollback must satisfy the following criteria:
The table in a transaction must have more than 10000 rows yet to rollback on at least one
AMP.
The report displays only the headings if no rollback is in progress in the Teradata Database
system, or if no table satisfies these criteria.
The list is in descending order of the Host and Session, and then in alphabetical order by the
database name and table name.
The list excludes DBC tables and Permanent Journal (PJ) tables.
An asterisk (*) appears after the table name if the table has any Referential Integrity
constraints. You cannot cancel rollback on such tables.
Table names having non-printable characters are displayed in hexadecimal.
The list is in two parts, as shown in the following table.
Note: Global Temporary tables and Volatile tables are not listed.
212
This part...
user-requested abort.
Utilities
This part...
The following table explains what information the report columns provide:
Column...
Specifies the...
Host
Session
User ID
Performance Group
AMP W/Count
AMP on which the maximum number of Transient Journal rows are left
to be processed.
TJ Rows Left
TJ Row Count
TJ Rows Done
Time Est.
estimated time (in hours and minutes) left for the rollback to complete
for that session.
Example
The following is a sample output of the LIST ROLLBACK TABLES command.
TABLES BEING ROLLED BACK AT 14:25:34
02/11/15
Session
-------23857
TJ Rows Left
------------30,478
Utilities
User ID
---------0000:0481
Performance Group
-------------------M
TJ Rows Done
------------1,098
AMP W/Count
----------1
Time Est.
-----------01:37
213
Name
---------------------------------------------"rcv_user1"."cr_in001"
"rcv_user1"."cr_in002"
"rcv_user1"."cr_ri001"*
"rcv_user1"."cr_ri002"*
Session
-------0
Table ID
--------0005:045A
0005:045B
TJ Row Count
-----------30,032
Name
---------------------------------------------"EmployeeDB"."Parent_Table"*
"EmployeeDB"."Temp_Table"
214
Utilities
LIST STATUS
Purpose
The LIST STATUS command generates two reports:
The first reports transaction recovery information, and the second reports AMP recovery
information for unavailable AMPs.
Syntax
LIST
STATUS
;
1102A049
Syntax element...
Provides...
STATUS
Utilities
215
Report Information
This report displays a list of all active recovery sessions and the maximum number of
transaction journal rows remaining to be processed for the AMP that has this maximum
count.
Since all AMPs must complete processing of a given recovery session before the processing of
the next session begins, this information is sufficient to calculate the worst-case count of
transaction journal entries to be scanned. You can use this count as a rough guide to recovery
processing time.
However, because this is only a rough guide, you must also take into consideration the
following variables when estimating the time involved in the recovery process:
The amount of work required by recovery to process a given transaction journal row can
vary by orders of magnitude; that is, some rows can be processed in a fraction of a second,
whereas others can take hours to process.
The transaction journal may contain many rows which require no recovery processing.
The online transaction recovery journal counts are updated by each AMP every time a
checkpoint is taken.
Thus, every time an AMP performs checkpoint, its online transaction recovery journal count
is decreased by 1000, and a later LIST STATUS command may display different results.
If no recovery sessions are active, the report title is printed without any contents.
Example
ONLINE TRANSACTION RECOVERY JOURNAL COUNTS at 13:49:28 98/02/06
Recovery
AMP
Session
Count
W/Count
------- ---------- ------1
765
12
2
38,432
1,388
20
Note: A new recovery session is created for each restart that is not a COLDWAIT restart.
216
Utilities
Description
AMP to be
caught up
Pass
Indicates the number of the recovery pass. At the beginning of a recovery pass all
rows in the OJ and CJ are extracted. This is the total number of rows to be processed
during that pass. If additional changes are sent to the AMP during the processing of
the current pass, they are queued up for the next pass. When the processing of rows
of the current pass is complete, the pass number is incremented and the rows for the
next pass are extracted from the OJ and CJ and processed.
Current Pass
The OJ column contains the number of rows in the ordered Teradata Database
system change journal to be processed during the current recovery pass. The CJ
column contains the number of rows in the changed row journal to be processed
during the current recovery pass.
Next Pass
The OJ column contains the number of rows in the ordered Teradata Database
system change journal to be processed during the next recovery pass. The CJ
column contains the number of rows in the changed row journal to be processed
during the next recovery pass.
If there are transactions that are updating user tables, these counts will go up as a
result of those updated transactions. Subsequent displays could show an increase in
the count.
Utilities
217
The following table describes the second data line (AMP Status).
Data
Description
Online Catchup
This AMP is online during recovery processing and accepts new work. Locks
are applied against all objects that need to be updated before new work is
accepted. In this status, the OJ count is usually zero and no new OJ or CJ
entries are created.
Offline Catchup
Not In Recovery
The following table describes the third data line (AMP Recovery Status Line).
218
Data
Description
Transaction Recovery:
ZZZ,ZZZ,ZZ9 TJ Rows
Specifies the name of the table being rebuilt and the percentage
of completion. Tables are rebuilt as a result of DDL changes
(that is, drop or add a column) to a table, or a MultiLoad
operation has affected a table while an AMP was down.
Between Passes
Miscellaneous OJ Processing
Down
Utilities
Data
Description
Indicates that the AMP has not yet reached the point of starting
Transaction Recovery or extracting OJ logs. The AMP is neither
at the very early stage in recovery or has not yet started it. (The
AMP might be down.)
Example
The Down AMP Recovery Status report generates the information shown in the following
screen example.
DOWN AMP RECOVERY STATUS AT 12:27:25 99/10/13
AMP to be
Current Pass
caught up
Pass
OJ
CJ
---------------------- ----------00001
0
0
0
- AMP Status: Not in recovery
- Down
Utilities
Next Pass
OJ
CJ
----------- ----------107
16,531
219
Purpose
The LIST STATUS command with the proc-id option specified as mmmm provides additional
detailed information about the recovery process of a specific AMP.
Syntax
LIST
STATUS
;
proc-id
1102A060
Syntax element...
Provides...
STATUS
proc-id
220
Utilities
Usage Notes
The following additional information is reported:
Status
Pass number
A list of tables that need to be rebuilt, which also includes the following information:
Total rows
Total bytes
Note: All tables that need to be rebuilt will display in the list.
The LIST STATUS proc-id command is only allowed for processors that are in down AMP
recovery (offline catchup), or the AMPs listed in the LIST STATUS display. No additional
detail information is provided for AMPs that are in online catchup since no build records exist
for these AMPs.
The following table shows the information contained in the columns under the TABLES TO
BE REBUILT report.
Utilities
Data
Description
Row Count
221
Data
Description
Status
Displays up to six possible states where the recovery process may be when LIST
STATUS proc-id is executed.
Blank
Indicates that the table might be or will be rebuilt.
MultiLoad Target Table in Apply
Indicates that the table is a target table of a MultiLoad job. In this case the OJ build
record is discarded since the likelihood is that the AMP will be online before the
MultiLoad job finishes. If this is the case, MultiLoad will force a rebuild of the table
while the AMP is online. If the MultiLoad job completes before the AMP is online,
a new OJ build record is generated, meaning the rebuild will occur in a later pass.
Locked
Indicates that the table is currently locked by an EXCLUSIVE lock and that a valid
sector count cannot be taken. Unless the lock is part of a drop table operation, the
table will eventually be rebuilt in the next pass.
Non-Fallbacked
Indicates that a non-fallback table has been marked for a rebuild operation. Since
all non-fallback tables are deleted during rebuild operation, the sector count
associated with this table is meaningless.
Table Rebuild
Indicates that this OJ build record is for a table that is currently being rebuilt. This
OJ build record will be discarded.
Restore
Indicates that a table may have an OJ build record for it, but it is currently the
target of a (not necessarily active) restore operation. In this case, the OJ build
record is discarded.
Name
Note: If the LIST STATUS proc-id command is executed while creating an index on a table
that is to be rebuilt, then the time to rebuild the index is not added to the estimated rebuild
time for that table.
Example 1
This example shows a typical down AMP recovery status report, which displays the total rows,
total bytes, and the rebuild speed in bytes per second.
DOWN AMP RECOVERY STATUS AT 12:27:25 99/10/13
AMP to be
Current Pass
caught up
Pass
OJ
CJ
---------------------- ----------00001
0
0
0
- AMP Status: Not in recovery
- Down
222
Next Pass
OJ
CJ
----------- ----------107
16,531
Utilities
Example 2
This example shows the output returned when the first table rebuild has not completed and an
estimate rebuild time cannot be given due to insufficient data.
TABLES TO BE REBUILT
Row Count
Status
Name
-----------------------------------------------------------161,216
"RESCRIBE"."Rescribe10"
161,216
"RESCRIBE"."Rescribe30"
161,216
"RESCRIBE"."Rescribe20"
161,216
"RESCRIBE"."Rescribe12"
161,216
"RESCRIBE"."Rescribe32"
161,216
"RESCRIBE"."Rescribe22"
161,216
"RESCRIBE"."Rescribe14"
-------------------------------------------------------------------1,128,512
total rows.
There is insufficient data to estimate the rebuild time.
Utilities
223
QUIT
Purpose
The QUIT command exits rcvmanager.
Syntax
QUIT
GT11A004
Usage Notes
You can only type this command when rcvmanager is prompting for a command.
You cannot abort a rcvmanager command in progress.
224
Utilities
REBUILD/RECOVERY PRIORITY
Purpose
The REBUILD/RECOVERY PRIORITY command sets or displays a priority level for use by
the Table Rebuild utility and a Teradata Database system recovery operation.
Syntax
REBUILD
RECOVERY
PRIORITY
HIGH
MEDIUM
LOW
GT11A005
Usage Notes
Setting a priority will apply to future and currently running operations. The PRIORITY
command takes the following forms.
Both priorities are independent of each other and can hold different values at any period of
time. That is, recovery initiated rebuilds will use recovery priority and not rebuild priority. If
you type the command without specifying high, medium, or low, the current priority setting
is displayed.
The REBUILD PRIORITY command applies to any Table Rebuild started from the console,
automatic table rebuild due to disk error recovery, and MLOAD rebuild of target tables for
non-participant online AMPs.
The REBUILD PRIORITY command sets a priority for the rebuild utility. You can select
HIGH, MEDIUM, or LOW level priority. If you do not explicitly set a priority, default rates
exist and will be used. If you do not type a new priority, the current priority setting is
displayed.
The RECOVERY PRIORITY command sets a priority for the Teradata Database system
recovery operation. You can select HIGH, MEDIUM, OR LOW level priority. If you do not
explicitly set a priority, the current priority setting is displayed. The priority settings are saved
in the Recovery Status system table.
Utilities
225
Purpose
The ROLLBACK SESSION... PERFORMANCE GROUP command sets or displays the
Performance Group of rollbacks for a specified session.
Syntax
ROLLBACK SESSION
A
host_id,session_id
;
PERFORMANCE GROUP
Perf_Group_Name
1102A140
Syntax element...
Specifies the...
host_id
identifiers for the host and session whose Performance Group you
want to see or set.
session _id
226
Utilities
Usage Notes
Rollback processing runs at the priority defined for the session, that is, the priority associated
with the Performance Group for the session. If no priority is specified, rollback runs at R
priority by default.
The ROLLBACK SESSION... PERFORMANCE GROUP command allows you to change the
priority. By reducing the priority of less important rollbacks, you can increase the Teradata
Database system resource availability for other processes in the Teradata Database system.
The ROLLBACK SESSION... PERFORMANCE GROUP command affects the Performance
Group and priority only for the rollback process, not for the user session.
If the DBS Control General field RollbackPriority is set to TRUE, the rollback process runs
with the priority with which the recent request of the transaction was submitted. Here the
ROLLBACK SESSION... PERFORMANCE GROUP command can override the DBS Control
Rollback Priority field setting and change the priority of the rollback at any point of time.
The following usage rules apply to the ROLLBACK SESSION... PERFORMANCE GROUP
command:
The host-id and the session-id specified with the ROLLBACK SESSION...PERFORMANCE
GROUP command must be in the rollback tables list generated by the LIST ROLLBACK
TABLES command from rcvmanager. This indicates that rollback is in progress in that
session. You either can display or change the Performance Group.
If you specify a host-id or a session-id that does not exist in the rollback list, rcvmanager
displays a message, and the command is ignored.
Example 1: Valid Command
The Performance Group H specified in the following command takes effect for the named
host-id and session-id.
> ROLLBACK SESSION 52, 1664 PERFORMANCE GROUP H;
ROLLBACK SESSION PERFORMANCE GROUP command completed successfully.
Utilities
227
When you specify a user-defined Performance Group name, the equivalent priority for
that Performance Group is obtained to change the priority of the rollback for the specified
host-id and session-id.
If the specified Performance Group is not valid, rcvmanager reports a message, and the
command is ignored.
In this example, the Performance Group name is not valid.
> ROLLBACK SESSION 52, 1664 Performance Group InvPrfGrp;
The specified Performance Group name is invalid.
Enter command, "QUIT;" or "HELP;" :
228
Utilities
Providing Teradata Database system statistics to help you determine the cause of the slow
down or hang
Description
dbschk
nodecheck
syscheck
A standalone tool that analyzes relevant Teradata Database system data from the
local node.
syscheckrc
Runs From
The resource check tools run from the Linux command line.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Utilities
229
dbschk
Purpose
dbschk monitors Teradata Database response time. If the response time indicates the database
is slow or unresponsive, dbschk runs a specified program or script, and logs an event.
The factory default settings for dbschk options can be changed using command-line options.
Settings specified on the command line can be optionally saved as new default settings for
dbschk. New defaults persist across sessions, and are propagated to all nodes of MPP systems.
The -reset option restores the factory default settings.
Syntax
dbschk
-h
-l
-reset
-delay sleep_seconds
-job job_program
-logfile file
-logflush flush_seconds
-n iterations
-power switch
-rate attempts
-save
-timeout wait_seconds
-trigger trigger_program
1102C141
Syntax Element
Description
-delay sleep_seconds
Sets the time that dbschk waits between successful executions of the
all-AMP requests to Teradata Database.
sleep_seconds in a positive integer that specifies the number of seconds
dbschk waits. The factory default is 1200 seconds.
Note: Setting a very low value for -delay can adversely affect system
performance.
-h
230
Utilities
Syntax Element
Description
-job job_program
-l
Displays the current default and factory default dbschk settings. The current
default settings are used when dbschk is run with no command-line
options.
-logfile file
Specifies log file dbschk will use. All dbschk program output is directed to
this file. If the file does not exist, dbschk will create it.
Note: file should specify the complete path to the log file. If the path
includes any space characters (for example, Program Files), enclose the
entire file specification within double quotation marks.
To have dbschk output displayed on screen, specify file as stdout.
If you do not specify a -logfile on the command line, dbschk will use the file
specified as the current default logfile. Use the -l option to see the current
dbschk default values.
The factory default log file is:
/var/opt/teradata/tdtemp/dbschk.log.
Note: Instances of dbschk log to the logfile that is in effect when they are
started. Multiple instances of dbschk can share the same log, or use different
logs. For example, an instance of dbschk can be started automatically when
Teradata Database starts and set to log to a file, while other instances of
dbschk can be run from the command-line using the -logfile option to have
the dbschk output directed to the screen (stdout).
-logflush
flush_seconds
Specifies the time after which the log file is flushed and overwritten with
new output from dbschk.
flush_time is a positive integer that specifies the number of seconds between
log flushes. The factory default is 3600 seconds.
Note: Setting a very low a value for -logflush can adversely affect system
performance. Setting a very high value can result in a very large log file.
-n iterations
Utilities
231
Syntax Element
Description
-power switch
-rate attempts
Specifies the number of times that dbschk executes an all-AMP request and
waits for a response before running the program specified by the -trigger
parameter.
attempts is a positive integer. The factory default is 5.
-reset
Restores the dbschk factory default settings. To see the factory default
settings, use the -l option.
Note: The default dbschk settings are global to the system. They are used
when dbschk is run from any node of MPP system.
-save
Saves the settings that are specified on the command line as new default
values for subsequent runs of dbschk from any node of the system. If the save parameter is not specified on the command line, other command-line
parameters are only in effect for the current run of dbschk.
When -save is included on the command-line, dbschk does not check
database responsiveness, but instead only saves the current command-line
settings as new dbschk default values.
Note: The default dbschk settings are global to the system. They are used
when dbschk is run from any node of MPP system. If you use the -save
option to store current -job or -trigger settings as defaults, ensure the
specified programs or scripts exist on all nodes of the system.
-timeout
wait_seconds
Specifies how long dbschk waits for a response from Teradata Database after
running the program specified by the -job option. Once the time specified
by -timeout has elapsed with no response from the database, dbschk runs job again. As long as there is no response from the database, dbschk
continues trying -job the number of times specified by the -rate parameter
before running the program specified by the -trigger parameter.
wait_seconds is a positive integer. The factory default is 300 seconds.
Note: Setting a very low a value for -timeout is impractical, and can
adversely affect system performance.
232
Utilities
Syntax Element
Description
-trigger
trigger_program
Usage Notes
Parameters set on the dbschk command line are valid only for the current session unless the
-save parameter is used.
To see the current and factory default settings, use dbschk -l.
When dbschk starts, if the log file is 5MB or larger, dbschk flushes the current log entries to a
new file that has .old appended to the original log file name. Logging continues to the
original log file. For example, when an original log file named myfile.log grows to 5MB, the
entries are moved from myfile.log to myfile.log.old, and logging continues to myfile.log. The
next time myfile.log reaches 5MB, the information is flushed again to myfile.log.old,
overwriting the information that was in the .old file.
Example 1
The following example uses the -l option to display the current dbschk default settings.
> dbschk -l
Current default values :
power
: ON
timeout : 120 seconds
rate
: 3 trials
delay
: 600 seconds
logflush : 1200 seconds
job
: csp -mode list -source table
logfile : /var/opt/teradata/tdtemp/dbschk.log
trigger : pdestate -a
Factory default values :
power
: OFF
timeout : 300 seconds
rate
: 5 trials
delay
: 1200 seconds
logflush : 3600 seconds
job
: csp -mode list -source table
logfile : /var/opt/teradata/tdtemp/dbschk.log
trigger : pdestate -a
Utilities
233
Example 2
The following example runs dbschk with the -save option, setting the default values to allow
dbschk to run and to send dbschk output to the computer screen.
>dbschk -save -power ON -logfile stdout
Current default values :
power
: ON
timeout : 300 seconds
rate
: 5 trials
delay
: 1200 seconds
logflush : 3600 seconds
job
: csp -mode list -source table
logfile : stdout
trigger : pdestate -a
Factory default values :
power
: OFF
timeout : 300 seconds
rate
: 5 trials
delay
: 1200 seconds
logflush : 3600 seconds
job
: csp -mode list -source table
logfile : D:\Program Files\Teradata\Tdat\TdTemp\dbschk.log
trigger : pdestate -a
Do you want to save the new settings as dbschk default values? (y/n): y
New settings saved...
(dbschk): Normal termination - OK
234
Utilities
Example 3
The following example runs dbschk to check database responsiveness. The command-line
settings cause dbschk to run two times, waiting five seconds between runs.
>dbschk -n 2 -delay 5
(dbschk): current default values :
power
: ON
timeout : 300 seconds
rate
: 5 trials
delay
: 5 seconds
logflush : 3600 seconds
job
: csp -mode list -source table
logfile : stdout
trigger : pdestate -a
Factory default values:
power
: OFF
timeout : 300 seconds
rate
: 5 trials
delay
: 1200 seconds
logflush : 3600 seconds
job
: csp -mode list -source table
logfile : /var/opt/teradata/tdtemp/dbschk.log
trigger : pdestate -a
csp:
csp:
csp:
csp:
csp:
csp:
csp:
Utilities
235
nodecheck
Purpose
nodecheck is a command-line diagnostic tool that finds node-level resource values on the
local node. nodecheck provides summary data by node to syscheck for analyses or provides
detailed output to the nodecheck log file, which is used later for analysis by syscheck.
Syntax
nodecheck
-D
-f log
-h
-I
-L
-r rscfile
-t
n
log
-v
FF07D399
Syntax Element
Description
-D
-f log
236
-h
-I
Utilities
Syntax Element
Description
-L
Logs the output to a file in the /tpi-data directory on the node where nodecheck
is run.
The default log filename is nodecheck with an extension indicating the TPA
cyclecount at the time of the run (for example, nodecheck.2).
You can specify a specific log filename or location using the -f log option.
Additional tools are executed during logging mode, but their output is sent only
to the resulting file.
-r rscfile
Specifies an additional resource file whose values will override those in the
default syscheckrc file (and optional syscheckrc file, if one exists). For
information on the syscheckrc file, see syscheckrc File on page 248.
-t
Directs nodecheck to read node-level resource data from one of the following
previously created log files.
If you use n, nodecheck reads data from the /tpi-data/nodecheck.n file,
where n indicates the TPA cyclecount at the time of the run.
If you use log, nodecheck reads data from a user-defined path or filename
that contains the log information.
-v
Displays the current resource values on the local node, evaluates the resource
values, and notifies you of the status of all tunable resources, regardless of level.
Usage Notes
If you invoke nodecheck without any options, then nodecheck does the following:
The defined node-level resource names and values are located in the -nodeonly section of the
syscheckrc configuration file. The syscheckrc file is read and processed at the following
locations:
Note: When executed through syscheck, nodecheck will only read and process the local
syscheckrc file. This means that changes to the -timercontrol section must be propagated to all
nodes in order for nodecheck to run similarly on each node.
where log is the eventual location (a user-defined path or filename) that contains the log
information. nodecheck will still print and evaluate the current resources.
Utilities
237
Example 1
The following is an example of running nodecheck with no options.
nodecheck
Reading Node Resources... please wait...
Which Linux are we: SuSE
FreeMemory(Pages) and FreeSwap(Blocks)
/usr/bin/sar -r 2 5
FREEMEM
13648.5
FREESWAP
65396880
PDE Msg Daemon Queue length
/usr/pde/bin/pdeglobal msg -knode
MSGEVCOUNT
0
BNS Block Queue
/usr/pde/bin/puma -D BlockStats/d
BNSBLKQ
0
Available AMP Worker Tasks
/usr/pde/bin/puma -c
Count
Vproc
55
0
56
1
56
2
56
3
56
4
56
5
BNS reject% for different Message types
/usr/pde/bin/tdnstat -a 5 2
SBR_FCount%
Message Type
0
RXGRPREC
0
RXGRPSEG
0
RXP2PREC
0
RXP2PSEG
SegTblFull%
Message Type
0
RXGRPSEG
0
RXP2PSEG
Evaluating results... please wait...
No tunables show status of WARN or ALERT
Example 2
The following is an example of running syscheck with the -D option to display -nodeonly and
-timercontrol tunables in syscheckrc format.
nodecheck -D
-nodeonly
AMPWT
BNSBLKQ
FREEMEM
FREESWAP
MSGEVCOUNT
RXMSGFC
238
WARN
WARN
WARN
WARN
WARN
WARN
-0
500
-1000
-2000
100
90
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
-0
100
-500
-1000
300
100
Utilities
WARN
80
ALERT
100
-timercontrol
SARSAMPLE
SARSLEEP
TDNSTATSAMPLE
TDNSTATSLEEP
5
2
2
5
Example 3
The following is an example of running syscheck with the -I option to display -nodeonly and
-timercontrol tunables.
nodecheck -I
Tunable
AMPWT
BNSBLKQ
FREEMEM
FREESWAP
MSGEVCOUNT
RXMSGFC
SEGTBLFULL
WARN
<=0
>=500
<=1000
<=2000
>=100
>=90
>=80
Tunable
SARSAMPLE
SARSLEEP
TDNSTATSAMPLE
TDNSTATSLEEP
Value
5
2
2
5
ALERT
<=0
>=100
<=500
<=1000
>=300
>=100
>=100
Example 4
The following is an example of running nodecheck with the -L option.
nodecheck -L
Writing to log file: /tpi-data/nodecheck.8
Reading Node Resources... please wait...
Which Linux are we: SuSE
FreeMemory(Pages) and FreeSwap(Blocks)
/usr/bin/sar -r 2 5
FREEMEM
13591.25
FREESWAP
65396880
PDE Msg Daemon Queue length
/usr/pde/bin/pdeglobal msg -knode
MSGEVCOUNT
0
BNS Block Queue
/usr/pde/bin/puma -D BlockStats/d
BNSBLKQ
0
Available AMP Worker Tasks
/usr/pde/bin/puma -c
Count
Vproc
55
0
56
1
56
2
Utilities
239
3
4
5
Example 5
The following is an example of running nodecheck with the -v option.
nodecheck -v
Reading Node Resources... please wait...
Which Linux are we: SuSE
FreeMemory(Pages) and FreeSwap(Blocks)
/usr/bin/sar -r 2 5
FREEMEM
13319.5
FREESWAP
65396880
PDE Msg Daemon Queue length
/usr/pde/bin/pdeglobal msg -knode
MSGEVCOUNT
0
BNS Block Queue
/usr/pde/bin/puma -D BlockStats/d
BNSBLKQ
0
Available AMP Worker Tasks
/usr/pde/bin/puma -c
Count
Vproc
55
0
56
1
56
2
56
3
56
4
56
5
BNS reject% for different Message types
/usr/pde/bin/tdnstat -a 5 2
SBR_FCount%
Message Type
0
RXGRPREC
0
RXGRPSEG
0
RXP2PREC
0
RXP2PSEG
SegTblFull%
Message Type
240
Utilities
RXGRPSEG
RXP2PSEG
Current
Level
Current
Value
FreeMemory(Pages)
FreeSwap(Blocks)
PDE Msg Daemon Queue Length
BNS Block Queue Length
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(SEGTBLFULL)
BNS Msg Reject%(SEGTBLFULL)
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
13319.5
65396880
0
0
55
56
56
56
56
56
0
0
0
0
0
0
Threshold
Value
Vproc Number/
Message Type
0
1
2
3
4
5
RXGRPREC
RXGRPSEG
RXP2PREC
RXP2PSEG
RXGRPSEG
RXP2PSEG
Example 6
The following is an example of running nodecheck with the -v option and reading output
from a previously generated log file. The TPA cyclecount is specified to gain access to the
recently created default log file.
nodecheck -t 8 -v
Reading from log file: /tpi-data/nodecheck.8
Which Linux are we: SuSE
FreeMemory(Pages) and FreeSwap(Blocks)
/usr/bin/sar -r 2 5
FREEMEM
13591.25
FREESWAP
65396880
PDE Msg Daemon Queue length
/usr/pde/bin/pdeglobal msg -knode
MSGEVCOUNT
0
BNS Block Queue
/usr/pde/bin/puma -D BlockStats/d
BNSBLKQ
0
Available AMP Worker Tasks
/usr/pde/bin/puma -c
Count
Vproc
55
0
56
1
56
2
56
3
56
4
56
5
Utilities
241
Current
Level
FreeMemory(Pages)
FreeSwap(Blocks)
PDE Msg Daemon Queue Length
BNS Block Queue Length
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
Available AMP Worker Tasks
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(SEGTBLFULL)
BNS Msg Reject%(SEGTBLFULL)
Current
Value
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
Threshold
Value
13591.25
65396880
0
0
55
56
56
56
56
56
0
0
0
0
0
0
Vproc Number/
Message Type
0
1
2
3
4
5
RXGRPREC
RXGRPSEG
RXP2PREC
RXP2PSEG
RXGRPSEG
RXP2PSEG
Messages
nodecheck displays the following types of messages.
The message...
Appears...
Error
Warning
242
invalid information is found during processing of the syscheckrc file or for other
reasons.
Utilities
syscheck
Purpose
syscheck monitors the system for signs of congestion that might lead to system slowdowns or
perceived hangs and notifies you when Warning or Alert thresholds are reached.
Syntax
syscheck
-D
-h
-I
-L
-n nl
-r rscfile
-t n
-v
FF07D398
Syntax Element.
Description
-D
Utilities
-h
-I
243
Syntax Element.
Description
-L
Logs the output to a file in the /tpi-data directory on each node where
nodecheck is run.
The default log filename is nodecheck with an extension indicating the TPA
cyclecount at the time of the run (for example, nodecheck.2).
You can specify a specific log filename or location using the -f log option.
Additional tools are executed during logging mode, but their output is sent
only to the resulting file. For more information, see nodecheck on
page 236.
-n nl
-r rscfile
Specifies an additional resource file whose values will override those in the
default syscheckrc file (and optional syscheckrc file, if one exists).
Note: syscheck will not take into account the -timercontrol section of the
custom resource file you indicate with the -r rscfile option. Since syscheck
executes nodecheck locally as well as on each remote node, modifications to
the default and optional syscheckrc file on the local nodes will be considered
for that local spawn of nodecheck. That is, where syscheck is concerned,
-timercontrol changes are local, and nodeonly changes are global. Where
nodecheck is concerned, all changes take effect locally.
-t n
-v
Displays all the resource values for each node, evaluates the resource values,
and notifies you of the status of all tunable resources, regardless of level.
Usage Notes
syscheck does not automatically reset the system when any threshold is reached. The DBA or
operator decides when to reset the system if the congestion persists.
syscheck is a system-wide tool (as compared to nodecheck, which is node-only tool) and does
the following in this order:
244
Utilities
THEN syscheck...
syscheck also checks the Teradata PDE and Database states on the node on which you execute
syscheck, informing you if either is not in a fully functional state.
The defined node-level resource names and threshold values for alerts and warnings are
located in the -nodeonly section of the syscheckrc configuration file. For more information,
see syscheckrc File on page 248.
Example 1
The following is an example of running syscheck with no options.
syscheck
Processing resource values for WARN/ALERT status... please wait...
NODE ID: localhost
Resource
Description
FreeMemory(Pages)
Utilities
Current
Level
WARN
Current
Value
992
Threshold
Value
<=1000
Vproc Number
Message Type
245
Example 2
The following is an example of running syscheck with the -D option to display -nodeonly and
-timercontrol tunables in syscheckrc format.
syscheck -D
-nodeonly
AMPWT
BNSBLKQ
FREEMEM
FREESWAP
MSGEVCOUNT
RXMSGFC
SEGTBLFULL
VPRPAGES
-timercontrol
SARSAMPLE
SARSLEEP
TDNSTATSAMPLE
TDNSTATSLEEP
WARN
WARN
WARN
WARN
WARN
WARN
WARN
WARN
-0
500
-1000
-2000
100
90
80
-2
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
-0
100
-500
-1000
300
100
100
-0
1
1
1
1
Example 3
The following is an example of running syscheck with the -I option to display -nodeonly and
-timercontrol tunables.
syscheck -I
Tunable
AMPWT
BNSBLKQ
FREEMEM
FREESWAP
MSGEVCOUNT
RXMSGFC
SEGTBLFULL
VPRPAGES
Tunable
SARSAMPLE
SARSLEEP
TDNSTATSAMPLE
TDNSTATSLEEP
WARN
<=0
>=500
<=1000
<=2000
>=100
>=90
>=80
<=2
Value
1
1
1
1
ALERT
<=0
>=100
<=500
<=1000
>=300
>=100
>=100
<=0
Example 4
The following is an example of running syscheck with the -L option.
syscheck -L
Processing resource values for WARN/ALERT status... please wait...
NODE ID: localhost
No tunables show status of WARN or ALERT
246
Utilities
Example 5
syscheck -v
Processing resource values for any status... please wait...
NODE ID: localhost
Resource
Description
FreeMemory(Pages)
FreeSwap(Blocks)
PDE Msg Daemon Queue Length
BNS Block Queue Length
Available AMP Worker Tasks
Available AMP Worker Tasks
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(SEGTBLFULL)
BNS Msg Reject%(SEGTBLFULL)
Current
Level
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
Current
Value
Threshold
Value
3158
620128
0
0
55
56
0
0
0
0
0
0
Vproc Number/
Message Type
0
1
RXGRPREC
RXGRPSEG
RXP2PREC
RXP2PSEG
RXGRPSEG
RXP2PSEG
Example 6 - Windows
syscheck -t 22 -v
Logfile to be processed: e:\PROGRA~1\Teradata\tdat\tdconfig\tmp\tpidata\nodecheck.22
Processing resource values for any status... please wait...
NODE ID: localhost
Resource
Description
FreeMemory(Pages)
FreeSwap(Blocks)
PDE Msg Daemon Queue Length
BNS Block Queue Length
Available AMP Worker Tasks
Available AMP Worker Tasks
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(FC)
BNS Msg Reject%(SEGTBLFULL)
BNS Msg Reject%(SEGTBLFULL)
Utilities
Current
Level
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
Current
Value
3207
620128
0
0
55
56
0
0
0
0
0
0
Threshold
Value
Vproc Number/
Message Type
0
1
RXGRPREC
RXGRPSEG
RXP2PREC
RXP2PSEG
RXGRPSEG
RXP2PSEG
247
syscheckrc File
syscheckrc is a text file that contains system, kernel, and Teradata Database-specific
parameters. When these parameters are exceeded, your system resources may run low,
resulting in poor performance.
Although not mandatory, all copies of syscheckrc should be identical on all nodes. However,
each copy of syscheckrc must correspond to the specific node on which syscheckrc resides.
Caution:
Do NOT modify the default syscheckrc file. To create a custom syscheckrc file, see Creating a
syscheckrc File on page 250.
The default syscheckrc file is read and processed at the following locations.
On...
Linux
/usr/pde/etc directory.
Windows
Each line can have a single resource entry that has name and value strings separated by
white space.
248
Utilities
WARN -1000
WARN -2000
WARN 100
WARN 90
WARN 80
WARN -2
ALERT -500
ALERT -1000
ALERT 300
ALERT 100
ALERT 100
ALERT -0
-timercontrol
# used to override behavior of sar and tdnstat in nodecheck
# i.e. sar.exe -r SARSLEEP SARSAMPLE
# values need to be integers >= 1
SARSLEEP
SARSAMPLE
TDNSTATSLEEP
TDNSTATSAMPLE
Caution:
2
5
5
2
The -testdriver section maps to the executables of each node and is different, depending on
the platform.
Do NOT modify the -testdriver section. If you modify the -testdriver section, nodecheck and
syscheck might fail.
The -nodeonly section allows you to define the WARN and ALERT threshold levels for
each system resource.
If the threshold value is negative, then the condition (either WARN or ALERT) will be
triggered when that system resource attribute falls below that value. Otherwise, the
condition is triggered when the attribute rises above that value.
The default syscheckrc file contains default values. You should never edit the default
syscheckrc file itself. You can customize the warning and alert levels in a custom syscheckrc
file. For more information on creating your own customized syscheckrc file, see Creating
a syscheckrc File on page 250.
The following table describes each system resource attribute.
Utilities
Description
AMPWT
Warning and alert threshold level for available (or running out) of
AMP work tasks (AWTs).
BNSBLKQ
Warning and alert threshold level for BNS services in BNS block
queue.
FREEMEM
FREESWAP
MSGEVCOUNT
Warning and alert threshold levels for message count in PDE message
event queue.
RXMSGFC
249
Description
SEGTBLFULL
Warning and alert threshold for percentage occupation of multisegment table entries. 100% indicates that the multi-packet messages
are naked or all the multi-packet segment table slots are currently
occupied.
The -timercontrol section allows you to adjust the sample number and sleep time.
Currently, only two tools use these parameters:
TDNSTAT utility
Linux
Windows
250
Copy the default syscheckrc file to the appropriate optional location noted above. (You can
also use the -D option of nodecheck or syscheck and redirect the output to capture the
default settings.)
Utilities
WARN
WARN
WARN
WARN
WARN
WARN
WARN
-timercontrol
SARSAMPLE
SARSLEEP
TDNSTATSAMPLE
TDNSTATSLEEP
1
1
1
1
-3
300
-500
-1000
200
75
75
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
ALERT
-0
600
-250
-500
400
100
100
You can also specify a customized resource configuration file for syscheck and nodecheck to
use by specifying the -r option with the configuration files path and filename when you start
syscheck or nodecheck. The values in this file will override the values in the default and
optional syscheckrc files. You should follow the same basic copy-and-edit steps to create this
file as noted above for creating an optional syscheckrc file.
Utilities
251
252
Utilities
CHAPTER 28
The Show Locks utility, showlocks, provides information about Host Utility (HUT) locks
placed on databases and tables by the Archive/Recovery (ARC) utility during database
operations.
These locks might interfere with application processing and should be released after utility
processing is complete. Show Locks also displays information about locks placed during a
Teradata Database system failure.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
Utilities
Archive/Recovery locks are associated with the currently logged-on user who entered the
command, rather than with a batch job or transaction.
Only the AMPs that are participating in the Archive/Recovery operation are locked.
Archive/Recovery locks placed at one level of an object never conflict with a utility lock at
another level that was placed on the same object for the same user. The locking modes and
levels are applied as follows:
253
If a table being dumped is defined for an after-image permanent journal (and the
appropriate option was selected on the DUMP command), a group Read lock is placed
on the table rows.
An Exclusive lock is placed on any object being restored that is not a journal table.
Note: If Archive/Recovery locks are not specifically released, they are automatically reinstated
following a Teradata Database or client system restart.
Show Locks reports All AMPs rather than individual AMP numbers when the locked database
or table resides on all AMPs. Information is provided for only the most restrictive lock a user
has placed on an object. An example of a complete Show Locks display is shown below.
_______
|
|
___
| /
| --| \___
__
|/
|
|
|
|
____
| ____ __|__ ____
\ ____| ____| ____|
|
____|
/
| /
| /
|
|
/
|
\____| \____| \____|
|__ \____|
254
Utilities
24
27
3
In the previous example, exclusive locks are placed on the employee table in the personnel
database and on the entire service database. One read lock is placed on the parts database, and
another read lock on the invoice table in the accounting database. Also, the following locks are
applied.
Username...
ADMIN
PETERS
ACCMGR
DBC
Utilities
255
Conflicts
If a host utility lock that conflicts with Show Locks is in place when showlocks is executed, the
Teradata Database system displays this message:
Unable to proceed due to xxxx lock on yyyy
Syntax element...
Is...
xxxx
yyyy
256
Utilities
CHAPTER 29
The Table Rebuild utility, rebuild, recovers data tables (primary, fallback, or both) on specified
AMPs.
Normally, Teradata Database utilizes fallback data, if available, to recover offline AMPs
automatically during startup. However, occasionally, primary or fallback data can be
corrupted by software errors or other abnormal conditions. Table Rebuild allows on-demand
recovery of data that is suspected of being corrupt.
Runs From
Table Rebulid runs from Database Window or comparable interface to the Teradata Database
console subsystem, such as cnsterm.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Rebuilding Tables
Table Rebuild can recover primary data, fallback data, or both primary and fallback data that
is stored on an AMP. A single table, all tables in a specified database, or all tables on the AMP
can be rebuilt. As an option, the rebuild process can be limited to only those tables that have
fallback protection.
The rebuild process uses fallback data to recover primary data, and primary data to recover
fallback data on a specified AMP. The current, presumably corrupted contents of the table
being rebuilt are deleted and replaced with the fallback or primary data, as appropriate. For
tables with no fallback protection, Table Rebuild restores an empty table that retains only the
table header information. Using the FALLBACK TABLES option ensures that only tables with
fallback protection are rebuilt. See REBUILD AMP FALLBACK TABLES on page 267.
Note: Tables that are marked down at the time they are rebuilt will remain down after the
rebuild. To clear the down status, use the ALTER TABLE ... RESET DOWN statement after the
table is rebuilt.
Global temporary tables, volatile tables, join indexes, and hash indexes cannot be rebuilt. For
indexes that may be corrupted, drop the index and recreate it as needed.
Certain non-fallback system tables, such as DBC.DataBaseSpace and DBC.Acctg, store
information that is unique to each AMP. These tables maintain information such as the
current database space utilization, CPU utilization, and I/O statistics for the AMP. Instead
Utilities
257
these tables are updated by the system automatically after the rebuilt AMP is placed back on
line.
If a database restart interrupts an ALL TABLES rebuild process, it can be restarted again, and
will continue from where the rebuild process was interrupted. For more information, see
RESTART REBUILD on page 270.
Database-level read locks are placed on the database on the AMP used as the source of data
for rebuilding the corrupted tables. This is the default type of lock that Table Rebuild
applies.
Table-level read locks are place on the individual tables that are the sources of data for
rebuilding the corrupted tables.
Rowrange-level read locks consist of selected groups of row-only locks. This type of lock
allows concurrent updates of the tables being used as the sources of data for rebuilding the
corrupted tables.
In the case of rebuilding primary data, these locks are placed on the AMPs containing the
corresponding fallback data. In the case of rebuilding fallback data, the locks are placed on the
AMPs containing the corresponding primary data.
Whether the database, table, or rowrange option is specified, Table Rebuild requests a read
lock on all online AMPs which belong to the same cluster for the database or table being
rebuilt. These AMPs contain the valid data that will be copied back to the AMPs being rebuilt.
Rowrange-level locks are applied locally to the AMP that is being rebuilt, so that the valid data
can be copied back to the rebuilt AMP.
For database and table rebuilds, processing begins after the lock is acquired. For rowrange
rebuilds, the table-level lock is changed to a rowrange lock before processing begins.
If an AMP is online while a database or table is being rebuilt, an exclusive lock is placed on the
database or table. If the AMP is offline, a read lock is used.
If all tables on an AMP are being rebuilt, Table Rebuild attempts to set database-level read
locks. If a database lock fails because of a conflict with another lock, that database is bypassed.
Table Rebuild attempts to rebuild the database again after all accessible databases and tables
are processed. Table Rebuild successively runs through the list of bypassed databases to
attempt to get a lock. If the bypass list contains a single database, or Table Rebuild has tried the
list of bypassed databases ten times, rebuild processing stops and waits until a lock can be
acquired.
If Table Rebuild is running in the background, a message is displayed on the system console
identifying the database and stating that the utility is waiting for a lock.
258
Utilities
Description
REBUILD AMP
RESTART REBUILD
Usage Notes
Normally, Table Rebuild is run interactively, as a foreground process started from a Database
Window application window. Output from the program is directed to the window.
Optionally, Table Rebuild can be run as a background process. Output from the program is
logged to a special table, rather than being displayed on screen. All background rebuild
operations continue to run to completion, even after Table Rebuild is quit. For more
information, see the LOG INTO option described for REBUILD AMP on page 261 and
REBUILD AMP FALLBACK TABLES on page 267.
Several rebuild operations, both foreground and background rebuilds, can be run
simultaneously. Up to four interactive foreground sessions can utilize the four application
windows available in Database Window. Each session must rebuild tables on AMPs in
different clusters.
Any number of background process rebuilds can run simultaneously, and can be launched
from the same application window. Each rebuild process must rebuild tables on an AMP in
different clusters.
Error Handling
Table Rebuild issues messages interactively.
The following message might be returned by Table Rebuild after processing is complete:
Bad table header on AMP ccc-p for table tablename
Utilities
The table header does not exist. This might be because the table was dropped after Table
Rebuild was started.
A header was found, but the table was rebuilt unsuccessfully on the identified AMP.
259
To recover the table, restore it from the latest archive. If restoring from an archive is not an
option, contact the Teradata Support Center.
For more information on error messages involving AMP operations, see Messages.
Getting Help
To get help information about the Table Rebuild utility, press the F7 key while in the Database
Window application window. A set of second-level function keys will display as shown below:
Help
The Table Rebuild utility allows you to recover the data tables on a
specified AMPs disk(s) by copying the fallback copy maintained by the
other AMPs in the cluster. You may rebuild all or part of the tables on
an AMP via the options listed below.>
<F2>
<F3>
<F4>
<F5>
<F6>
<F7>
Rebuild
Rebuild
Rebuild
Rebuild
Rebuild
General
For information on the subjects listed on the screen, press the corresponding function key. To
return to the next-higher menu level, press the F8 key. To exit the help system and return to
the Table Rebuild command prompt, press F8 from the top-level menu.
260
Utilities
REBUILD AMP
Purpose
Rebuilds entire databases, all tables, stored procedures (fallback), UDMs, UDFs, entire tables
(primary and fallback), portions of tables (primary or fallback) in a selected database, an
entire table (primary and fallback) or a portion of a table (primary or fallback) for a specified
AMP.
Syntax
REBUILD AMP
nnnn
ALL TABLES
ALL DATA
dbase
ALL DATA
dbase.tbl
PRIMARY DATA
FALLBACK DATA
3
;
A
, LOG INTO logdbase.logtbl
, NO LOCK
ON NO FALLBACK TABLES
IN PARALLEL
n TABLES
1102D135
Syntax element
Specifies
nnnn
ALL TABLES
that all table data stored on the AMP, whether primary or fallback data,
is to be rebuilt.
Tables with fallback protection are fully recovered. Tables without
fallback protection are left empty on the AMP. All the data in the
permanent journals will be recovered, except for journal rows for nonfallback tables without the dual journaling option.
The AMP to be rebuilt must be in the UTILITY vproc state and
running DBS partitions. All the other AMPs in the cluster must be online.
For more information, see Before Rebuilding All Tables on page 264.
Utilities
261
Syntax element
Specifies
dbase
dbase.tbl
ALL DATA
that both primary data and fallback data tables stored on the AMP
should be rebuilt. recommended, unless you are certain that only
primary or only fallback data on the AMP has been corrupted.
PRIMARY DATA
that only the primary data tables stored on the AMP should be rebuilt.
Use the ALL DATA option unless you are certain that only primary data
on the AMP has been corrupted.
FALLBACK DATA
that only the fallback data tables stored on the AMP should be rebuilt.
Use the ALL DATA option unless you are certain that only fallback data
on the AMP has been corrupted.
262
that Table Rebuild is to run in the quiet mode or background mode. All
messages will be written to the system console and to a user-defined
table. The table is specified by database name and table name. For more
information, see Running Table Rebuild in the Background on
page 265.
Utilities
Syntax element
Specifies
NO LOCK [ON NO
FALLBACK TABLES]
that a table-level read lock will be placed on the source AMP table to be
used to rebuild the corrupted table.
Note: This option is valid only with the ALL TABLES option.
WITH ROWRANGE
LOCK
Utilities
263
Syntax element
Specifies
[n TABLES]
IN PARALLEL
Usage Notes
Regardless of whether the AMP to be rebuilt is offline or online during Table Rebuild, all other
AMPs in the same cluster must be online. AMPs in other clusters may be offline.
In addition to text, hex format values are accepted for the dbase and dbase.tbl variables. Use
the following format:
'HHHH...HH'xn
Where the HH is the hexadecimal representation of a character byte whose ASCII value is
known to the database software. For example: DBC.TVMID could be input as
'444243'xn.'54564D4944'xn.
Teradata Database can isolate some file system errors to a specific data or index subtable, or to
a contiguous range of rows (region) in a data or index subtable. In these cases, Teradata
Database marks only the affected subtable or region down. This improves system performance
and availability by allowing transactions that do not require access to the down subtable or
rows to proceed, without causing a database crash that would require a system restart.
The normal rebuild process removes down-region information from the table header. For
more information on down regions, see the CheckTable and DBS Control chapters in Volume
One of Utilities.
Before Rebuilding All Tables
Before rebuilding all tables, do the following:
1
Use the Vproc Manager utility to set the VprocState of the AMP that will be rebuilt to
FATAL.
264
Utilities
Use the Vproc Manager utility to boot the AMP that will be rebuilt.
Messages will be displayed on the system console to indicate the status of the boot. If the
boot is successful, this AMP is ready for an ALL TABLES rebuild.
Note: The BOOT command will re-initialize the disk of the AMP in anticipation of alltables table rebuild and start the DBS partitions on the specified AMP. This applies only to
vprocs with a VprocState of FATAL and a ConfigStatus of Down. A confirmation input is
necessary to process the initialization.
Valid VprocIds are decimal numbers in the range of 0 through either 30719 or 16383,
depending on the system.
Note: Hex numbers can also be specified by appending a trailing x (for example, 0x,
3FFx).
Start Table Rebuild and run an ALL TABLES rebuild on this AMP.
When the rebuild is done, use the Vproc Manager utility to set the VprocState of this AMP
to ONLINE.
Note: Table Rebuild automatically sets the VprocState of this AMP from UTILITY to
OFFLINE when complete.
The table must have been defined previously as shown above, with the table characteristics
matching the example. The names of the database, table, and columns are customizable.
The MsgAMP (third column) contains a four-digit AMP number.
Utilities
265
Meaning
A normal message
Error message
266
Utilities
Purpose
Rebuilds only tables with fallback protection, including stored procedure tables. Because Table
Rebuild deletes all tables selected for rebuild before the start of the rebuild process, this
command prevents tables without fallback protection from being deleted.
This command performs most of the work which is done by normal down AMP recovery,
making the actual restart to bring a down AMP back on line as fast as possible, while
guaranteeing data integrity. The AMP to be rebuilt must be off line and all of the other AMPs
in the cluster must be on line.
Syntax
nnnn
REBUILD AMP
FALLBACK TABLES
A
3
;
A
, LOG INTO logdbase.logtbl
IN PARALLEL
n TABLES
Utilities
1102B221
Syntax element
Specifies
nnnn
FALLBACK TABLES
that only tables with fallback protection will be rebuilt. This prevents
tables without fallback protection from being deleted. The first step
that Table Rebuild usually performs is to delete the contents of the table
that Table Rebuild is rebuilding.
that Table Rebuild is to run in the quiet mode or background mode. All
messages will be written to the system console and to a user-defined
table. The table is specified by database name and table name. For more
information, see Running Table Rebuild in the Background on
page 268.
267
Syntax element
Specifies
that a table-level read lock will be placed on the source AMP table to be
used to rebuild the corrupted table.
WITH ROWRANGE
LOCK
[n TABLES]
IN PARALLEL
that multiple tables per database should be rebuilt in parallel. This can
make the rebuild operations complete more quickly. From two to six
tables can be rebuilt simultaneously.
n is an integer from 2 to 6 that specifies how many tables will be rebuilt
in parallel. If n TABLES is not specified, the default number of tables
that will be rebuilt in parallel is six.
Usage Notes
Regardless of whether the AMP to be rebuilt is offline or online during Table Rebuild, all other
AMPs in the same cluster must be online. AMPs in other clusters may be offline.
Teradata Database can isolate some file system errors to a specific data or index subtable, or to
a contiguous range of rows (region) in a data or index subtable. In these cases, Teradata
Database marks only the affected subtable or region down. This improves system performance
and availability by allowing transactions that do not require access to the down subtable or
rows to proceed, without causing a database crash that would require a system restart.
The normal rebuild process removes down-region information from the table header. For
more information on down regions, see the CheckTable and DBS Control chapters in Volume
One of Utilities.
Running Table Rebuild in the Background
When you specify the LOG INTO logdbase.logtbl option, Table Rebuild runs as a background
task. You can run multiple Table Rebuild operations both in the background and foreground
(interactive mode) at the same time. Completion messages for background rebuilds are sent to
the system console and to the user-defined table specified in the LOG INTO option.
The table specified in the LOG INTO option must have been created previously as follows:
CREATE SET TABLE LogDB.LogTable ,FALLBACK ,NO BEFORE JOURNAL,
NO AFTER JOURNAL,CHECKSUM = DEFAULT
( MsgDate CHAR(8) CHARACTER SET LATIN NOT CASESPECIFIC,
MsgTime CHAR(8) CHARACTER SET LATIN NOT CASESPECIFIC,
MsgAMP CHAR(6) CHARACTER SET LATIN NOT CASESPECIFIC,
MsgCode CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,
268
Utilities
The table must have been defined previously as shown above, with the table characteristics
matching the example. The names of the database, table, and columns are customizable.
The MsgAMP (third column) contains a four-digit AMP number.
The MsgCode (fourth column) has one of the following values:
Value
Meaning
A normal message
Error message
Utilities
269
RESTART REBUILD
Purpose
Restarts an all-table rebuild operation (REBUILD command with the ALL TABLES options
specified).
If a Teradata Database failure occurs while a Table Rebuild is running for all tables, this
command restarts the rebuild process, bypassing databases and tables already rebuilt, and
continuing from the table that was being rebuilt when the system failed.
Syntax
RESTART REBUILD ON AMP
nnnn
GS06A011
Syntax element
Specifies
nnnn
the vproc number of the AMP which was previously running the ALL
TABLES rebuild.
Usage Notes
The RESTART REBUILD command restarts an all-table rebuild that was terminated by a
system restart or failure. After RESTART REBUILD is executed, no intervention is required.
Table Rebuild automatically determines where the rebuild terminated and restarts at the
appropriate place. Table Rebuild determines where to restart by using the spool files that
contain the database names and table names to be rebuilt (in order by database ID and by
table ID within the database). Before each subtable (primary or fallback) is rebuilt, Table
Rebuild writes a restart record to the current DBC table SysRcvStatJournal.
When you start a RESTART REBUILD, the program reads the restart record and positions
itself in the spool file accordingly. After completion of the Table Rebuild, the restart row is
deleted from the journal table.
270
Utilities
CHAPTER 30
Task List utility, tsklist, displays information about PDE processes and their tasks. This is
useful for identifying which programs and tasks are running.
Runs From
Task List runs from the Linux command line.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
tsklist
-a
-b
-i
-l
- p partition
- r relvpr
-s
-S
- v vprid
prgname
1102A166
Syntax element
Description
-a
Includes all programs, including PDE system programs, which are those in the
node vproc and in partition 0.
By default, only TPA programs are shown.
Utilities
271
Syntax element
Description
-b
-i
-l
Shows traces in long form, with nearly all available fields for each program and
task being displayed on multiple lines.
The default is to show a one-line display of the most important fields.
-p partition
-r relvpr
-s
Shows only a summary of the programs that are running, without any details on
the tasks they contain.
The default is to show all tasks in the programs selected in addition to the
program-level information.
-S
-v vprid
prgname
Shows only program(s) where the program name starts with the provided
characters.
For example, if prgname is pde, then pdemain and pdevproc information would
display.
The comparison is case insensitive. The -a option is implied.
272
Utilities
Examples
The following examples are from a test system with two AMPS and one PE.
Example 1
Task List running in summary mode to show only non-PDE process information.
> tsklist -s
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
7
8
9
11
15
17
7
8
9
11
7
8
12
13
10
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
3edd
3edf
3ecf
3ed7
3ec4
3ecb
3ede
3ee0
3ed5
3ed8
3ee1
3ee4
3ee3
3ee2
3ebf
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
0(1)
0(1)
0(1)
0(1)
0(1)
0(1)
1(2)
1(2)
1(2)
1(2)
16383(3)
16383(3)
16383(3)
16383(3)
8192(4)
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
4100
scpstart
utadvtsk
fsustart
actmain
sssmain
sssrss
scpstart
utadvtsk
fsustart
actmain
scpstart
rtsmain
sestsk
disstart
gtwgateway
880
4184
4184
4184
4104
4104
4104
4104
4104
4104
4100
4100
4000
4100
4100
4100
4100
4100
4100
4000
4100
4100
4100
4100
pdemain
segmain
cfgmain
dmp
dbgsrvr
csp
udfsrvtsk
udfsrvtsk
udfsrvtsk
udfsrvtsk
cnscim
cspslave
pdevproc
scpstart
utadvtsk
fsustart
actmain
sssmain
sssrss
pdevproc
scpstart
utadvtsk
fsustart
actmain
Example 2
Task List running in summary mode to show all processes.
> tsklist -as
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Part:
Utilities
0
0
0
0
0
0
0
0
0
0
2
7
0
7
8
9
11
15
17
0
7
8
9
11
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
3e85
3eb5
3eb6
3ec1
3ec0
3ec2
3ed9
3eda
3edb
3edc
3ebd
3ec3
3ebb
3edd
3edf
3ecf
3ed7
3ec4
3ecb
3ebc
3ede
3ee0
3ed5
3ed8
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
16384(0)
0(1)
0(1)
0(1)
0(1)
0(1)
0(1)
0(1)
1(2)
1(2)
1(2)
1(2)
1(2)
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
273
ProcessID:
ProcessID:
ProcessID:
ProcessID:
ProcessID:
3ee1
3ee4
3ee3
3ee2
3ebf
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
VprocID(RelVpr):
16383(3)
16383(3)
16383(3)
16383(3)
8192(4)
Flags:
Flags:
Flags:
Flags:
Flags:
4100
4100
4100
4100
4100
scpstart
rtsmain
sestsk
disstart
gtwgateway
Example 3
Task List running to show task information on programs running in partition 15.
> tsklist -p 15
Part:
Pid:
Pid:
Pid:
Example 4
Task List running to show task information on programs running in partition 15 in long
format.
> tsklist -l -p 15
Part: 15 ProcessID: 3ec4 VprocID(RelVpr): 0(1) Flags: 4100 sssmain
KPart: e0000001173c8bc0 Seq: 0 Tasks: 3
Admin: KTCB: e000000114a67600 ReqKTCB: e000000114a66058 Args:
Pid: 01000490 TaskID: 0001 Flags: 1000 main is paused
KTCB: e000000114a67398 Handle: 0000000000007d98 Dbg: 0 Prio: 0
WakeReason: 0 WakeCode: 10193 WorkType: 254 WorkEst: 0
FSG: nios=0 preios=0 logios=2 nsegs=0
SEG: nsegs=2
Pid: 01000610 TaskID: 0002 Flags: 0 (admin) is in adminwait
KTCB: e000000114a67600 Handle: 0000000000007da6 Dbg: 0 Prio: 0
WakeReason: 0 WakeCode: 10193 WorkType: 254 WorkEst: 0
FSG: nios=0 preios=0 logios=0 nsegs=0
SEG: nsegs=0
Pid: 01007210 TaskID: 0006 Flags: 0 sssacctg is in msgwait
KTCB: e0000001162a5920 Handle: 0000000000007f26 Dbg: 0 Prio: 0
WakeReason: 0 WakeCode: 10193 WorkType: 254 WorkEst: 0
FSG: nios=0 preios=0 logios=0 nsegs=0
SEG: nsegs=0
Example 5
Task List running in summary mode to show only programs, the names of which start with
pde. This shows that a case-insensitive comparison is performed.
> tsklist -s pDe
Part:
Part:
Part:
0
0
0
ProcessID: 3e85
ProcessID: 3ebb
ProcessID: 3ebc
VprocID(RelVpr): 16384(0)
VprocID(RelVpr): 0(1)
VprocID(RelVpr): 1(2)
Flags: 880
Flags: 4000
Flags: 4000
pdemain
pdevproc
pdevproc
Example 6
Task List running to show only pdemain task information.
> tsklist pdemain
Part:
274
ProcessID: 3e85
VprocID(RelVpr): 16384(0)
Flags: 880
pdemain
Utilities
00000190
00000310
00000610
00001210
00001390
00001810
00003790
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
0001
0002
0006
0007
0008
000b
0010
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
Flags:
0
0
0
0
0
0
0
Example 7
Task List running to show only pdemain task information.
The -i option is used here to disable the resolving of task addresses to their corresponding
names.
tsklist -i pdemain
Part:
Pid:
Pid:
Pid:
Pid:
Pid:
Pid:
Pid:
Example 8
Example 8 shows tsklist running to show Priority Scheduler task information on an SLES 10
system.
Note: The output is truncated.
tsklist -S
Part: 7
Pid:
Pid:
Pid:
Pid:
Pid:
Pid:
Part: 8
Pid:
Pid:
Part: 9
Pid:
Pid:
Pid:
msgwait
Pid:
monyield
Pid:
Pid:
monyield
Pid:
Part: 11
Pid:
Pid:
Utilities
ProcessID: 0f04
01004ae4 TaskID:
01004b94 TaskID:
01004c44 TaskID:
01004cf4 TaskID:
01004da4 TaskID:
01004e54 TaskID:
ProcessID: 0c7c
01004f04 TaskID:
01004fb4 TaskID:
ProcessID: 0da8
01000624 TaskID:
010006d4 TaskID:
01000784 TaskID:
VprocID(RelVpr):
0878 PG: 40 AG:
0d08 PG: 0 AG:
0ee8 PG: 40 AG:
0ee0 PG: 40 AG:
0ed8 PG: 40 AG:
0ed0 PG: 40 AG:
VprocID(RelVpr):
0944 PG: 40 AG:
0ec0 PG: 0 AG:
VprocID(RelVpr):
0db4 PG: 40 AG:
0e58 PG: 0 AG:
0e44 PG: 40 AG:
0(1)
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
0(1)
200 Pri:
1 Pri:
0(1)
200 Pri:
1 Pri:
200 Pri:
200
1
200
200
200
200
01000834
TaskID: 0e3c
PG: 40
AG: 200
Pri: 13
fsubackgrndmainentry is in
010008e4
01000994
TaskID: 0e34
TaskID: 0e2c
PG: 40
PG: 40
AG: 200
AG: 200
Pri: 13
Pri: 13
fsudefrag is in msgwait
fsubackgrndmainentry is in
01000a44 TaskID:
ProcessID: 0e04
01000af4 TaskID:
01000ba4 TaskID:
13 fsuminicylpack is in msgwait
Flags: 4100 actmain
13 main is sleeping
14 (admin) is in adminwait
275
276
01000c54
01000d04
01000db4
01000e64
01000f14
01000fc4
01001074
01001124
010011d4
01001284
01001334
010013e4
01001494
01001544
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
TaskID:
0b34
08ac
0c70
0874
0824
0f1c
0cac
0dbc
0db0
0dac
0da4
0d9c
08f4
0c4c
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
PG:
40
40
40
40
40
40
40
40
40
40
40
40
40
40
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
AG:
200
200
200
200
200
200
200
200
200
200
200
200
200
200
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
Pri:
13
13
13
13
13
13
13
13
13
13
13
13
13
13
udfmanage is in msgwait
awtmain is in msgwait
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
awtmain is idle
Utilities
CHAPTER 31
The Teradata Locale Definition utility, tdlocaledef, is a command-line utility that allows you to
define or change how Teradata Database formats numeric, date, time, and currency output.
Tdlocaledef converts a specification for data formatting (SDF) text file into a Teradata
Database globally distributed object (GDO), an internal binary format file that stores
configuration information. The GDO is made available simultaneously to all nodes of an MPP
system. The utility can also convert the text file to a local, non-distributed, binary file, that can
be converted back to text in order to ensure the formatting syntax is valid.
Note: Format changes take effect only after Teradata Database is restarted, and do not affect
columns that were created prior to the restart.
Runs From
Tdlocaledef runs from the Linux command line.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
tdlocaledef
-input filename
-output
filename
new
Gt15b004
tdlocaledef
-reverse
current
filename
-source filename
1102A145
Utilities
277
Is ...
-input filename
-output filename
-output new
Specifies what happens to the compiled, binary version of the SDF formatting
settings that is produced by tdlocaledef.
filename specifies that the compiled settings be stored only in a local file.
This file is suitable for use with the -reverse option to verify that the syntax
used in the SDF text file is correct. If no path is specified, the binary file is
placed in the current directory.
new specifies that the settings become effective at the next Teradata
Database restart. The settings are compiled into a GDO, and used by all
nodes of the system. A copy of the SDF text file is stored on every node in /
etc/opt/teradata/tdconfig.
If the -output option is not specified, tdlocaledef creates a local binary file
named tdlocaledef.loc in
/etc/opt/teradata/tdconfig.
-reverse current
-reverse filename
Specifies that the compiled output format settings currently in effect or stored
in a local binary file be written to a text file suitable for viewing and editing.
This option is primarily used for creating an editable text file of the current
output formatting settings that can be used to customize or change the output
formatting that Teradata Database uses for dates, times, numbers, and
currency.
-reverse can also be used to verify correct syntax in an edited SDF text file.
current specifies that the output formatting settings currently in effect be
written to a text file.
filename specifies that the SDF settings in a local compiled binary file be
converted to a text file. Use this option to ensure that a previously compiled
SDF text file uses proper syntax. If the original text file does not match the
file produced using the -reverse filename option, there is a syntax error in
the original SDF file.
-source filename
278
Specifies the SDF text file tdlocaledef should create based on the specified reverse options. If -source is not specified, tdlocaledef creates an SDF
file named tdlocaledef.txt in the current directory.
Utilities
SDF File
The SDF file is a text file that defines how Teradata Database formats numeric, date, time, and
currency output. The formatting strings it contains are used in conjunction with special
formatting characters used in SQL FORMAT output phrases.
Teradata Database includes a default SDF file that contains a viewable and editable text version
of the default output formatting settings. The default SDF file is located in /usr/tdbms/etc.
The SDF file controls how the following kinds of information are formatted in the output of
Teradata Database.
Day names
Month names
AM and PM names
Currency symbols
The SDF file also controls the default display formats for the following data types:
BYTEINT
SMALLINT
BIGINT
INTEGER
DATE
NUMBER
Note: You cannot use the SDF file to control output formatting for the INTERVAL data type.
The formatting characters permitted in the format strings of the SDF file are the same
formatting characters permitted in an SQL FORMAT for the data types listed above. You can
override the default display format for a data type in the SDF file by using the FORMAT
output phrase in a CREATE TABLE, ALTER TABLE, or SELECT statement.
For example, you can set the value of the currency string in the SDF file to the currency
symbol native to your locale. To include that currency symbol when you display numeric
monetary information in an SQL SELECT statement, use the L formatting character in the
FORMAT output phrase. For more information on display formats and SQL output format
phrases, see SQL Data Types and Literals.
Utilities
279
Additionally, the SDF file can be used to specify a time zone string, which allows Teradata
Database to automatically adjust the system time for locales that use Daylight Savings Time.
SDF Elements
The following table describes the SDF elements. All elements must be specified once in the
SDF file. Keywords are case insensitive, but the data strings are case sensitive, unless stated
otherwise. The SDF format strings consist of printable characters from 7-bit ASCII, unless an
element is restricted further by the type of data. For out-of-range characters, use the \u
Unicode hex notation. The SDF can contain single-line comments that start with //.
Syntax element ...
Description
short_day_name is one of seven abbreviated names
for the days of the week in the native language.
;
ShortDays
"short_day_name"
Gt15b007
Example:
ShortDays
{"Sun";"Mon";"Tue";"Wed";"Thu";
"Fri";"Sat"}
;
LongDays
"long_day_name"
Gt15b008
Example:
LongDays {"Sunday";"Monday";"Tuesday";
"Wednesday";"Thursday";"Friday";
"Saturday"}
;
ShortMonths
"short_month_name"
Gt15b009
280
Utilities
Description
long_month_name is one of 12 full names for the
months of the year in the native language.
;
LongMonths
"long_month_name"
}
Gt15b010
AMPM
"am_name"
"pm_name"
}
Gt15b011
RadixSeparator
"radix_separator_character"
}
Gt15b012
Utilities
281
Description
{
"group_separator_character"
}
Gt15b013
282
Utilities
Description
{
"grouping_rule_number"
}
Gt15b014
Currency
"currency_symbol"
}
Gt15b015
Utilities
283
Description
{
"iso_currency_abbrev"
}
Gt15b016
CurrencyName
"currency_name"
}
Gt15b017
284
Utilities
Description
{
"currency_radix_separator_character"
}
Gt15b018
currency_radix_separator_character is a character
that separates the integer and fractional part of
monetary strings.
Separators cannot contain the following:
plus sign (+)
minus sign (-)
digits
E
e
V
v
The currency_radix_separator_character must be
different that the
currency_group_separator_character.
Example:
CurrencyRadixSeparator {"."}
CurrencyGroupSeparator
"currency_group_separator_character"
}
Gt15b019
currency_group_separator_character is a character
that separates groups of digits in the integer part of
monetary strings.
Separators cannot contain the following:
plus sign (+)
minus sign (-)
digits
E (by itself)
e (by itself)
Example:
CurrencyGroupSeparator {","}
CurrencyGroupingRule
"currency_grouping_rule_number"
}
Gt15b020
currency_grouping_rule_number is a string of
comma-separated numbers defining the size of each
group of digits in monetary strings.
The size of each group can vary. Each number
specifies how many digits are in each group with the
initial integer defining the size of the group
immediately preceding the radix separator, and the
following integers defining groups preceding that.
Example:
CurrencyGroupingRule {"3"}
Utilities
285
Description
{
"dual_currency_symbol"
}
Gt15b021
DualISOCurrency
"dual_iso_currency_abbrev"
}
Gt15b022
286
Utilities
Description
DualCurrencyName
"dual_currency_name"
}
Gt15b023
BYTEINT
"byteint_default_format"
}
Gt15b024
Example:
BYTEINT {"-(3)9"}
INTEGER
"integer_default_format"
Example:
Gt15b026
INTEGER {"-(10)9"}
SMALLINT
"small_integer_default_format"
}
Gt15b025
BIGINT
"big_integer_default_format"
}
1102A144
Utilities
287
Description
"numeric_decimal_default_format"
}
Gt15b027
numeric_decimal_default_format is a string
representing the default format applied to
NUMERIC and DECIMAL data types.
Example:
NUMERIC {"--(I).9(F)"}
"real_default_format"
}
Gt15b028
288
Utilities
DATE
Description
"date_default_format"
}
Gt15b029
Utilities
289
TIME
Description
"time_default_format"
}
Gt15b030
290
Utilities
Description
{
"timestamp_default_format"
}
Gt15b031
Example:
TIMESTAMP {"YYYY-MMDDBHH:MI:SS.S(F)Z"}
"time_zone_string"; time_zone_rules
}
1102A248
Example 2:
For locations that observe Daylight Savings Time
(DST), the time_zone_rules can define when in the
calendar year the system time zone offset should
change. The system will automatically adjust for
DST according to this code. For example:
{"America Pacific"; "-8"; "0"; "1";
"4"; "3"; "8"; "0"; "0"; "02:00:00";
"4"; "11"; "1"; "0"; "0"; "02:00:00";
"2009"; "2010"; "-8"; "0"; "-7"; "0"}
Utilities
291
NUMBER
Description
"number_default_format"
1102A253
NUMBER {"FN9"}
File name
Purpose
: tdlocaledef.txt
: This file contains the specifications for data formatting(SDF)
defined by the user.
Scope
: Project - subsystems
Required files: None
History
: 05-21-2001 - Created
10-27-2005 - Added BIGINT
05-24-2010 - Added TimeZoneString
Description
: This data is compatible with pre-V2R5 releases.
DBS System Formatting Data
292
Utilities
{"-(3)9"}
{"-(10)9"}
{"-(5)9"}
{"-(19)9"}
{"--(I).9(F)"}
{"-9.99999999999999E-999"}
{"YY/MM/DD"}
{"HH:MI:SS.S(F)Z"}
{"YYYY-MM-DDBHH:MI:SS.S(F)Z"}
{"FN9"}
Utilities
293
294
Utilities
{"."}
{","}
{"3"}
{"\u00A5"}
{"JPY"}
{"Yen"}
{"."}
{","}
{"3"}
{"\u00A5"}
{"JPY"}
{"Yen"}
{"-(3)9"}
{"G-(I)9"}
{"G-(I)9"}
{"G-(I)9"}
{"G--(I)D9(F)"}
{"G-9D99999999999999E-999"}
{"YYYY\u5E74MM\u6708DD\u65E5"}
{"HH\u6642MI\u5206SSDS(F)\u79D2Z"}
{"YYYY\u5E74MM\u6708DD\u65E5BHH\u6642MI\u5206SSDS(F)\u79D2Z"}
{"FN9"}
Utilities
295
296
Utilities
CHAPTER 32
The Teradata Network Statistics utility, tdnstat, provides a user interface to view, get, or clear
the Teradata Database Network Services-specific statistics. TDN is a PDE subsystem that
provides Teradata Database Network Services.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
tdnstat
-a
-q
-v
-d
-C
-F
-G
t
n
-M
-R
-t
-c min
-z
-Z
Utilities
1102A250
Syntax element
Description
-a
-C
-F
Displays a snapshot of the BNS Message Service Statistics and the Reservation
Flow Control Statistics.
-G
297
Syntax element
Description
-M
-R
-t
-c min
Specifies a minimum value for filtering out normal message Flow Control table
statistics. The default minimum value is 0. See the -t option above.
-q
Quiet mode. Shows less information than in default display in a reduced number
of output columns.
-q
-v
-d
Debug mode.
-z
-Z
PagePool
Array table objects (for example, channel, group, and global semaphores)
Tx/Rx messages
PDE message subsystem Flow Control (FC), which includes the following:
Note: The PDE message subsystem uses the in-bound and out-bound FC tables for
controlling the receiving and the sending of messages.
Example 3
To view statistics, type the following:
298
Utilities
COUNT
REQUESTS
REQ_LONGEST
214
184
1
BLK_CNT
UBLK_CNT
452
452
CHN_INUSE
CHN_PAGES
CHN_GET
CHN_PUT
GRP_INUSE
GRP_PAGES
GRP_GET
GRP_PUT
GSM_INUSE
GSM_PAGES
GSM_GET
GSM_PUT
Utilities
191
7
193
2
129
2
197
68
5
1
152
147
BLK
--0
0
0
16
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
782
0
0
0
LOCAL
----37
35
2
527
0
255
14
4
0
0
0
0
0
0
0
0
0
5
51
21
0
27
108
BLKQ
---0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
TXAVG
----2
1
1
2
3
0
0
0
0
1
2
2
1
1
2
0
0
1
0
21
0
1
1
TXMAX
----2
3
1
6
4
0
0
0
0
1
3
3
2
2
3
0
0
2
0
243
0
1
2
RXCNT
----13
17
6
258
76
0
0
0
0
0
69
68
0
0
38
0
0
0
0
0
0
120
324
299
INCR
READ
WRITE
ATOMIC
CLEAR
INIX
MOVE
SENDREQ
SENDROW
TXGRPSEG
TXP2PSEG
TXGRPREC
TXP2PREC
RXGRPSEG
RXP2PSEG
RXGRPREC
RXP2PREC
CHKBYDEST
SELCOORD
SELTPA
55
5267
98
12
61
5
69
13
31
36
4461
178
6758
89
1928
1767
5338
34
1
1
0
0
0
0
0
0
0
0
0
0
0
28
3
0
0
0
0
11
0
3
300
8
5267
98
0
61
3
52
5
5
0
117
1
1273
0
0
0
0
29
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
2
456
3
1
4
1
0
0
0
0
17
0
35
2
0
0
0
1
1
2
5
790
16
2
35
5
0
0
0
0
42
0
64
29
0
0
12
0
17
8
3
8
110
1973
1876
5338
0
0
0
0
0
19
2
10 %
98 %
100 %
2 %
100 %
87
0
4
4
8
91
%
%
%
%
%
%
0 %
87 %
100 %
13 %
94 %
2 %
1 %
0
13
0
0
57
%
%
%
%
%
19 %
69 %
Utilities
Example 4
To view all TDN statistics, including Reservation Flow Control (RFC) Statistics, type the
following:
tdnstat -a
COUNT
REQUESTS
REQ_LONGEST
189
15351
1
BLK_CNT
UBLK_CNT
652
652
OBJ
OBJ
OBJ
OBJ
OBJ
OBJ
OBJ
OBJ
OBJ
OBJ
CHN_INUSE
CHN_PAGES
CHN_GET
GRP_INUSE
GRP_PAGES
GRP_GET
GRP_PUT
GSM_PAGES
GSM_GET
GSM_PUT
Utilities
163
6
163
129
2
131
2
1
78
78
BLK
--0
0
0
69
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
LOCAL
----45349
45365
84
251489
0
56225
1381
195
1
0
0
0
164
3475
0
0
0
3803
10070
BLKQ
---0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
TXAVG
----2
2
1
1
1
1
1
1
0
1
2
2
1
1
2
1
1
1
0
TXMAX
----5
8
2
5
4
1
1
1
0
2
4
4
2
2
4
1
1
2
0
RXCNT
----39
18167
5
83998
168
0
0
5
0
0
198
188
2
1408
145
0
0
0
1237
301
302
80
0
36620
668
32145
77697
587
54
20
161
82
95
2
82298
1
67067
0
0
0
0
56
160
2287
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
34
1
1
1
1
1
0
0
2
1
3
2
2
1
2
1
0
0
0
0
0
0
4
0
508
33
317
1
2
12
2
1
0
0
4
1
8
23
17
5
1944
6
0
0
0
0
0
0
6
0
1621
62
0
0
558
403
5757
0
0
0
109
143
21
24
1538
287718
571884
551029
0
0
0
0
0
0
0
0
38
13
2 %
98 %
100 %
0 %
3 %
100 %
87
0
0
0
99
%
%
%
%
%
0 %
87 %
100 %
0
1
94
0
%
%
%
%
39 %
4 %
0 %
0 %
0 %
Utilities
299
57 %
=
=
=
6
68330
481134
0 %
10 %
71 %
LOCAL
----24105
161
0
198
0
0
0
0
12322
BLKQ
---260
0
0
0
0
0
0
0
0
Utilities
TXAVG
----72
1
1
1
0
0
0
0
0
TXMAX
----1662
4
1
1
0
0
0
0
0
RXCNT
----36636
156
163
164
0
0
0
0
7264
303
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:31:36
07:31:27
07:31:24
07:31:02
07:30:10
3cfb
da7f
2f35
7a21
cb2a
2049
2051
2051
2049
2051
0
0
0
0
0
1177
778
839
912
1112
0
0
0
0
0
11
9
9
10
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Example 5
To display the last 31 TDN merges that are completed, type the following:
tdnstat -R
304
PASS#
----4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
TXMAX
----0
4
1
8
23
RXCNT
----0
109
143
21
24
USEC
---30097
31700
31204
30983
41589
31426
31192
31229
31278
31045
41107
30853
30752
31088
31511
74612
20555
30888
30741
31511
30905
31203
42074
32954
21242
21369
31259
31701
31720
41713
31580
Utilities
AvgRows/Sec =
670
AvgBytes/Sec =
104249
Example 6
To display TDN message class-specific statistics, type the following:
tdnstat -C
Utilities
LOCAL
----14119
122098
3
412233
0
0
0
0
5580
BLKQ
---0
0
0
0
0
0
0
0
0
HIGHEST
------4
4
8
2
10
28
20
30
TXAVG
----2
5
1
5
0
0
0
0
0
CUR_CNT
------0
0
0
0
0
0
0
0
TXMAX
----37
180
2
80
0
0
0
0
0
RXCNT
----78374
54480
214408
379161
0
0
0
0
2621
FC_CNT
-----0
0
0
0
0
1907
0
0
305
Example 7
To display BNS Message Service Statistics and Reservation Flow Control (RFC) Statistics, type
the following:
tdnstat -F
LOCAL
----24105
161
0
198
0
0
0
0
12322
BLKQ
---260
0
0
0
0
0
0
0
0
306
TXAVG
----72
1
1
1
0
0
0
0
0
TXMAX
----1662
4
1
1
0
0
0
0
0
RXCNT
----36636
156
163
164
0
0
0
0
7264
Utilities
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:26:57
07:31:43
07:31:43
07:31:42
07:31:42
07:31:42
07:31:40
07:31:36
07:31:27
07:31:24
07:31:02
07:30:10
0448
e3ac
7660
b09e
7785
5c83
3cfb
da7f
2f35
7a21
cb2a
2051
2049
2049
2049
2051
2049
2049
2051
2051
2049
2051
0
0
0
0
0
0
0
0
0
0
0
973
1126
887
735
896
676
1177
778
839
912
1112
0
0
0
0
0
0
0
0
0
0
0
10
10
9
8
9
8
11
9
9
10
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Is the
Date
Start
End
PtPs
number of inbound minicast messages that have been delivered to the message
subsystem.
Brds
number of inbound broadcast messages that have been delivered to the message
subsystem.
Waits
Retrys
CPU
OnLst
OnNet
OnBox
In addition to message service statistics (including FCNOTIFY services used for flow control
notifications), tdnstat displays statistics for up to 64 active and recently completed significant
row redistributions and table duplications.
Utilities
307
308
Utilities
CHAPTER 33
Warning:
Setting tunable parameters improperly can degrade system performance. This utility should
only be used under the direction of the Teradata Support Center.
The Teradata Network Tuner utility, tdntune, reads, displays, and writes Teradata Database
Network Services tunable parameters. TDN is a PDE subsystem that provides Teradata
Database Network Services.
Tunables are stored in the PDE Control GDO, a Teradata Database globally distributed object
that stores settings which are automatically made available to all nodes in the system.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
tdntune
-h
get
file
set file
Utilities
Syntax element
Description
-h
1102D021
309
Syntax element
Description
get [file]
set file
310
Utilities
Example
To show TDN tunables, type the following at the command line:
tdntune
Utilities
128
1500
64
128
4
1000
1
1
1
4
4
4
4
4
4
UNIX_TIME
0
5
255
5
20
5
20
5
20
1
20
5
5
311
312
Utilities
CHAPTER 34
The TPA Reset utility, tpareset, resets Teradata Database. All PDE tasks except for some kernel
daemons are killed. All database processes, including those for AMPs and PEs, are stopped
and restarted. TPA Reset options control whether dump information is collected, whether the
node on which tpareset is run is rebooted, and whether the system remains down or restarts.
TPA Reset can be used:
Caution:
Use TPA Reset only when absolutely necessary. TPA Reset has a system-wide effect. Shutting
down the system and restarting not only causes system down time, but can also have a
performance impact when the system starts up and runs standard recovery and reconcile
operations.
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Syntax
tpareset
reason
-xit
-x
-panic
-p
-exit
-e
-dump
-d
-nodump
-yes
-y
-stop
-s
-force
-f
-help
-h
Utilities
1102B230
313
Note: Some strictly internal and rarely-needed options have been omitted from this
discussion. Those options are documented in the tpareset command-line help.
Syntax element
Description
-xit
Shuts down Teradata Database on all nodes of the system. The system must be
explicitly restarted after the -x option is used.
-exit
-stop
Brings PDE down on the node from which the tpareset was initiated. The
other nodes go through a reset cycle, but the initiating node stays down. On
an SMP system, this is equivalent to -exit.
Sets the state of the initiating node to DOWN/TDMAINT. Nodes in this state
stay down until tpareset -f or a system wide shutdown and restart brings them
back into the Teradata Databasesystem.
-force
Forces a full restart on all nodes of the system. This option has the following
effects:
Brings any nodes that are running but in DOWN/TDMAINT state back
into the Teradata Database system.
Clears the system-wide crash count
If the crash count was preventing the database from being started, this
option forces the database to be started on all nodes. -force should not be
used until the condition that caused the crash loop has been corrected.
Forces reconcile to run
Reconcile normally runs when any node that was down is brought back up,
or when a Teradata Database version switch has been requested,
necessitating a system reset.
Reconcile:
validates that each node is running the same version of the various
software components that comprise Teradata Database
ensures that these versions are compatible with each other
switches versions of specific components if such a version switch has
been requested. (Such version switches are specified from the ctl utility
programs.)
The -f option forces reconcile to run during a reset, regardless of status of
system nodes and regardless of whether a version switch has been
requested.
Forces the database cache to be discarded
The database cache may also be discarded in other reset situations when
the -f option has not been specified.
Note: Reinitializing the cache can add several minutes to restart time.
314
Utilities
Syntax element
Description
-panic
Initiates a reboot of the node where tpareset was executed. A database dump is
captured from all nodes, and an operating system dump is captured on the
rebooted node. The remaining nodes undergo a normal reset and restart cycle
without being rebooted.
When the database restarts, the node from which tpareset was run is excluded
from the parallel database system. When the problem that required the panic
reset is resolved, the node can be returned to service by issuing another
tpareset.
Note: This option should be used only if the Teradata Support Center
determines that a dump is necessary for problem isolation.
-nodump
-dump
-yes
reason
The tpareset command must end with a string that describes the reason for the
reset. The reason need not be delimited by double quotation marks or
apostrophes. The string cannot start with a dash (-).
-help
Usage Notes
The RESTART TPA command, available from Database Window (DBW), is similar to TPA
Reset, in that it resets and restarts Teradata Database. However, RESTART TPA lacks several of
the options of TPA Reset. For example, RESTART TPA cannot be used to shut down the PDE
component of Teradata Database. For more information about DBW, see Utilities Volume 1.
TPA Reset can only be run on nodes where PDE is running.
Example
> tpareset -d Recover from DBS hang.
You are about to restart the database
on the system
'Test1'
Do you wish to continue (default: n) [y,n]
Utilities
315
316
Utilities
CHAPTER 35
The Two-Phase Commit Console, tpccons, allows you to perform the following 2PC-related
functions:
A transaction is considered in doubt after the server has voted to commit until the transaction
receives a commit or abort instruction from the coordinator. For the Teradata Database, the
coordinator is always either Information Management System (IMS) or Customer
Information Control System (CICS) and is never in doubt.
tpccons uses the Resolver Base Module (RBM) to resolve in-doubt transactions. Running
tpccons causes a logon to an RBM session. RBM sessions started from the system console by
the user do not appear in DBC.SessionTbl, while RBM sessions started by other users do.
Runs From
Tpccons runs from Database Window or comparable interface to the Teradata Database
console subsystem, such as cnsterm.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Usage Notes
You must type your user logon id and password to use the Two-Phase Commit Console.
You must have the EXECUTE privilege on the TwoPCRule macro.
Note: If you logon as other than DBC, when prompted for your password, type the
password and remainder of the logon string, such as account ID, separated by a comma.
Utilities
You can abort any process by pressing the F3 function key. The system returns a failure
response if the abort is successful.
317
318
Command
Description
DISPLAY
Utilities
Purpose
Commits or aborts any in-doubt work units, and optionally, logs the session off after the
transaction is resolved. Each transaction that is resolved is logged. For information about
DBC.InDoubtLogV, see Data Dictionary.
Syntax
COMMIT
ALL
ROLLBACK
A
,
AND LOGOFF
IN DOUBTS FOR
SESSIONS
sessions-no
,
RUN UNITS
run-unit-id
coord-id
ON
host-id
;
1102D003
Syntax element
Specifies
AND LOGGOFF
ALL
SESSIONS
sessions-no
RUN UNITS
run-unit-id
the run unit identifier of the in-doubt transaction returned from a DISPLAY
IN DOUBTS command.
IN DOUBTS FOR
a list of run unit identifiers and session identifiers for all in-doubt
transactions.
coord-id
ON host-id
Usage Notes
The run-unit specified must have an in-doubt transaction. The request fails if a specified
session is not found or is not in-doubt. In such cases, no action is taken on any of the sessions,
and a fail message is displayed.
Utilities
319
DISPLAY
Purpose
Displays the task-ids for all coordinators having in-doubt transactions.
Syntax
DISPLAY
HOSTS
host-id
COORDINATORS FOR
IN DOUBTS FOR
coord-id
*
*
ON
host-id
*
GT15A005
Syntax element
Specifies
HOSTS
COORDINATORS FOR
host-id
IN DOUBTS FOR
a list of run unit identifiers and session identifiers for all in-doubt
transactions.
coord-id
ON host-id
Usage Notes
If the coord-id option is specified, only sessions on the specified coordinator are listed. If a
host-id is specified, only sessions on the specified host are listed.
The DISPLAY IN DOUBTS FOR command returns a list consisting of a session number with
corresponding run-unit IDs. Session numbers are displayed as integers; run-unit IDs are
displayed as hex strings.
320
Utilities
Press F8 to switch to the select screen and then select the partition that is running tpccons.
The system displays the following:
Enter your user id to logon, F7 for help, or RETURN to exit:
Depending upon your installation, the system responds with the following:
Date: 00/06/25 Time: 11:00:00
Request successfully completed. 3 rows returned.
Host Id
------383
497
1124
Enter command, QUIT;, or F7 for help:
Utilities
321
322
Utilities
CHAPTER 36
DBASE
DATABASESPACE
CurrentPermSpace
CurrentSpoolSpace
CurrentTempSpace
MaxPermSpace
MaxSpoolSpace
MaxTempSpace
Values in the DBASE table are the global values. Values in the DATABASESPACE table are
local AMP values. The calculation is the global value divided by the number of AMPs in the
system.
The following table lists the difference between the Update DBC and Update Space utilities.
Utilities
The utility
Recalculates the
Update DBC
Update Space
323
Use Update DBC only to correct inconsistency in the DBASE or DATABASESPACE tables,
which might occur as the result of rare types of system failures.
For descriptions of the DBASE and DATABASESPACE tables and columns, see Data
Dictionary.
For more information on the Update Space utility, see Chapter 37: Update Space
(updatespace).
Runs From
Update DBC runs from Database Window or comparable interface to the Teradata Database
console subsystem, such as cnsterm.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
324
Utilities
CHAPTER 37
The Update Space utility, updatespace, recalculates the permanent, temporary, or spool space
used by either of the following:
The following table lists the difference between the Update DBC and Update Space utilities.
The utility
Recalculates the
Update DBC
Update Space
Use Update Space only to correct inconsistency in the DATABASESPACE table, which might
occur as the result of rare types of system failures.
For descriptions of the DBASE and DATABASESPACE tables and columns, see Data
Dictionary.
For more information on the Update DBC utility, see Chapter 36: Update DBC
(updatedbc).
Runs From
Update Space runs from Database Window or comparable interface to the Teradata Database
console subsystem, such as cnsterm.
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities.
Utilities
325
Syntax
Update Space presents a command-line environment that allows the entry of the UPDATE
command, which has the following syntax.
UPDATE
SPACE FOR
ALL DATABASES
dbname
SPACE FOR
dbname
TEMPORARY
ALL
SPOOL
PSPOOL
1102H401
Syntax element
Specifies
TEMPORARY
ALL
SPOOL
PSPOOL
SPACE FOR
ALL DATABASES
dbname
Usage Notes
To exit the Update Space utility, type q or quit with no semicolon terminator, on the
command line.
Non-standard database names that contain special characters must be enclosed within double
quotation marks. Special characters are most punctuation characters and whitespace
characters. The delimiting double quotation marks are not counted as part of the name
length, and are not stored in the Data Dictionary tables.
To include a double quotation mark character as part of a database name, precede it with
another double quotation mark character.
326
Utilities
For example:
Desired Database Name
Current Salary
"Current Salary"
D'Augusta
"D'Augusta"
db1 db @#$%
"db1 db @#$%"
db1."db2
"db1.""db2"
Db!@
""
"Db!@
"""""
Example 1
Enter Command
update all space for all databases;
Updating space for DBC
Space updated for DBC
Updating space for SYSTEMFE
Space updated for SYSTEMFE
Updating space for RESCRIBE
Space updated for RESCRIBE
Updating space for CRASHDUMPS
Space updated for CRASHDUMPS
Updating space for PUBLIC
Space updated for PUBLIC
Updating space for DEFAULT
Space updated for DEFAULT
Updating space for TDPUSER
Space updated for TDPUSER
Updating space for SYS_CALENDAR
Space updated for SYS_CALENDAR
Updating space for SYSADMIN
Space updated for SYSADMIN
Updating space for ALL
Space updated for ALL
Example 2
Enter Command
update temporary space for public;
Updating space for PUBLIC
Space updated for PUBLIC
Utilities
327
328
Utilities
CHAPTER 38
The Verify Pdisks utility, verify_pdisks, is used to verify the pdisks on the system are accessible
and are mapped correctly.
Verify Pdisks reads each pdisk storage device on the node from which it was run and
determines the TVS system and disk IDs associated with that device. If the IDs differ from
those specified in the Vconfig GDO (globally distributed object that stores configuration
settings), or if the attempt to read the pdisk device fails, verify_pdisks returns an error with
information about the nature of the problem.
This utility can be run at any time regardless of the state of the PDE or Teradata Database.
Runs From
To start Verify Pdisks, type verify_pdisks at the command prompt. For general
information on starting the utilities from different interfaces, see Appendix B: Starting the
Utilities.
Syntax
verify_pdisks
-v
-h
-?
Utilities
1102A232
Syntax element
Description
-v
-h
-?
329
Note: If no options are specified, Verify Pdisks reports any errors and summarizes the number
of errors detected. If no errors are detected, Verify Pdisks reports that all pdisks on the current
node are verified.
Any errors following a system operating system restart or during the starting of PDE.
Errors in the /etc/.osm, or /var/adm/streams/* log files that indicate disk failures.
Note: Verify Pdisks automatically checks all pdisks for all AMP vprocs in the clique of the
node on which it is run. To check the entire system, Verify Pdisks should be run on one node
from each clique.
330
Utilities
Examples
Example 1
This example shows all pdisks on the current node are verified.
> verify_pdisks
All pdisks on this node verified.
Example 2
This example shows two errors detected by Verify Pdisks.
> verify_pdisks
*****ERROR DETECTED*****
subpool 1, pdisk /dev/pdisk/dsk1:
disk id was 1, should be 1.
system id was 0xF14EA20847AA36E0, should be 0x46A513645281BA31
*****1 error(s) found during pdisk verification*****
Example 3
This example shows an excerpt of Verify Pdisks output from the same system as the previous
example, but in verbose mode.
> verify_pdisks -v
1276 bytes successfully read from Vconfig GDO
TVS system-id from file: 0x46A513645281BA31
Succesfully loaded libtvsaalloclib.so.
This is node 002-10.
It is in clique 1.
Checking subpool 1 pdisks...
pdisk 0: /dev/pdisk/dsk1....
*****ERROR DETECTED*****
subpool 1, pdisk /dev/pdisk/dsk1:
disk id was 1, should be 1.
system id was 0xF14EA20847AA36E0, should be 0x46A513645281BA31.
*****1 error(s) found during pdisk verification*****
Please check the vconfig.txt file and/or the hardware.
Utilities
331
devices). These settings are stored in the Vconfig GDO, and automatically distributed to all
nodes of the system.
The vconfig text files can be inspected if Verify Pdisks reports errors in the configuration,
however, configuration changes should be made only by using the Parallel Upgrade Tool
(PUT). Do not edit the vconfig text file unless instructed to do so by Teradata Support Center
personnel.
The vconfig.txt file is located in /etc/opt/Teradata/tdconfig.
332
Utilities
CHAPTER 39
The Vproc Manager utility, vprocmanager, allows you to manage the virtual processors
(vprocs) in a Teradata Database system. Vprocs are a set of software processes that run under
Teradata Parallel Database Extensions (PDE) within the multitasking environment of the
operating system. Vprocs are the heart of Teradata Database, managing the basic functions of
the system.
Teradata Database systems can include the following vproc types.
Vproc Type
Description
AMP
GTW
Node
The node vproc handles PDE and operating system functions not directly related to
AMP and PE work. Node vprocs cannot be externally manipulated, and do not
appear in the output of the Vproc Manager utility.
PE
Parsing engines perform session control, query parsing, security validation, query
optimization, and query dispatch.
RSG
Relay Services Gateway provides a socket interface for the replication agent, and for
relaying dictionary changes to the Teradata Meta Data Services utility.
TVS
Initialize the storage associated with one or more specified AMP vprocs
Vproc Manager can be used with the Table Rebuild utility to initialize and boot a specific AMP
vproc in order to rebuild the portion of all tables associated with the vproc.
Utilities
333
Runs From
For general information on starting the utilities from different interfaces, see Appendix B:
Starting the Utilities. For information on Viewpoint, see Teradata Viewpoint User Guide.
VprocID
A VprocID is a number that identifies the vproc to Teradata Database. VprocIDs are in the
range of 0 through 16383, or 0 through 30719, depending on the system. When specifying
VprocIDs, decimal or hexadecimal numbers can be used. Hexadecimal numbers must
include a trailing X or x, for example, 3FFx and 77FFx.
VprocList
A VprocList is defined as a list of one or more vproc identifiers or a range of vproc
identifiers in the following format:
,
vprocid
vprocid
TO
vprocid
1102A251
Examples:
0 1 2 3
0, 1, 16382 to 16383
0 to 10, 16381, 16382
0 to 1, 27FEx
VprocState
VprocState defines the PDE system state of a vproc. VprocStates include the following:
FATAL
This VprocState indicates a serious problem with a vproc or its associated storage. For
example, if a vproc crashes repeatedly, or if there are corrupt tables that require a Table
Rebuild, a vproc will be set to the FATAL state.
When a TVS vproc is in FATAL state, all AMPs associated with it will be put into
FATAL state at the next database restart.
Note: The AMP or PE partitions are not started for a vproc in this state.
334
Utilities
FATAL**
This VprocState indicates an AMP cannot access its storage.
Note: The AMP partition is not started for a vproc in this state.
NEWPROC
This VprocState applies only to AMP and PE vprocs.
This VprocState indicates that either a new vproc is being added to the database
configuration or an existing vproc is being deleted.
A vproc with status NEWPROC is a member of the PDE message group but is not a
member of the operational Teradata Database message group. For more information,
contact the Teradata Support Center.
NONODE
This VprocState indicates that the physical hardware required to run this vproc is not
available. This state is not accepted as an argument to the SET command, although this
state might appear in the Vproc Status Table produced by the STATUS command.
Note: The AMP or PE partitions are not started for a vproc in this state.
NULL
This VprocState is undefined. It is not accepted as an argument to the SET command,
although this state might appear in the Vproc Status Table produced by the STATUS
command.
ONLINE
This VprocState indicates that the vproc is fully operational and actively participating
with the Teradata Database.
A vproc with status ONLINE is a member of both the PDE and Teradata Database
message group. For more information, contact the Teradata Support Center.
OFFLINE
Generally, this VprocState indicates vprocs that are not fully operational and have been
forced down by the Teradata Database or system administrator.
For example, if a node fails during system startup, its associated storage clique may be
prevented from starting, and the AMPs that use that storage will be set to OFFLINE.
This behavior is governed by settings in the Control GDO Editor (ctl) utility.
A vproc with status OFFLINE is a member of the PDE message group but is not a
member of the operational Teradata Database message group. For more information,
contact the Teradata Support Center.
When a TVS vproc is in OFFLINE state, all AMPs associated with it will be put into
FATAL state at the next database restart.
UTILITY
This vproc state applies only to AMP vprocs.
This VprocState is transitional and is used by database recovery and the RECONFIG
and Table Rebuild utilities to indicate that a previously OFFLINE/FATAL/NEWPROC
is interacting with the online Teradata Database.
Utilities
335
This vproc is a member of the PDE message groups but not a member of the
operational Teradata Database message groups.
ConfigStatus
The database component of Teradata Database maintains its own internal version of the
status of AMP and PE vprocs. That status is called the Teradata Database Logical
Configuration Status, and represented in the output of the Vproc Manager STATUS
command as a column named ConfigStatus. Vproc Manager cannot modify the
ConfigStatus of a vproc.
ConfigStatus can be any of the following:
Note: To clearly differentiate between VprocStates and ConfigStatus, VprocStates here are
written in all UPPERCASE letters, and ConfigStatus is written in mixed-case letters.
Online
The vproc is fully operational.
This usually coincides with the ONLINE VprocState.
Down
The vproc has been forced down.
This ConfigStatus usually coincides the OFFLINE, UTILITY, FATAL, and NONODE
VprocStates.
Catchup
This ConfigStatus for this vproc was previously Down, and it is being recovered in the
background. If System RestartKind is COLDWAIT, the ConfigStatus of this vproc will
become Online after recovery is complete.
This ConfigStatus usually coincides with the UTILITY VprocState.
Hold
The ConfigStatus for this vproc was previously Catchup or Down, and its data is in the
process of being recovered. The ConfigStatus of this vproc will become Online after
recovery is complete.
This ConfigStatus usually coincides with the ONLINE VprocState.
NewReady
This is either a newly added vproc or one that has been removed from the database
logical configuration.
This ConfigStatus usually coincides with the UTILITY or NEWPROC VprocState.
NewDown
This is a newly added vproc and has been forced down.
This ConfigStatus usually coincides with the NEWPROC VprocState.
Null
This vproc is not yet in the Teradata Database Logical Configuration. Recently, the
vproc might have been added to the PDE Physical Configuration or deleted from the
Teradata Database Logical Configuration, and database startup has not run yet.
Startup will note that this vproc does not appear in its configuration map and will
336
Utilities
change its ConfigStatus to NewReady. Null usually coincides with the NEWPROC
VprocState.
The following table illustrates each ConfigStatus and the VprocState that usually coincides
with each ConfigStatus.
VprocState
ConfigStatus
ONLINE
Online, Hold
OFFLINE
FATAL
NONODE
Down
UTILITY
NEWPROC
For an understanding of how vprocs behave during Teradata Database startup, see
VprocState/ConfigStatus Transitions During Teradata Database Startup on page 338.
RestartKind
RestartKind specifies the type of system restart to perform during the next database
restart. Types of valid restarts include:
COLD
A full restart, but transaction recovery will be deferred.
COLDWAIT
A full restart, but database startup will be held up until transaction recovery is
complete.
Utilities
337
338
= is read as remains.
OFFLINE/FATAL/
NONODE
ONLINE
NEWPROC
Online
VprocState = ONLINE
ConfigStatus = Online
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus -> Down
This combination is
inconsistent and will be
transitioned as follows:
VprocState -> ONLINE
ConfigStatus = Online
Hold
(AMP vprocs only)
VprocState = ONLINE
ConfigStatus -> Online
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus -> Down
This combination is
inconsistent and will be
transitioned as follows:
VProcState -> ONLINE
ConfigStatus -> Online
Catchup
(AMP vprocs only)
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus -> Down
This combination is
inconsistent and will be
transitioned as follows:
VprocState -> UTILITY
ConfigStatus = Catchup
Utilities
Utilities
ONLINE
Down
IF (VprocType = PE)
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus = Down
This combination is
inconsistent and will be
transitioned as follows
VprocState -> OFFLINE
ConfigStatus = Down
IF RECONFIG THEN
VprocState = UTILITY
ConfigStatus = NewReady
ELSE
This combination is inconsistent
and will be transitioned
as follows:
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus -> NewDown
VprocState = NEWPROC
ConfigStatus = NewReady
VprocState = OFFLINE/
FATAL/NONODE
ConfigStatus = NewDown
VprocState = NEWPROC
ConfigStatus -> NewReady
THEN
VprocState = ONLINE
ConfigStatus -> Online
ELSE IF (VprocType = AMP)
THEN IF (NOT RECONFIG)
AND RcvJrnl
OFFLINE/FATAL/
NONODE
NEWPROC
THEN
VprocState -> UTILITY
ConfigStatus -> Catchup
ELSE IF (NOT RcvJrnl) THEN
VprocState -> OFFLINE
ConfigStatus = Down
NewReady
339
options
arguments
;
GS07A003
Syntax element
Can be a
options/arguments
Note: The Parallel Database Extensions (PDE) must be running in order for Vproc Manager
to run. Teradata Database does not need to be running.
340
Command
Description
BOOT
HELP
INITVDISK
QUIT
RESTART
SET RESTART
Sets the restart type to use during the next system restart.
SET vproclist
Defines the new state of a vproc or new states for a list of vprocs.
STATUS DBS
Utilities
Utilities
Command
Description
STATUS NOTONLINE
Reports the status row for vprocs and nodes that are not fully online.
STATUS ONLINE
Reports the status row for vprocs and nodes that are online.
STATUS PDE
STATUS RESTART
STATUS SYSSTATE
STATUS vproclist
Reports the vproc status table row for the specified vproc or vprocs.
STATUS
Reports the Teradata Database Status Table and the PDE Status
Table.
341
BOOT
Purpose
The BOOT command initialize and start the database partitions of an AMP. This command
applies only to AMPs with VprocState of FATAL and ConfigStatus of Down.
Syntax
BOOT
vprocid
GS07B005
Syntax element
Description
vprocid
Usage Notes
The boot process asynchronously invokes the AMP startup task on the specified AMP. Vproc
Manager considers the boot complete after it has invoked the AMP startup task successfully in
the startup partition on the specified AMP. The AMP startup task itself determines whether
the system and the AMP are in the appropriate state for a boot and logs messages to the system
console.
Use this command in conjunction with Table Rebuild when you need to rebuild all tables on
an AMP. For more information, see Chapter 29: Table Rebuild (rebuild).
Example
The following example shows how to boot up AMP vproc #63.
Enter a command, Help, or Quit:
BOOT 63
WARNING: This command will destroy all user and dictionary data of vproc
63s vdisk. To recover from this may require an ALL TABLES REBUILD!
Are you sure you want to do this (Y/N)?
Y
The AMP startup task has been successfully invoked of vproc 63.
Please refer to the system console for additional information.
342
Utilities
CLEARMVAMP
Purpose
Clears the status of AMPs that were previously configured as target AMPs in move AMP
reconfig operation. Do not use this command during move or add AMP reconfig operations.
Running this command will cause the File System to be reinitialized on the target AMPs of the
last reconfiguration MOVE AMP operation.
Syntax
CLEARMVAMP
CL
1102A252
Utilities
343
HELP
Purpose
The HELP command provides general help for Vproc Manager or detailed help if you specify
an option.
Syntax
HELP
H
ALL
keyword
GS07B006
Syntax element
Description
ALL
Used to display the help text of the Vproc Manager in its entirety.
keyword
Usage Notes
If no command option is specified, a brief introduction to Vproc Manager is displayed,
followed by instructions on how to receive additional help.
Example 1
Enter a command, Help, or Quit:
help
The Vproc Manager utility program provides a means to manage/manipulate
various vproc attributes.The general command syntax is:
<COMMAND> <Options> <Arguments> [;]
That is, a command followed by its specific options and/or arguments and
terminated with an optional semi-colon. All commands, options, and
arguments may be abbreviated to the shortest unique string.
Valid commands are:
BOOT, HELP, INITVDISK, QUIT, RESTART, SET, and STATUS.
Enter "HELP <CommandName>" for detailed information on each command or
type "HELP ALL" for the help text in its entirety.
344
Utilities
Example 2
Enter a command, Help, or Quit:
help quit
QUIT
o This command causes the VprocManager utility program
to exit.
Example 3
Enter a command, Help, or Quit:
help cold
COLD and COLDWAIT are used to specify the types of restart to perform,
either as an option in the RESTART command or as a value supplied in the
SET RESTART command. They are defined as follows:
o COLD - A full restart, but transaction recovery will be deferred.
o COLDWAIT - A full restart, but DBS startup will be held up until
transaction recovery is complete.
Utilities
345
INITVDISK
Purpose
The INITVDISK command initializes the Teradata Database File System on the storage
associated with a specific AMP, also known as the AMPs vdisk. This applies only to AMPs
with a VprocState of FATAL or NEWPROC. The state of the specified AMP remains
unchanged.
Syntax
INITVDISK
vprocid
GS07B007
Syntax element
Description
vprocid
Usage Notes
The initialization is accomplished by invoking File System Initialization Task in the
Application partition on the specified AMP. InitVdisk will abort if the Application partition is
in use already.
The initialization of the storage associated with a NEWPROC AMP is only relevant prior to
database startup.
Database startup implicitly initializes the storage for NEWPROC AMPs (if necessary).
Example
Enter a command, Help, or Quit:
INITVDISK 3
WARNING: This command will destroy all user and dictionary data of vproc
3s vdisk. To recover from this may require an ALL TABLES REBUILD!
Are you sure you want to do this (Y/N)?
Y
Starting the file system initialization task on vproc 3.
The Vdisk associated with vproc 3 has been initialized.
346
Utilities
QUIT
Purpose
The QUIT command causes Vproc Manager to exit.
Syntax
QUIT
Q
1102A216
Utilities
347
RESTART
Purpose
The RESTART command forces a database restart.
Syntax
RESTART
R
TPA
NODUMP
DUMP=
restartkind
restart comment
YES
NO
1102A153
Syntax element
Description
TPA
NODUMP
DUMP
restartkind
restart comment
Usage Notes
The RESTART command implicitly causes Vproc Manager to exit.
To set the desired RestartKind or Restart Type, see or SET RESTART on page 350 or the
RESTART TPA command in the Database Window (DBW) chapter of Utilities Volume 1.
To view the current system setting for RestartKind or Restart Type, see STATUS DBS on
page 357.
For additional information on stopping and restarting the system, see Database
Administration.
348
Utilities
Example 1
The following example shows how to perform a COLD restart and specifies a reason why.
Enter a command, Help, or Quit:
RESTART COLD This is a test.
The system will
Dump
RestartKind
Reason
be restarted:
: NO
: COLD
: This is a test.
Example 2
The following example shows how to restart using the current system setting for RestartKind
and specifies a reason why.
Enter a command, Help, or Quit:
RESTART DUMP = YES This is a test.
The system will
Dump
RestartKind
Reason
be restarted:
: YES
: COLD
: This is yet another test.
Example 3
The following example shows how to restart using the current system setting for RestartKind
and the default restart comment.
Enter a command, Help, or Quit:
RESTART
The system will
DUMP
RestartKind
Reason
Utilities
be restarted:
: NO
: COLD
: System restarted by VprocManager.
349
SET RESTART
Purpose
The SET RESTART command sets the restart type to use during the next restart of the system.
Syntax
SET
RESTART
restartkind
=
Syntax element
Description
restartkind
GS07B011
Usage Notes
This function does not force an immediate database restart. For additional information, see
Stopping and Restarting the System in Database Administration.
Example
Enter a command, HELP or QUIT:
SET RESTART = COLDWAIT
The System RestartKind has been set to COLDWAIT.
350
Utilities
SET vproclist
Purpose
The SET vproclist command sets the new state of a vproc or the new states for a list of vprocs.
Syntax
,
SET
S
vproclist
/V
vprocstate
=
1102A191
Syntax element
Description
/V
vproclist
A list of one or more vproc identifier numbers. For examples, see Definitions
of Terms Used in Vproc Manager on page 334.
vprocstate
Usage Notes
The following table relates the changes to vproc states occurring before and after Teradata
Database restart.
Utilities
NEWPROC/NewReady.
OFFLINE/Down or FATAL/Down.
OFFLINE/NewDown or FATAL/NewDown.
351
Note: Any allowed VprocState transition becomes effective immediately. With the exception
of AMPs being recovered using the Recovery Control Task, no changes are made to the
ConfigStatus, the static message group, or whether the vproc is the Control AMP. These
changes are deferred until the next system restart.
The SET VprocList command is governed by the allowable VprocState transitions shown in the
following table.
Desired VprocState
Current
VprocState
NONODE
OFFLINE
ONLINE
NEWPROC
FATAL
UTILITY
NONODE
No change.
Not allowed.
Not allowed.
Not allowed.
Not allowed.
Not allowed.
OFFLINE
Not
allowed.
No change.
Allowed.
Allowed
Allowed.
Not allowed.
If ConfigStatus = Down,
initiate
recovery.
if ConfigStatus =
NewDown.
Not
allowed.
Allowed.
No change.
Not allowed.
Allowed.
Not allowed.
Not
allowed.
Allowed.
Not
allowed.
Allowed.
Not
allowed.
Not allowed.
ONLINE
NEWPROC
FATAL
UTILITY
352
ConfigStatus
will be Down
after system
restart.
ConfigStatus will
be Down after
system restart.
Not allowed.
No change.
ConfigStatus
will be
NewDown after
system restart.
Allowed.
Not allowed.
Allowed if
ConfigStatus
= NewDown.
No change.
Not allowed.
Not allowed.
Not allowed.
No change.
Utilities
Example 1
This example shows how to take vprocs 0 and 1 offline.
Enter a command, HELP or QUIT:
set /v 0 to 1 offline
Vproc 0s VprocState has been set from ONLINE to OFFLINE.
NOTE: Vproc 0 will be forced down (i.e., its ConfigStatus will be Down)
after the next system restart.
Vproc 1s VprocState has been set from ONLINE to OFFLINE.
NOTE: Vproc 1 will be forced down (i.e., its ConfigStatus will be Down)
after the next system restart.
Example 2
This example shows how to take vproc 1 online.
Enter a command, HELP or QUIT:
set /v 1 online
Vproc 1s VprocState has been set from OFFLINE to ONLINE.
NOTE: Vproc 1 will begin recovery in the background via
the Recovery Control Task and will assume a
VprocState/ConfigStatus of UTILITY/Catchup.
Please refer to the System Console for
additional status information.
Utilities
353
STATUS
Purpose
The STATUS command, without any options reports the status of the database and the PDE.
Syntax
STATUS
ST
GS07B012
Usage Notes
The following applies to systems with the total number of virtual processors up to 1024.
The Database Status Table includes a status row for each vproc that is defined on the system.
When applicable, a footnote will follow the Database Status Table, indicating which AMP
vproc has been selected as the Control AMP.
The following table shows the columns of the vproc status row.
354
Column
Description
Vproc Number
Rel. Vproc#
Represents the number of the vproc relative to the Node upon which the vproc
resides.
Node ID
Identifies the node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number, and MM denotes the
module number.
Movable
This indicates whether the vproc can be migrated to another node in its
defined clique if its primary node fails.
Crash Count
Represents the number of times the vproc has crashed. The count increments
with every attempted system restart. When the system restart succeeds, Crash
Count is reset to 0 for all vprocs.
Vproc State
Config Status
Displays the Teradata Database Logical Configuration Map Status of the vproc.
Config Type
Utilities
Column
Description
Cluster/Host No.
Displays the Cluster Number if the Config Type is AMP or displays the Host
No. if the Config Type is PE.
Cluster is the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Host No. is the host number that was assigned to the PE using the
Configuration Utility. The valid range of host numbers is 1 to 1023.
RcvJrnl/Host Type
Displays the RcvJrnl (that is, Recovery Journaling) flag if the Config Type is
AMP or displays the Host Type if the Config Type is PE.
The RcvJrnl flag is Off if an AMP is down and the other AMPs in its cluster are
not to create a recovery journal for the down AMP.
Note: If you anticipate that an AMP will be down for a long period of time,
then Teradata recommends an offline rebuild of all tables on the AMP (after
the RcvJrnl flag has been set to Off).
The Host Type is the host type for the PE as defined using the Configuration
Utility and is one of the following:
TVS Vproc
IBM
COP
ATT3B
BULLHN
OS1100
The PDE Status Table includes a status row for each node that is defined on the system. The
columns of the node status row are shown in the following table.
Utilities
Column
Description
Node ID
The Node ID as defined using the Parallel Upgrade Tool (PUT). For more
information, see the Parallel Upgrade Tool (PUT) Reference. The Node ID is
formatted as CCC-MM, where CCC denotes the cabinet number and MM
denotes the module number.
Node State
The current state of the node, which is either ONLINE, DOWN, or STANDBY.
Clique Number
The clique number for the node as defined using the Parallel Upgrade Tool
(PUT). For more information, see the Parallel Upgrade Tool (PUT) Reference.
CPUs
Memory (MB)
The total memory size in megabytes for the node (rounded up to the nearest
integer).
CHANs
LANs
355
Column
Description
AMPs
Node Name
When applicable, a footnote will follow the PDE Status Table, indicating which node is
defined as a Non-TPA Node (for STANDBY node).
Example
Enter a command, HELP or QUIT:
status
SYSTEM NAME: teradata-1
07/12/21 19:13:42
DBS LOGICAL CONFIGURATION
-------------------------
Rcv
Jrnl/
Vproc Rel.
Node
Can
Crash Vproc
Config
Config Cluster/ Host TVS
Number Vproc# ID
Move Count State
Status
Type
Host No. Type Vproc
------ ------ ------ ----- ----- ------- -------- ------ -------- ----- ----0*
1
1-01 Yes
0
ONLINE Online
AMP
0
On
10238
1
2
1-01 Yes
0
ONLINE Online
AMP
0
On
10237
8192
4
1-01 No
0
ONLINE N/A
GTW
1
COP
N/A
10237
5
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
10238
6
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
16383
3
1-01 Yes
0
ONLINE Online
PE
1
COP
N/A
-------------------------------------------------------------------------------*
DBS Control AMP
DBS State: Logons are enabled - The system is quiescent
DBS RestartKind: COLD
PDE PHYSICAL CONFIGURATION
-------------------------Node
Node
Clique
Memory
ID
State
Number CPUs (MB) CHANs LANs AMPs Node Name
------- ------- ------ ---- ------ ----- ---- ---- --------------------------1-01 ONLINE
0
2
2047
0
1
2 localhost
------------------------------------------------------------------------------
356
Utilities
STATUS DBS
Purpose
The STATUS DBS command reports the status of the Teradata Database.
Syntax
STATUS
DBS
ST
GS07A027
Usage Notes
The STATUS DBS command returns a status report for the Database Status Table only. The
Database Status Table includes a status row for each vproc that is defined on the system. When
applicable, a footnote will follow the Database Status Table, indicating which AMP vproc has
been selected as the Control AMP.
The following table shows the columns of the vproc status row.
Column
Description
Vproc Number
Rel. Vproc#
Represents the number of the vproc number relative to the Node upon which
the vproc resides.
Node ID
Identifies the Node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number and MM denotes the
module number.
Movable
This indicates whether the vproc can be migrated to another node in its defined
clique if its primary node fails.
Crash Count
Vproc State
Config Status
Config Type
Cluster/Host No.
Displays the Cluster Number if the Config Type is AMP or displays the Host
No. if the Config Type is PE.
Cluster is the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Host No. is the host number that was assigned to the PE using the
Configuration Utility. The valid range of host numbers is 1 to 1023.
Utilities
357
Column
Description
RcvJrnl/Host
Type
Displays the RcvJrnl (that is, Recovery Journaling) flag if the Config Type is
AMP or displays the Host Type if the Config Type is PE.
The RcvJrnl flag is Off, if an AMP is down and the other AMPs in its cluster are
not to create a recovery journal for the down AMP.
Note: If you anticipate that an AMP will be down for a long period of time,
then Teradata recommends an offline rebuild of all tables on the AMP (after the
RcvJrnl flag has been set to Off).
The Host Type is the host type for the PE as defined using the Configuration
Utility and is one of the following: IBM, COP, ATT3B, BULLHN, or OS1100.
TVS Vproc
Example
Enter a command, HELP or QUIT:
status dbs
SYSTEM NAME: teradata-1
07/12/21 15:55:47
DBS LOGICAL CONFIGURATION
-------------------------
Rcv
Jrnl/
Vproc Rel.
Node
Can
Crash Vproc
Config
Config Cluster/ Host TVS
Number Vproc# ID
Move Count State
Status
Type
Host No. Type Vproc
------ ------ ------ ----- ----- ------- -------- ------ -------- ----- ----0*
1
1-01 Yes
0
ONLINE Online
AMP
0
On
10238
1
2
1-01 Yes
0
ONLINE Online
AMP
0
On
10237
8192
4
1-01 No
0
ONLINE N/A
GTW
1
COP
N/A
10237
5
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
10238
6
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
16383
3
1-01 Yes
0
ONLINE Online
PE
1
COP
N/A
-------------------------------------------------------------------------------*
DBS Control AMP
DBS State: Logons are enabled - The system is quiescent
DBS RestartKind: COLD
358
Utilities
Purpose
The STATUS DBS Orderby CN command reports the status of Online and NotOnline
Teradata Database AMP vprocs ordered by cluster number.
Syntax
STATUS
DBS
ST
ORDERBY CN
GS07A026
Usage Notes
The STATUS DBS Orderby CN command returns the Online and NotOnline Teradata
Database AMP vprocs ordered by the cluster status tables only. When applicable, a footnote
will follow the Database Status Table, indicating which AMP vproc has been selected as the
Control AMP.
The following table shows the columns of the ONLINE vproc status row.
Column
Description
Vproc-Ids Range
Crash Count
CN No.
Displays the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
The following table shows the columns of the NOTONLINE vproc status row.
Utilities
Column
Description
Vproc-Ids Range
Crash Count
359
Column
Description
Vproc State
Represents the current PDE system state of a vproc if the state is not online.
Config Status
Cluster Number
Displays the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Example
360
Utilities
Purpose
The STATUS DBS Orderby HN command reports the status of Online and NotOnline
Teradata Database PE vprocs ordered by host number.
Syntax
STATUS
DBS
ST
ORDERBY HN
GS07A025
Usage Notes
The STATUS DBS ORDERBY HN command is used to return the Online and NotOnline
Teradata Database PE vprocs ordered by the host status tables only.
The following table shows the columns of the ONLINE vproc status row.
Utilities
Column
Description
Vproc-Ids Range
Crash Count
Moveable
Indicates whether the PE vproc can be migrated to another node in its defined
clique if its primary node fails.
Host Number
Displays the host number that was assigned to the PE using the Configuration
Utility. The valid range of host numbers is 1 to 1023.
Host Type
Displays the host type for the PE as defined using the Configuration Utility and
is one of the following: IBM, COP, ATT3B, BULLHN, or OS1100.
361
The following table shows the columns of the NOTONLINE vproc status row.
Column
Description
Vproc-Ids Range
Crash Count
Moveable
Indicates whether the PE vproc can be migrated to another node in its defined
clique if its primary node fails.
Vproc State
Represents the current PDE system state of a vproc if the state is not online.
Config Status
Host Number
Displays the host number that was assigned to the PE using the Configuration
Utility. The valid range of host numbers is 1 to 1023.
Host Type
Displays the host type for the PE as defined using the Configuration Utility and
is one of the following: IBM, COP, ATT3B, BULLHN, or OS1100.
Example
Enter a command, HELP or QUIT:
status dbs orderby hn
SYSTEM NAME: nirvana
08/12/21 15:29:09
DBS LOGICAL CONFIGURATION
-------------------------ONLINE PE vprocs ordered by Host No. - Vproc-Ids
Crash
Host
Host
Range
Count
Moveable
Number
Type
------------------- ------ ----------------16368-16382
0
Yes
52
COP
16345-16351
0
No
282
IBM
16353, 16357, 16359,
0
No
286
IBM
.
.
.
16362, 16366
------------------------------------------------------------------------------NOTONLINE PE vprocs ordered by Host No. - Vproc-Ids
Crash
Vproc
Config
Host
Host
Range
Count
Moveable
State
Status
Number
Type
----------------------------- -----------------------16383
0
Yes
NONODE
Down
52
COP
16344
0
No
NONODE
Down
282
IBM
16355, 16367
0
No
NONODE
Down
286
IBM
16352, 16364
0
No
NONODE
Down
289
IBM
------------------------------------------------------------------------------DBS State: Logons are enabled - Users are logged on
DBS RestartKind: COLD
362
Utilities
Purpose
The STATUS DBS Orderby Nodeid command reports the status of Online and NotOnline
Teradata Database vprocs ordered by node id.
Syntax
STATUS
DBS
ST
ORDERBY NODEID
GS07A024
Usage Notes
The STATUS DBS Orderby Nodeid command is used to return the Online and NotOnline
Teradata Database vprocs ordered by the node id status tables only. When applicable, a
footnote will follow the Database Status Table, indicating which AMP vproc has been selected
as the Control AMP.
The following table shows the columns of the ONLINE vproc status row.
Column
Description
Vproc-Ids Range
Crash Count
Node Ids
Identifies the Node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number and MM denotes the
module number.
The following table shows the columns of the NOTONLINE vproc status row.
Utilities
Column
Description
Vproc-Ids Range
363
Column
Description
Crash Count
Vproc State
Represents the current PDE system state of a vproc if the state is not online.
Config Status
Node Ids
Identifies the Node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number and MM denotes the
module number.
Example
Enter a command, HELP or QUIT:
status dbs orderby nodeid
SYSTEM NAME: nirvana
07/12/21 15:29:09
DBS LOGICAL CONFIGURATION
364
Utilities
STATUS NOTONLINE
Purpose
The STATUS NOTONLINE command reports the status row for vprocs and nodes that are
not fully online.
Syntax
STATUS
ST
NOTONLINE
NO
GS07B017
Usage Notes
The following table shows the columns of the vproc status row.
Column
Description
Vproc Number
Rel. Vproc#
Represents the number of the vproc relative to the Node upon which the vproc
resides.
Node ID
Identifies the node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number, and MM denotes the
module number.
Can Move
This indicates whether the vproc can be migrated to another node in its
defined clique if its primary node fails.
Crash Count
Represents the number of times the vproc has crashed. The count increments
with every attempted system restart. When the system restart succeeds, Crash
Count is reset to 0 for all vprocs.
Vproc State
Config Status
Displays the Teradata Database Logical Configuration Map Status of the vproc.
Config Type
Cluster/Host No.
Displays the Cluster Number if the Config Type is AMP or displays the Host
No. if the Config Type is PE.
Cluster is the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Host No. is the host number that was assigned to the PE using the
Configuration Utility. The valid range of host numbers is 1 to 1023.
Utilities
365
Column
Description
RcvJrnl/Host Type
Displays the RcvJrnl (that is, Recovery Journaling) flag if the Config Type is
AMP or displays the Host Type if the Config Type is PE.
The RcvJrnl flag is Off if an AMP is down and the other AMPs in its cluster are
not to create a recovery journal for the down AMP.
Note: If you anticipate that an AMP will be down for a long period of time,
then Teradata recommends an offline rebuild of all tables on the AMP (after
the RcvJrnl flag has been set to Off).
The Host Type is the host type for the PE as defined using the Configuration
Utility and is one of the following:
TVS Vproc
IBM
COP
ATT3B
BULLHN
OS1100
Example
Enter a command, HELP, or QUIT:
status notonline
SYSTEM NAME: teradata-1
09/09/14 14:38:04
DBS LOGICAL CONFIGURATION
-------------------------
Rcv
Jrnl/
Vproc Rel.
Node
Can
Crash Vproc
Config
Config Cluster/ Host TVS
Number Vproc# ID
Move Count State
Status
Type
Host No. Type Vproc
------ ------ ------ ----- ----- ------- -------- ------ -------- ----- ----5
6
2-14 Yes
0
OFFLINE Online
AMP
2
On
10237
--------------------------------------------------------------------------------
366
Utilities
STATUS ONLINE
Purpose
The STATUS ONLINE command reports the online status.
Syntax
STATUS
ST
ONLINE
ON
GS07B016
Usage Notes
If all vprocs are online, the STATUS ONLINE command simply reports that.
If one or more vprocs are offline, the STATUS ONLINE command displays a STATUS row for
each of the vprocs that is online. When applicable, a footnote will follow the Database Status
Table, indicating which AMP vproc has been selected as the Control AMP.
The following table shows the columns of the vproc status row.
Utilities
Column
Description
Vproc Number
Rel. Vproc#
Represents the number of the vproc relative to the Node upon which the vproc
resides.
Node ID
Identifies the node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number, and MM denotes the
module number.
Can Move
This indicates whether the vproc can be migrated to another node in its defined
clique if its primary node fails.
Crash Count
Represents the number of times the vproc has crashed. The count increments
with every attempted system restart. When the system restart succeeds, Crash
Count is reset to 0 for all vprocs.
Vproc State
Config Status
Displays the Teradata Database Logical Configuration Map Status of the vproc.
Config Type
367
Column
Description
Cluster/Host
No.
Displays the Cluster Number if the Config Type is AMP or displays the Host No.
if the Config Type is PE.
Cluster is the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Host No. is the host number that was assigned to the PE using the Configuration
Utility. The valid range of host numbers is 1 to 1023.
RcvJrnl/Host
Type
Displays the RcvJrnl (that is, Recovery Journaling) flag if the Config Type is AMP
or displays the Host Type if the Config Type is PE.
The RcvJrnl flag is Off if an AMP is down and the other AMPs in its cluster are
not to create a recovery journal for the down AMP.
Note: If you anticipate that an AMP will be down for a long period of time, then
Teradata recommends an offline rebuild of all tables on the AMP (after the
RcvJrnl flag has been set to Off).
The Host Type is the host type for the PE as defined using the Configuration
Utility and is one of the following:
TVS Vproc
IBM
COP
ATT3B
BULLHN
OS1100
The PDE Status Table includes a status row for each node that is defined on the system. The
columns of the node status row are shown in the following table.
368
Column
Description
Node ID
The Node ID as defined using the Parallel Upgrade Tool (PUT). For more
information, see the Parallel Upgrade Tool (PUT) Reference. The Node ID is
formatted as CCC-MM, where CCC denotes the cabinet number and MM
denotes the module number.
Node State
The current state of the node, which is either ONLINE, DOWN, or STANDBY.
Clique Number
The clique number for the node as defined using the Parallel Upgrade Tool
(PUT). For more information, see the Parallel Upgrade Tool (PUT) Reference.
CPUs
Memory (MB)
The total memory size in megabytes for the node (rounded up to the nearest
integer).
CHANs
LANs
AMPs
Utilities
Column
Description
Node Name
When applicable, a footnote will follow the PDE Status Table, indicating which node is
defined as a Non-TPA Node (for STANDBY node).
Example 1
If all vprocs are online, the STATUS ONLINE command simply reports that.
Enter a command, HELP or QUIT:
status online
08/01/09 20:08:13
Example 2
If any vproc is offline, the STATUS ONLINE command returns the status row for all vprocs
and nodes that are fully online. In the following example, only the AMP identified with vproc
number zero is ONLINE.
Enter a command, HELP or QUIT:
status online
SYSTEM NAME: teradata-1
07/12/21 19:13:42
DBS LOGICAL CONFIGURATION
-------------------------
Rcv
Jrnl/
Vproc Rel.
Node
Can
Crash Vproc
Config
Config Cluster/ Host TVS
Number Vproc# ID
Move Count State
Status
Type
Host No. Type Vproc
------ ------ ------ ----- ----- ------- -------- ------ -------- ----- ----0*
1
1-01 Yes
0
ONLINE Online
AMP
0
On
10238
8192
4
1-01 No
0
ONLINE N/A
GTW
1
COP
N/A
10237
5
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
10238
6
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
16383
3
1-01 Yes
0
ONLINE Online
PE
1
COP
N/A
-------------------------------------------------------------------------------*
DBS Control AMP
DBS State: Logons are enabled - The system is quiescent
DBS RestartKind: COLD
PDE PHYSICAL CONFIGURATION
-------------------------Node
Node
Clique
Memory
ID
State
Number CPUs (MB) CHANs LANs AMPs Node Name
------- ------- ------ ---- ------ ----- ---- ---- --------------------------1-01 ONLINE
0
2
2047
0
1
2 localhost
-----------------------------------------------------------------------------PDE State: RUN/STARTED
Utilities
369
STATUS PDE
Purpose
The STATUS PDE command reports the status of the PDE.
Syntax
STATUS
PDE
ST
GS07A023
Usage Notes
The STATUS PDE command returns the PDE Status Table only. The PDE Status Table
includes a status row for each node that is defined on the system. The columns of the node
status row are shown in the following table.
370
Column
Description
Node ID
The Node ID as defined using the Parallel Upgrade Tool (PUT). For more
information, see the Parallel Upgrade Tool (PUT) Reference. The Node ID is
formatted as CCC-MM, where CCC denotes the cabinet number and MM
denotes the module number.
Node State
The current state of the node, which is either ONLINE, DOWN, or STANDBY.
Clique Number
The clique number for the node as defined using the Parallel Upgrade Tool
(PUT). For more information, see the Parallel Upgrade Tool (PUT) Reference.
CPUs
Memory (MB)
The total memory size in megabytes for the node (rounded up to the nearest
integer).
CHANs
LANs
AMPs
Node Name
Utilities
Example
SYSTEM NAME: default_vconfig
03/01/21 13:35:49
Utilities
371
STATUS RESTART
Purpose
The STATUS RESTART command reports the current system RestartKind setting.
Syntax
STATUS
ST
RESTART
R
GS07B019
Example
Enter a command, HELP, or QUIT:
status restart
DBS RestartKind = COLD.
372
Utilities
STATUS SYSSTATE
Purpose
The STATUS SYSSTATE command reports the current system state and the System Debugger,
if it is attached.
Syntax
STATUS
ST
SYSSTATE
SYSS
GS07B018
Example
Enter a command, HELP, or QUIT:
status sysstate
DBS State: Logons are enabled - The system is quiescent
PDE State: RUN/STARTED
Utilities
373
STATUS vproclist
Purpose
The STATUS vproclist command reports the vproc status table row for the specified vproc or
vprocs and allow a maximum of 30720 or 16384 vprocs, depending on the system, to be
specified. This command does not display a vproc status row for undefined vprocs.
Syntax
STATUS
vproclist
ST
GS07B015
Syntax element
Description
vproclist
Usage Notes
The following table shows the columns of the vproc status row.
374
Column
Description
Vproc Number
Rel. Vproc#
Represents the number of the vproc number relative to the Node upon which
the vproc resides.
Node ID
Identifies the Node upon which the vproc resides. The Node ID is formatted as
CCC-MM, where CCC denotes the cabinet number and MM denotes the
module number.
Movable
This indicates whether the vproc can be migrated to another node in its
defined clique if its primary node fails.
Crash Count
Vproc State
Config Status
Config Type
Utilities
Column
Description
Cluster/Host No.
Displays the Cluster Number if the Config Type is AMP or displays the Host
No. if the Config Type is PE.
Cluster is the cluster number for the AMP as defined using the Configuration
Utility. The valid range of cluster numbers is 0 to 8099.
Host No. is the host number that was assigned to the PE using the
Configuration Utility. The valid range of host numbers is 1 to 1023.
RcvJrnl/Host Type
Displays the RcvJrnl (that is, Recovery Journaling) flag if the Config Type is
AMP or displays the Host Type if the Config Type is PE.
The RcvJrnl flag is Off, if an AMP is down and the other AMPs in its cluster are
not to create a recovery journal for the down AMP.
Note: If you anticipate that an AMP will be down for a long period of time,
then Teradata recommends an offline rebuild of all tables on the AMP (after
the RcvJrnl flag has been set to Off).
The Host Type is the host type for the PE as defined using the Configuration
Utility and is one of the following: IBM, COP, ATT3B, BULLHN, or OS1100.
TVS Vproc
Utilities
375
Example 1
Enter a command, HELP or QUIT:
status 1, 2, 8192 to 16383
07/12/21 15:55:47
DBS LOGICAL CONFIGURATION
-------------------------
Rcv
Jrnl/
Vproc Rel.
Node
Can
Crash Vproc
Config
Config Cluster/ Host TVS
Number Vproc# ID
Move Count State
Status
Type
Host No. Type Vproc
------ ------ ------ ----- ----- ------- -------- ------ -------- ----- ----0*
1
1-01 Yes
0
ONLINE Online
AMP
0
On
10238
1
2
1-01 Yes
0
ONLINE Online
AMP
0
On
10237
8192
4
1-01 No
0
ONLINE N/A
GTW
1
COP
N/A
10237
5
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
10238
6
1-01 Yes
0
ONLINE N/A
TVS
0
N/A
N/A
16383
3
1-01 Yes
0
ONLINE Online
PE
1
COP
N/A
-------------------------------------------------------------------------------*
DBS Control AMP
DBS State: Logons are enabled - The system is quiescent
DBS RestartKind: COLD
Example 2
The following is an example status display for undefined vprocs.
Enter a command, HELP, or QUIT:
status 100 to 300
SYSTEM NAME: teradata-1
95/11/29 11:12:16
376
Utilities
APPENDIX A
This appendix describes the conventions that apply to reading the syntax diagrams used in
this book.
Definition / Comments
Letter
Number
Word
Spaces
Punctuation
Paths
The main path along the syntax diagram begins at the left with a keyword, and proceeds, left
to right, to the vertical bar, which marks the end of the diagram. Paths that do not have an
arrow or a vertical bar only show portions of the syntax.
The only part of a path that reads from right to left is a loop.
Utilities
377
Continuation Links
Paths that are too long for one line use continuation links. Continuation links are circled
letters indicating the beginning and end of a link:
A
FE0CA002
When you see a circled letter in a syntax diagram, go to the corresponding circled letter and
continue reading.
Required Entries
Required entries appear on the main path:
SHOW
FE0CA003
If you can choose from more than one entry, the choices appear vertically, in a stack. The first
entry appears on the main path:
SHOW
CONTROLS
VERSIONS
FE0CA005
Optional Entries
You may choose to include or disregard optional entries. Optional entries appear below the
main path:
SHOW
CONTROLS
378
FE0CA004
Utilities
If you can optionally choose from more than one entry, all the choices appear below the main
path:
READ
SHARE
JC01A010
ACCESS
Some commands and statements treat one of the optional choices as a default value. This
value is UNDERLINED. It is presumed to be selected if you type the command or statement
without specifying one of the options.
Strings
String literals appear in apostrophes:
'msgtext '
JC01A004
Abbreviations
If a keyword or a reserved word has a valid abbreviation, the unabbreviated form always
appears on the main path. The shortest valid abbreviation appears beneath.
SHOW
CONTROLS
CONTROL
FE0CA042
SHOW CONTROLS
SHOW CONTROL
Loops
A loop is an entry or a group of entries that you can repeat one or more times. Syntax
diagrams show loops as a return path above the main path, over the item or items that you can
repeat:
,
,
(
cname
3
4
)
JC01B012
Utilities
379
THEN...
Excerpts
Sometimes a piece of a syntax phrase is too large to fit into the diagram. Such a phrase is
indicated by a break in the path, marked by (|) terminators on each side of the break. The
name for the excerpted piece appears between the terminators in boldface type.
The boldface excerpt name and the excerpted phrase appears immediately after the main
diagram. The excerpted phrase starts and ends with a plain horizontal line:
LOCKING
excerpt
A
HAVING
con
excerpt
where_cond
,
cname
,
col_pos
JC01A014
380
Utilities
dbname
DATABASE
tname
TABLE
vname
VIEW
JC01A016
dbname
DATABASE dbname
tname
TABLE tname
vname
VIEW vname
viewname
AS
A
LOCKING
cname
CV
LOCK
ACCESS
dbname
A
DATABASE
tname
FOR
SHARE
IN
READ
TABLE
WRITE
EXCLUSIVE
vname
VIEW
EXCL
,
SEL
B
MODE
expr
,
FROM
qual_cond
tname
.aname
C
HAVING cond
;
qual_cond
,
WHERE cond
GROUP BY
cname
,
col_pos
JC01A018
Utilities
381
Diagram Identifier
The alphanumeric string that appears in the lower right corner of every diagram is an internal
identifier used to catalog the diagram. The text never refers to this string.
382
Utilities
APPENDIX B
Teradata Database offers several user interfaces from which the utilities may be started and
run.
Interface
Description
Database Window
(DBW)
Utilities that run directly from the command line are primarily those
that operate on the PDE level of Teradata Database.
Note: Not all utilities support all available user interfaces. For a listing of supported user
interfaces for each utility, see the documentation for each utility.
When started, some utilities present their own interactive command-line or graphical user
interfaces. These utilities allow browsing and entering information, and continue running
until they are explicitly stopped. Many utilities that present their own command environment
are stopped by entering the QUIT command.
Some utilities that run from DBW can be stopped by issuing the stop window_number
command from the DBW Supervisor window, where window_number is the numeric
identifier of the DBW application window in which the utility is running. For more
information on DBW, see Utilities Volume 1.
Utilities
383
where displayspec is the name or IP address of the local machine, followed by a colon and
the server number, typically 0 or 0.0. For example:
xdbw -display myworkstation.mycompany.com:0.0 &
or
xdbw -display 192.0.2.24:0.0 &
384
Utilities
where utilityname is the name of the utility, and options can include any of the available
command-line options and arguments of that utility. utilityname is not case-sensitive.
The following message appears:
Started 'utilityname' in window x
where x is the number of one of the four available application windows DBW provides.
Each utility started runs in one of the four application windows. The title bar of the
application window and the corresponding button in the DBW main window change to
reflect the name of the running utility. When the utility stops running, the application
window and main window button revert to the default text title (that is, Appl1, Appl2, and
so forth).
Note: Up to four utilities can be run concurrently in DBW. The message All Interactive
Partitions are busy!! indicates that all four application windows are occupied. In this case,
one of the four running utilities must be quit before another can be started.
For more information on DBW and CNS commands, and on options that are available
with the START command, see Utilities Volume 1.
Utilities
385
Note: Operators must be members of the tdtrusted user group or have root access to run
console utilities. Other users can run the utilities only if they have been explicitly granted
access using the GRANT command.
TDPID is the Teradata Database system name. After you enter the required information,
the terminal displays the following:
Enter the Utility to execute
- SESsionStatus
- CONfiguration
- LOCKsDisplay
- RCVmanager
First 3 characters are acceptable
386
Utilities
Glossary
2PC
Two-phase Commit
AG
Allocation Group
AMP
ARC
Archive/Recovery
AWT
BLK Block
BLC
Block-Level Compression
CID
CNS
CJ
Data Block
DBW
Database Window
DDL
DEM
DML
Utilities
FIB
FSE
FSG
387
Glossary
hex
Hexadecimal
HG
Host Group
HN Host Number
HOST
HUT
HUTCNS
IMS
LAN
LSN Specification
LUN
Logical Unit
MDS
Metadata Services
MI Master Index
MLOAD
MultiLoad
No Primary Index
NPPI
388
PCT
PDE
Utilities
Glossary
PE
Parsing Engine
PG
Performance Group
PID
PJ
Process ID
Permanent Journal
PMPC
PPI
PROC
PUT
QIC
Quarter-inch Cartridge
RBM
RJ Recovery Journal
RP
Resource Partition
RSG
RSS
SDF
Symmetric MultiProcessing
stdin
Standard Input
stdout
Standard Output
Supervisor Icon
sysinit
System Initializer
SysView
TBBLC
TCHN
Teradata Channel
TDGSS
TDP
Utilities
System View
389
Glossary
Teradata ASM
TGTW
TJ
Teradata Gateway
Transient Journal
TLE
TPA
TZ
Time Zone
UDF
User-Defined Function
UDM
User-Defined Method
UDT
User-Defined Type
UNFES
Unfree Sector
UTC
vdisk
Virtual Disk
vproc
Virtual Processor
WAL
WCI
390
Utilities
Index
EXIT command
Vproc Manager utility 347
External commands, Modify MPP List utility 77
B
BLOCKERS command, Lock Display utility 24
BOOT command, Vproc Manager utility 342
C
CANCEL ROLLBACK ON TABLE command, Recovery
Manager utility 203
CLEARMVAMP command, Vproc Manager utility 343
COMMIT command,
Two-Phase Commit Console utility 319
Configuration Display. See Query Configuration utility
Crashdumps, TPA Reset utility 313
D
Database Utilities overview 17
DB command, Lock Display utility 27
Dbschk 230
see also Resource Check Tools
DEFAULT PRIORITY command,
Recovery Manager utility 208
Delimiters in object names, Lock Logger utility 50
DISPLAY command, Modify MPP List utility 71
DISPLAY command, Two-Phase Commit Console utility 320
Dumplocklog utility. See Lock Logger utility
dumplocklogb, Lock Logger utility 51
Dumps, TPA Reset utility 313
Utilities
H
HELP command
Lock Display utility 30
Recovery Manager utility 209
Vproc Manager utility 344
Host utility (HUT) locks. See Show Locks utility
I
In-doubt transactions, identifying and resolving 321
INITVDISK command, Vproc Manager utility 346
L
LIST CANCEL ROLLBACK TABLES command,
Recovery Manager utility 210
LIST command, Modify MPP List utility 72
LIST LOCKS command, Recovery Manager utility 211
LIST ROLLBACK TABLES command,
Recovery Manager utility 212
LIST STATUS command, Recovery Manager utility 215
LIST STATUS proc-id command,
Recovery Manager utility 220
Lock Display utility 21
command overview 23
explicit and implicit lock modes 22
hash mark notation 23, 42
lock modes 22
lock request status 23
lock-mode contention 22
overview 21
starting 21, 253, 257
Lock Display utility commands
BLOCKERS 24
DB 27
HELP 30
QUIT 31
ROWHASH 32
ROWRANGE 35
TABLE 37
TRAN 39
391
Index
M
Messages, Locking Logger utility 64
Milestone limits, Priority Scheduler utility
resource usage 90
time-of-day 91
Modify MPP List utility
commands 69
editing a user-specified mpplist 69
editing the default mpplist 68
overview 67
starting 67
Modify MPP List utility commands 69
DISPLAY 71
external commands 77
LIST 72
392
OFF id_list 73
ON id_list 74
QUIT 75
WRITE 76
Modmpplist. see Modify MPP List utility
N
Node panic, TPA Reset utility 313
Nodecheck 236
log file 237
see also Resource Check Tools
O
OFF id_list command, Modify MPP List utility 73
ON id_list command, Modify MPP List utility 74
P
Panic, TPA Reset utility 313
Performance Groups, Priority Scheduler utility 85
naming 86
recording PG name in a user record 87
Performance Periods, Priority Scheduler utility 88
components 89
resource usage 90
time-of-day limit 91
types and limits 89
Priority Scheduler utility (SLES 10 only) 79
active time 98
Allocation Group weight 95
Allocation Groups 93
commands, see schmon utility options
components 80
limiting CPU usage 98
overview 80
Performance Group names 86
Performance Groups 85
Performance Period types and limits 89
Performance Periods 88
resource accounting 97
Resource Partitions 83
resource usage milestone limits 90
Scheduling Sets 97, 98
schmon utility 103
see also schmon 79
using 82
Q
Qryconfig. See Query Configuration utility
Qrysessn. See Query Session utility
Query Configuration utility 155
about 155
Utilities
Index
R
Rcvmanager. See Recovery Manager utility
REBUILD AMP command, Table Rebuild utility 261
REBUILD AMP FALLBACK TABLES command, Table
Rebuild utility 267
Utilities
393
Index
nodecheck 236
nodecheck log file 237
overview 229
starting 229
syscheck 243
syscheckrc file 248
Resource Partitions, Priority Scheduler utility
determining relative weight 84
limiting CPU usage 84
parameters 83
recommended set up 85
Resource Partitions,
Priority Scheduler utility (SLES 10 only) 83
Resource Partitions,Priority Scheduler utility 83
RESTART command, Vproc Manager utility 348
RESTART REBUILD command, Table Rebuild utility 270
Restart Teradata Database, reset Teradata Database 313
ROLLBACK command,
Two-Phase Commit Console utility 319
ROLLBACK SESSION...PERFORMANCE GROUP
command, Recovery Manager utility 226
Rollbacks, cancelling with Recovery Manager utility 200
ROWHASH command, Lock Display utility 32
ROWRANGE command, Lock Display utility 35
S
Scheduling Sets, Priority Scheduler utility 97, 98
Schmon (SLES 10 only)
starting 103
see also Priority Scheduler utility
Schmon options (SLES 10 only)
-a 105
-b 110
-c 115
-d 117
-f 120
-h 121
-l 122
-M 130
-m 123
-p 140
-s 145
-t 150
-w 152
SDF file 279
elements 280
Session States. See Query Session utility
SET RESTART command, Vproc Manager utility 350
SET vproclist command, Vproc Manager utility 351
Show Locks utility 253
host utility locks 253
HUT lock conflicts 256
HUT locks 253
394
T
TABLE command, Lock Display utility 37
Table Rebuild utility 257
error messages 259
help 260
locking during rebuilds 258
no-fallback tables 257
overview 257
rebuilding tables 265
restarting 270
running in the background 265, 268
Table Rebuild utility commands
overview 259
REBUILD AMP 261
REBUILD AMP FALLBACK TABLES 267
RESTART REBUILD 270
Task List utility 271
overview 271
starting 271
syntax 271
Tdlocaledef. See Teradata Locale Definition utility
Tdnstat. See Teradata Network Statistics utility
Tdntune. See Teradata Network Tuner utility
Teradata Database
resetting and restarting 313
Teradata Database Utilities overview 17
Utilities
Index
U
Update DBC utility
overview 323
starting 324
Update DBS utility 323
Update Space utility 325
overview 325
starting 325
syntax 326
Updatedbc. See Update DBC utility
Updatespace. See Update Space utility
Utilities
alphabetical listing 17
running on different platforms 383
starting on z/OS 386
starting 329
when to run 330
Verify_pdisks. See Verify Pdisks utility
Vproc Manager utility 333
command syntax 340
ConfigStatus transitions 338
definitions of terms 334
overview 333
starting 334
VprocState transitions 338
Vproc Manager utility commands
BOOT 342
CLEARMVAMP 343
EXIT 347
HELP 344
INITVDISK 346
overview 340
QUIT 347
RESTART 348
SET RESTART 350
SET vproclist 351
STATUS 354
STATUS DBS 357
STATUS DBS ORDERBY CN 359
STATUS DBS ORDERBY HN 361
STATUS DBS ORDERBY NODEID 363
STATUS NOTONLINE 365
STATUS ONLINE 367
STATUS PDE 370
STATUS RESTART 372
STATUS SYSSTATE 373
STATUS vproclist 374
Vprocmanager. See Vproc Manager utility
W
WRITE command, Modify MPP List utility 76
Z
z/OS, starting utilities on 386
V
Vconfig GDO 331
Vconfig text file (vconfig.txt, vconfig.out) 331
Verify Pdisks utility 329
examples 331
overview 329
Utilities
395
Index
396
Utilities