SystemFE Macros-171K
SystemFE Macros-171K
SystemFE Macros
Release 17.10
July 2021
B035-1103-171K
DOCS.TERADATA.COM
Copyright and Trademarks
Copyright © 2000 - 2021 by Teradata. All Rights Reserved.
All copyrights and trademarks used in Teradata documentation are the property of their respective owners. For more information, see
Trademark Information.
Product Safety
Indicates a situation which, if not avoided, could result in damage to property, such as to equipment
NOTICE or data, but not related to personal injury.
Indicates a hazardous situation which, if not avoided, could result in minor or moderate
CAUTION personal injury.
Indicates a hazardous situation which, if not avoided, could result in death or serious
WARNING personal injury.
Third-Party Materials
Non-Teradata (i.e., third-party) sites, documents or communications (“Third-party Materials”) may be accessed or accessible (e.g., linked or
posted) in or in connection with a Teradata site, document or communication. Such Third-party Materials are provided for your convenience
only and do not imply any endorsement of any third party by Teradata or any endorsement of Teradata by such third party. Teradata is not
responsible for the accuracy of any content contained within such Third-party Materials, which are provided on an “AS IS” basis by Teradata.
Such third party is solely and directly responsible for its sites, documents and communications and any harm they may cause you or others.
Warranty Disclaimer
Except as may be provided in a separate written agreement with Teradata or required by applicable law, the information available
from the Teradata Documentation website or contained in Teradata information products 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 noninfringement.
The information available from the Teradata Documentation website or contained in Teradata information products 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.
The information available from the Teradata Documentation website or contained in Teradata information products may be changed or
updated by Teradata at any time without notice. Teradata may also make changes in the products or services described in this information
at any time without notice.
Machine-Assisted Translation
Certain materials on this website have been translated using machine-assisted translation software/tools. Machine-assisted translations
of any materials into languages other than English are intended solely as a convenience to the non-English-reading users and are not
legally binding. Anybody relying on such information does so at his or her own risk. No automated translation is perfect nor is it intended to
replace human translators. Teradata does not make any promises, assurances, or guarantees as to the accuracy of the machine-assisted
translations provided. Teradata accepts no responsibility and shall not be liable for any damage or issues that may result from using such
translations. Users are reminded to use the English contents.
Feedback
To maintain the quality of our products and services, e-mail your comments on the accuracy, clarity, organization, and value of this document
to: [email protected].
Any comments or materials (collectively referred to as "Feedback") sent to Teradata Corporation will be deemed nonconfidential. Without
any payment or other obligation of any kind and without any restriction of any kind, Teradata and its affiliates are hereby free to (1) reproduce,
distribute, provide access to, publish, transmit, publicly display, publicly perform, and create derivative works of, the Feedback, (2) use any
ideas, concepts, know-how, and techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing,
and marketing products and services incorporating the Feedback, and (3) authorize others to do any or all of the above.
Contents
Teradata Vantage™ is our flagship analytic platform offering, which evolved from our industry-leading
Teradata® Database. Until references in content are updated to reflect this change, the term Teradata
Database is synonymous with Teradata Vantage.
This document is a basic guide to a set of macros for generating reports on system events and using them
as a diagnostic tool.
Prerequisites
You should be familiar with Teradata® SQL and Basic Teradata Query (BTEQ) facility.
If you are not familiar with BTEQ or Teradata SQL, you can review the following documents:
July With this release, Teradata session mode macros are created in DIPPOST and ANSI session
2021 mode macros are created in DIPANSI. See macro descriptions in SystemFE Macros Description.
June Added the Customer Data Space (CDS) Tools, macros that return the data space used in terabytes
2020 by tables, databases, and the system. The macros also let you exclude certain tables from the
calculations and view the list of excluded tables. The following macros are added:
• CDS_AddExclusion/CDS_AddExclusion_ANSI
• CDS_Database/CDS_Database_ANSI
• CDS_LogicalTableSizeEstimate/CDS_LogicalTableSizeEstimate_ANSI
• CDS_ModifyPercentData/CDS_ModifyPercentData_ANSI
• CDS_Object/CDS_Object_ANSI
• CDS_PhysicalTableSizeEstimate/CDS_PhysicalTableSizeEstimate_ANSI
• CDS_RemoveExclusion/CDS_RemoveExclusions_ANSI
• CDS_System/CDS_System_ANSI
• CDS_ViewExclusions/CDS_ViewExclusions_ANSI
• CDS_ViewPercentData/CDS_ViewPercentData_ANSI
The SystemFE macros provide information about reported system events. You can use this information to
monitor the health of the database. The SystemFE Macros are designed to be run using the BTEQ facility.
By default, the SystemFE macros reside in the SystemFE database. All macros that have Fromdate and
Todate as parameters use inclusive dates. The default value for Todate is DATE (the current date).
You can use SystemFE macros to quickly produce reports relevant to system messages stored in
the DBC.SW_Event_Log.
Teradata recommends that you use character dates as opposed to numeric dates for producing reports.
Recommended format: 'YYYY-MM-DD'
For example, for May 31, 2013 input '2013-05-31'
Format not recommended: (YYYY-1900) *10000+ m*100+d
For example, for May 31, 2013, 1130531 is correct but not recommended.
For more information on using character format and numeric format, see Teradata Vantage™ - Data Types
and Literals, B035-1143.
For additional resources to consult for any problem or proactive health check activity, as well as
advice on when to delete system messages from the DBC.SW_Event_Log, see Analyzing Preventive
Maintenance Reports.
If you do not have the SystemFE macros installed on your system, open Database Window (DBW). Then,
run the Database Initialization Program (DIP) utility from the Supervisor window and select the SQL script file
DIPSYSFE. For Teradata session mode CDS macros, select SQL script file DIPPOST and for ANSI session
mode CDS macros, select SQL script file DIPANSI.
For information on DBW and the DIP utility, see Teradata Vantage™ - Database Utilities, B035-1102.
This returns a single row containing a count of events, the date of the earliest event, and the date of the most
recent event. The count will be zero and the dates will be NULL if there are no events in the log.
AllRestarts
Returns all software restart events logged in the DBC.SW_Event_Log table for a set period of time.
Syntax
AllRestarts ( Fromdate [, Todate] ) ;
Syntax Elements
Fromdate
The earliest date of a restart that is to be listed in the report.
The format is 'YYYY-MM-DD'. This parameter can be coded either as a character string, for
example, '2013-05-31', or as a numeric value, for example, 1130531.
Todate
The latest date of a restart that is to be listed in the report. The format is 'YYYY-MM-DD'.
This parameter can be coded either as a character string, for example, '2013-05-31', or as a
numeric value, for example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The AllRestarts macro report is based on event code 033-13895-00.
For a complete description of these events, see the information about Parallel Database Extensions (PDE)
messages in Teradata Vantage™ - Database Messages, B035-1096.
The output shows the date, time, and all lines of the DBC.SW_Event_Log connected with each software
restart event. This macro also provides a summary of the causes of outage at the end of the report to help
identify events that cause the most restarts.
Examples
The following statement generates a report of all restarts between May 5, 2013, and the date of today:
The following statement generates a report of all restarts for the last seven days:
The following statement generates a report of all restarts between January 1, 2013 and
March 18, 2013:
exec AllRestarts('2013-01-01','2014-03-18');
exec AllRestarts('2013-01-01','2014-03-18');
*** Echo accepted.
*** Total elapsed time was 1 second.
*** Echo accepted.
*** Echo accepted.
*** Echo accepted.
*** Echo accepted.
BynetEvents
Returns all BYNET events logged in the DBC.SW_Event_Log table for a set period of time.
Note:
This macro is not case-sensitive. Uppercase and lowercase letters can be used interchangeably.
Syntax
BYNETEvents ( Fromdate [, Todate] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The BynetEvents macro returns all messages based on event codes:
• 033-11100-00 to 033-11121-00 (TDN messages)
• 033-12900-00 to 033-12999-00 (BNS messages)
• 033-13000-00 to 033-13021-00 (CFG messages)
• And, for any event from any series that contains the string "bynet"
For a complete description of these events, see “Parallel Database Extensions (PDE) Messages” Teradata
Vantage™ - Database Messages, B035-1096.
If you want to examine more information than the macro displays by default, run a SELECT query on the
DBC.SW_Event_Log table by providing the necessary criteria and targeting against the field “TEXT.” Here
is an example of the SELECT query:
This causes the system to display all the available information for the events rather than a truncated
version. In most cases, the latter version is sufficient to understand the nature of the problem.
Informational messages (that is, those requiring no action) are recorded to the DBC.Software_Event_Log
view when one of the following occurs:
• A TPA restart occurs
• The BYNET initiates a TPA restart
When multiple messages are recorded over a very short time period, a BYNET event might have occurred
forcing a node offline. If a node has been forced offline by the BYNET, you might need a Teradata field
engineer to resolve the BYNET event.
Examples
The following statement generates a report of all BYNET Events for the last seven days:
The following statement generates a report of BYNET Events between October 20, 2012 and February
23, 2013:
The following statement generates a report of BYNET Events between December 19, 2012 and January
1, 2013:
14:52:48.000000 140000806|bynet|1|H|I|O|1|2|B|0|0|bya.c|65535|65535|
65535|11#BYA: BYA112-4 input port error on
adapter port 1: unexpected command.
140000806|bynet|1|H|I|O|1|2|B|0|0|bya.c|65535|65535|
65535|11#BYA: BYA113-4 input port error on adapter
port 0: soft carrier loss.
15:02:05.000000 140001006|bynet |1|S|I|O|1|2|B|0|0|bya.c|65535|65535|
65535|12#BYA: BYA113-4 restarting to bring in late
arriver node 0xDE4 on port 0.
140001006|bynet |1|S|I|O|1|3|B|0|0|bya.c|65535|65535|
65535|12#BYA: BYA112-4 restarting to bring in late
arriver node 0xDE4 on port 1.
12/12/29 19:09:48.000000 140000806|bynet |1|H|I|O|1|3|B|0|0|bya.c|65535|65535|
65535|13#BYA: BYA113-4 input port error on adapter
port 0: soft carrier loss.
140000806|bynet |1|H|I|O|1|2|B|0|0|bya.c|65535|65535|
65535|13#BYA: BYA112-4 input port error on adapter
port 1: violation error.
19:19:06.000000 140001006|bynet |1|S|I|O|1|1|B|0|0|bya.c|65535|65535|
65535|14#BYA: BYA112-4 restarting to bring in late
arriver node 0xDE4 on port 1.
140001006|bynet |1|S|I|O|1|3|B|0|0|bya.c|65535|65535|
65535|14#BYA: BYA113-4 restarting to bring in late
arriver node 0xDE4 on port 0.
*** Echo accepted.
CDS_ViewExclusions/CDS_ViewExclusions_ANSI
Returns the list of objects to be excluded from data space computations for a database or system.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_ViewExclusions | CDS_ViewExclusions_ANSI } ;
Usage Notes
• By default, all Data Dictionary and system tables are added to the exclusion list.
To add other tables or databases to the exclusion list, use CDS_AddExclusion
or CDS_AddExclusion_ANSI.
• DBC.CDSTableSizeV does not report objects in exclusion list.
Example
The following example returns the list of objects excluded from customer data space computations on a
system. An asterisk (*) means all tables of the database.
EXEC systemfe.CDS_ViewExclusions;
DataBaseName TableName
DBC *
dbcmngr *
LockLogShredder *
PDCRADMIN *
PDCRDATA *
PDCRSTG *
SQLJ *
SysAdmin *
SYSBAR *
SYSJDBC *
SYSLIB *
SYSSPATIAL *
SYSTEMFE *
SYSUDTLIB *
Sys_Calendar *
TDMaps *
TDQCD *
TDStats *
tdwm *
TD_SERVER_DB *
TD_SYSFNLIB *
TD_SYSXML *
CDS_AddExclusion/CDS_AddExclusion_ANSI
Adds objects to a list to exclude from the customer data space computation for a database or system.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_AddExclusion | CDS_AddExclusion_ANSI }
( TargetDatabaseName, TargetTableName ) ;
Syntax Elements
TargetDatabaseName
Database name of the table to exclude from data space computation.
TargetTableName
Table name to exclude from data space computation.
To exclude all tables of TargetDatabaseName, use '*' as the TargetTableName value.
Examples
The following example adds Test.Clobtable to the list of tables to exclude from the data space computation:
The following example adds all tables of database Test to the list of tables to exclude from the data
space computation:
CDS_RemoveExclusion/CDS_RemoveExclusion_ANSI
Removes an object from the exclusion list.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_RemoveExclusion | CDS_RemoveExclusion_ANSI } (
TargetDatabaseName,
TargetTableName
) ;
Syntax Elements
TargetDatabaseName
Name of the database on which the target object resides.
TargetTableName
Name of the target object.
Examples
The following example removes the table test1.table1 from the exclusion list:
CDS_ViewPercentData
Returns the value that determines the percent of data for which the macros CDS_Database,
CDS_Database_ANSI, CDS_System, and CDS_System_ANSI collect statistics when called with
CollectSummaryStats ('Y').
Note:
Teradata session mode macros are created in DIPPOST.
Syntax
[ SystemFE. ] CDS_ViewPercentData ;
Examples
The following example returns the percent value for macros CDS_Database, CDS_Database_ANSI,
CDS_System, and CDS_System_ANSI to use when collecting statistics:
EXEC systemfe.CDS_ViewPercentData;
PercentValue
------------
80.00
CDS_ModifyPercentData
Modifies the value that determines the percent of data for which the macros CDS_Database,
CDS_Database_ANSI, CDS_System, and CDS_System_ANSI collect statistics when called with
CollectSummaryStats ('Y').
Note:
Teradata session mode macros are created in DIPPOST.
Syntax
[ SystemFE. ] CDS_ModifyPercentData ( NewPercentValue ) ;
Syntax Elements
NewPercentValue
Percent value for macros CDS_Database, CDS_Database_ANSI, CDS_System, and
CDS_System_ANSI to use when collecting statistics.
Examples
The following example changes the percent value for macros CDS_Database, CDS_Database_ANSI,
CDS_System, and CDS_System_ANSI to use when collecting statistics to 90:
EXEC systemfe.CDS_ModifyPercentData(90);
CDS_Object/CDS_Object_ANSI
Returns the consumed customer data space in terabytes for the specified object.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_Object | CDS_Object_ANSI }
( InputDatabaseName, InputTableName ) ;
Syntax Elements
InputDatabaseName
The name of the database in which the table resides.
InputTableName
The name of the table to evaluate for customer data space consumption.
Examples
The following example returns the consumed data space in terabytes for the table Glass:
CDS_Database/CDS_Database_ANSI
Returns the used customer data space in terabytes for a database.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_Database | CDS_Database_ANSI }
( InputDatabaseName, CollectSummaryStats ) ;
Syntax Elements
InputDatabaseName
The name of the database to evaluate for customer data space consumption.
CollectSummaryStats
Flag that indicates whether to collect summary statistics on the largest tables in
InputDatabaseName to return a more accurate estimate of CDS size. Value must be either
'Y' (yes) or 'N' (no).
Usage Notes
• To run this macro with CollectSummaryStats ('Y'), the SystemFE user needs the SELECT and STATS
privileges on InputDatabaseName.
SELECT lets the user check whether the statistics are stale and STATS lets the user collect statistics
on objects.
• CollectSummaryStats ('Y') increases the accuracy of the CDS values that the macro returns for the
database. However, if the statistics are stale or not already collected for InputDatabaseName, the
macro must collect new statistics, which increases macro running time.
Examples
The following example returns the consumed data space in terabytes for the inputdb database:
The following example collects summary statistics on the objects in the inputdb database if the statistics
are stale or not already collected, to return a more accurate estimate of CDS size:
CDS_System/CDS_System_ANSI
Returns the consumed customer data space in terabytes for the system.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_System | CDS_System_ANSI } ( CollectSummaryStats ) ;
Syntax Elements
CollectSummaryStats
Flag that indicates whether to collect summary statistics on the largest tables on the system
to return a more accurate estimate of CDS size. Value must be either 'Y' (yes) or 'N' (no).
Usage Notes
• To run this macro with CollectSummaryStats ('Y'), the SystemFE user needs the SELECT and STATS
privileges on all databases in the system.
SELECT lets the user check whether the statistics are stale and STATS lets the user collect statistics
on objects.
• CollectSummaryStats ('Y') increases the accuracy of the CDS values that the macro returns for the
system. However, if the statistics are stale or not already collected for database objects, the macro
must collect new statistics, which increases macro running time.
Example
The following example returns the consumed data space in terabytes for the system:
EXEC SystemFE.CDS_System('N');
Note:
Use CDS_AddExclusion/CDS_AddExclusion_ANSI and CDS_ViewExclusions/
CDS_ViewExclusions_ANSI to add to and view a list of objects to be excluded from data space
computations. By default, some Data Dictionary tables are already in the exclusion list.
The following example collects summary statistics on the objects in the system if they are stale or not
already collected, to return a more accurate estimate of CDS size:
EXEC systemfe.CDS_System('Y');
CDS_PhysicalTableSizeEstimate/
CDS_PhysicalTableSizeEstimate_ANSI
Returns the estimated physical table size in terabytes without fallback for the specified logical object size.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_PhysicalTableSizeEstimate |
CDS_PhysicalTableSizeEstimate_ANSI } (
TargetDatabaseName,
TargetTableName,
LogicalSizeTB
) ;
Syntax Elements
TargetDatabaseName
Name of the database on which the target object resides.
TargetTableName
Name of the target object.
LogicalSizeTB
Logical size of the target object in terabytes.
Examples
The following example returns the estimated physical size in terabytes without fallback for the table
test1.table1 if its logical size is 5 terabytes:
CDS_LogicalTableSizeEstimate/
CDS_LogicalTableSizeEstimate_ANSI
Returns the estimated logical table size in terabytes for the specified physical object size.
Note:
If you use ANSI session mode, use the _ANSI form of the macro.
Teradata session mode macros are created in DIPPOST and ANSI session mode macros are created
in DIPANSI.
Syntax
[ SystemFE. ] { CDS_LogicalTableSizeEstimate |
CDS_LogicalTableSizeEstimate_ANSI } (
TargetDatabaseName,
TargetTableName,
PhysicalSizeTB
) ;
Syntax Elements
TargetDatabaseName
Name of the database on which the target object resides.
TargetTableName
Name of the target object.
PhysicalSizeTB
Physical size of the target object in terabytes, excluding fallback.
Examples
The following example returns the estimated logical size in terabytes for the table test1.table1 if its physical
size is 2 terabytes without fallback:
ReconfigCheck
Returns an estimated number of bytes for each access module process (AMP) required for a
reconfiguration operation.
Syntax
ReconfigCheck ( DestAMPs ) ;
Syntax Elements
DestAMPs
The number of AMPs to which you would like to calculate the amount of bytes required per
AMP to complete the reconfiguration operation.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The ReconfigCheck macro is useful for obtaining an estimate of the space required prior to Teradata
Support performing a reconfiguration operation. Because of background system test, multiple executions
of ReconfigCheck might return different results.
Examples
The following statement generates a report which provides the estimated space required to reconfigure
a one-AMP system:
The following statement generates a report which provides the estimated space required per AMP to
reconfigure a four-AMP system:
DiskEvents
Returns all disk events logged in the DBC.SW_Event_Log table for a set period of time.
Syntax
DiskEvents ( Fromdate [, Todate] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The DiskEvents macro report is based on event codes 033-11036-00, 033-11038-00, and 033-11094-00.
For a complete description of these events, see the information about Parallel Database Extensions (PDE)
messages in Teradata Vantage™ - Database Messages, B035-1096.
You can also use a SELECT query to view events in the DBC.SW_Event_Log (see “Determining Contents
of the DBC.SW_Event_Log”).
Examples
The following statement generates a report of all Disk Events for the last seven days:
The following statement generates a report of Disk Events between September 30, 2012 and January
31, 2013:
The following statement generates a report of Disk Events between August 9, 2012 and February
20, 2013:
exec systemfe.diskevents('2012-08-09','2013-02-20');
*** Echo accepted.
*** Total elapsed time was 2 seconds.
*** Query completed. 691 rows found. 5 columns returned.
13/02/19 Disk Events Between 2012-01-01 and 2013-02-20
12:09
Date Time Message Text
-------- ---------------
--------------------------------------------------------------------------------
13/02/02 18:41:16.381378 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000D00000026 (38:13:1:0)
State = 0x03, Sector = 0x0080, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x000D, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:16.757614 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000900000026 (38:9:1:0)
State = 0x03, Sector = 0x0080, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x0009, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:16.860288 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000B00000024 (36:11:1:0)
State = 0x03, Sector = 0x0099, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x000B, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:16.892315 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000A00000025 (37:10:1:0)
State = 0x03, Sector = 0x0083, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x000A, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:16.981832 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000C00000024 (36:12:1:0)
State = 0x03, Sector = 0x008A, Length =
0x00000400
Attr = 0x00, Vproc ID = 0x000C, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:17.066148 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000800000025 (37:8:1:0)
State = 0x03, Sector = 0x0083, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x0008, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
18:41:17.422217 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000700000025 (37:7:1:0)
State = 0x03, Sector = 0x0095, Length =
0x00000200
13/02/19 Disk Events Between 2012-01-01 and 2013-02-20
12:09
Date Time Message Text
-------- ---------------
--------------------------------------------------------------------------------
13/02/02 18:41:17.422217 Attr = 0x00, Vproc ID = 0x0007, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
13/02/03 14:16:44.075227 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000A00000026 (38:10:1:0)
State = 0x03, Sector = 0x042A, Length =
0x00000200
Attr = 0x00, Vproc ID = 0x000A, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
14:16:44.155212 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000C00000026 (38:12:1:0)
State = 0x03, Sector = 0x0455, Length =
0x00000400
Attr = 0x00, Vproc ID = 0x000C, Error =
0x00000010
Class = 0x01, Flags = 0x0000, OS Error =
0xFFFFFFFB
14:16:44.203279 Event number 33-11094-00 (severity 10, category 9)
Received OS I/O
error.
Extent driver error TVSA_E_SYSTEM: OS Error -5
Cylinder ID = 0x0x0001000D00000027 (39:13:1:0)
State = 0x03, Sector = 0x0461, Length =
0x00000200
.
.
EventCount
Returns a count of each type of event in DBC.SW_Event_Log which occurred in the set period.
Syntax
EventCount ( Fromdate [, Todate ] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The EventCount macro takes into account event code 033-13895-00, or whose severity is greater than 20.
For a complete description of these events, see the information about Parallel Database Extensions (PDE)
messages in Teradata Vantage™ - Database Messages, B035-1096.
This macro does not report counts for events, which are informational in nature, but rather only those
events that will give you an idea of the health of Vantage.
From this macro, you can observe event code counts and plan maintenance accordingly.
Examples
The following statement provides counts of events between May 5, 2013, and the date of today:
The following statement provides counts of event codes between October 28, 2012 and February
12, 2013:
The following statement provides counts of events for the last sixty days:
------------ -----------
33-10198-00 5
*** Echo accepted.
The following figure shows how to interpret the Event Tags included in the report.
FallBack_All
Returns all tables in the system which have fallback protection.
Syntax
FallBack_All ;
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The FallBack_All macro reports the names of the database and tables, and the size of the table in bytes.
This macro is useful for obtaining all the tables on the system which have fallback copies.
For a discussion of fallback, see Teradata Vantage™ - Database Design, B035-1094.
Exec FallBack_All;
DBQLogTbl 10,240
DBQLRuleCountTbl 3,072
DBQLRuleTbl 4,096
DBQLSqlTbl 4,096
DBQLStepTbl 6,144
DBQLSummaryTbl 4,096
Dependency 4,096
ErrorMsgs 711,680
ErrorTbls 4,096
EventLog 66,560
Global 3,072
Hosts 4,096
IdCol 5,120
Indexes 61,440
InDoubtResLog 4,096
JARS 4,096
JAR_JAR_USAGE 4,096
LogonRuleTbl 6,144
MDSRecoveryTbl 2,048
Migration 3,072
Next 5,120
OldPasswords 4,096
Owners 3,072
ParentChildCorrelation 4,096
Parents 5,120
PasswordRestrictions 141,312
Profiles 4,096
RCConfiguration 4,096
RCEvent 10,240
RCMedia 2,048
ReconfigInfo 6,144
ReconfigOrder 4,096
ReconfigTableStats 6,144
ReferencedTbls 4,096
ReferencingTbls 4,096
RepBatchStatus 2,048
RepGroup 4,096
RepGroupTables 2,048
ResUsageIpma 2,165,760
ResUsageIvpr 148,591,616
ResUsageSawt 34,482,176
ResUsageScpu 1,602,560
ResUsageShst 8,052,736
ResUsageSldv 24,064,000
ResUsageSpdsk 15,404,032
ResUsageSpma 3,770,368
ResUsageSps 3,491,786,752
ResUsageSvdsk 7,472,128
ResUsageSvpr 311,285,760
RoleGrants 4,096
Roles 4,096
ROUTINE_JAR_USAGE 4,096
SessionTbl 8,192
SW_Event_Log 4,096
SysSecDefaults 5,120
SystemQTbl 2,048
TableConstraints 8,192
TDWMEventHistory 4,096
TDWMEventLog 4,096
TDWMExceptionLog 4,096
TDWMSummaryLog 4,096
TempStatistics 4,096
TempTables 4,096
TextTbl 509,952
Translation 72,704
TriggersTbl 4,096
TSETQueryText 4,096
TVFields 3,725,312
TVM 6,695,936
UDFInfo 20,480
UDTCast 4,096
UDTInfo 4,096
UDTTransform 4,096
UnResolvedReferences 4,096
SysAdmin FastLog 4,096
HelpSyntax 1,381,376
SYSLIB dem 4,096
demddl 4,096
dempart 4,096
installsp 35,840
loadpkg 226,304
savepkg 57,344
SystemFe CleanupQCFVer 7,168
CreateQCFVer 119,808
opt_cost_table 22,528
Opt_DBSCtl_Table 4,096
opt_ras_table 24,576
Temp_ReconfigSpace 2,048
FallBack_DB
Returns all tables in the specified database with fallback protection.
Syntax
FallBack_DB ('DBName') ;
Syntax Elements
DBName
The name of the database you want to be listed. The name should be in single apostrophes
as indicated.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The FallBack_DB macro reports the names of the database and tables, and the size of the table in bytes.
This macro is useful for obtaining all the tables in a particular database which have fallback copies.
For a discussion of fallback, see Teradata Vantage™ - Database Design, B035-1094.
LogonRuleTbl 6,144
MDSRecoveryTbl 2,048
Migration 3,072
Next 5,120
OldPasswords 4,096
Owners 3,072
ParentChildCorrelation 4,096
Parents 5,120
PasswordRestrictions 141,312
Profiles 4,096
RCConfiguration 4,096
RCEvent 10,240
RCMedia 2,048
ReconfigInfo 6,144
ReconfigOrder 4,096
ReconfigTableStats 6,144
ReferencedTbls 4,096
ReferencingTbls 4,096
RepBatchStatus 2,048
RepGroup 4,096
RepGroupTables 2,048
ResUsageIpma 2,165,760
ResUsageIvpr 148,591,616
ResUsageSawt 34,482,176
ResUsageScpu 1,602,560
ResUsageShst 8,052,736
ResUsageSldv 24,064,000
ResUsageSpdsk 15,404,032
ResUsageSpma 3,770,368
ResUsageSps 3,491,786,752
ResUsageSvdsk 7,472,128
ResUsageSvpr 311,285,760
RoleGrants 4,096
Roles 4,096
ROUTINE_JAR_USAGE 4,096
SessionTbl 8,192
SW_Event_Log 4,096
SysSecDefaults 5,120
SystemQTbl 2,048
TableConstraints 8,192
TDWMEventHistory 4,096
TDWMEventLog 4,096
TDWMExceptionLog 4,096
TDWMSummaryLog 4,096
TempStatistics 4,096
TempTables 4,096
TextTbl 509,952
Translation 72,704
TriggersTbl 4,096
TSETQueryText 4,096
TVFields 3,725,312
TVM 6,695,936
UDFInfo 20,480
UDTCast 4,096
UDTInfo 4,096
UDTTransform 4,096
UnResolvedReferences 4,096
*** Echo accepted.
ListErrorCodes
Returns an output of all event codes in the DBC.ErrorMsgs table.
Syntax
ListErrorCodes ;
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The ListErrorCodes macro can be used to quickly get a brief description of an error code.
The error codes are in ascending order with one line of associated text. It is recommended that this macro
be run after installing maintenance tapes to check the DBC.ErrorMsgs table.
Exec ListErrorCodes;
Due the amount of codes actually displayed, the following example shows only a portion of an actual report:
ListEvent
Returns a particular event code for the set period of time.
Syntax
ListEvent ( Event, Fromdate [, Todate ] ) ;
Syntax Elements
Event
The number of the event code for which you want to search. The format of event is an integer,
as shown in Event Code (Message) Format Interpretation.
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The ListEvent macro is useful for obtaining a look at all occurrences of the desired event.
Examples
The following statement generates a report of all 033-13895-00 events between May 5, 2013, and the date
of today:
The following statement generates a report of all 033-13895-00 events for the last seven days:
The following statement generates a report of all 033-12116-00 events between May 5, 2013 and May
18, 2013:
ListRestart_Logon_Events
Returns all software restart events and logon-enabled events logged in the DBC.SW_Event_Log table for
the set period of time.
Syntax
ListRestart_Logon_Events ( Fromdate [, Todate ] ) ;
Syntax Elements
Fromdate
The earliest date of a restart/logon that is to be listed in the report. The format is 'YYYY-MM-
DD'. This parameter can be coded either as a character string, for example, '2013-05-31', or
as a numeric value, for example, 1130531.
Todate
The latest date of a restart/logon that is to be listed in the report.
The format is 'YYYY-MM-DD'. This parameter can be coded either as a character string, for
example, '2013-05-31', or as a numeric value, for example, 1130531. The default value for
Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The ListRestart_Logon_Events report is based on event code 033-13895-00 for restart events, and
the time the "Logons are enabled" message is reported in the Software_Event_Log table for logon-
enabled events.
For a complete description of these events, see the information about Parallel Database Extensions (PDE)
messages in Teradata Vantage™ - Database Messages, B035-1096.
The output shows the date, time, and all lines of the DBC.SW_Event_Log connected with each software
restart event, and one line connected with the logon-enabled event. The logon-enabled event is the time
the "Logons are enabled" message is reported in the DBC.SW_Event_Log table. This macro depicts the
time Vantage recovered.
Note:
The column value “TheTime” in the DBC.SW_Event_log table is the time when the database came
back up after the restart. It is not the time the reset starts because while the database is down, the
system cannot access the SW_Event_log table to log the time.
Examples
The following statement generates a report of all restarts and logon-enabled events between May 5, 2013,
and the date of today:
The following statement generates a report of all restarts and logon-enabled events between January 1,
2013 and March 9, 2013:
Exec ListRestart_Logon_Events('2013-01-01','2013-03-09');
The following statement generates a report of all restarts and logon-enabled events for the last 11 days:
Exec ListRestart_Logon_Events(date-10,date);
ListSoftware_Event_Log
Returns all events (hardware and software) found in DBC.SW_Event_Log table for the set period of time.
Syntax
ListSoftware_Event_Log ( Fromdate [, Todate ] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is
'YYYY-MM-DD'. This parameter can be coded either as a character string, for example,
'2013-05-31', or as a numeric value, for example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD' This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The ListSoftware_Event_Log macro is useful for obtaining a quick look at the contents of
DBC.SW_Event_Log for a given time frame.
Note:
This report can get large very quickly.
Examples
The following statement would give a copy of the Software_Event_Log between January 1, 2013, and the
date of today:
The following statement would give a copy of the Software_Event_Log for the last seven days:
The following statement would give a copy of the Software_Event_Log for a specific date in the past,
specifically May 21, 2013:
34-08072-00
34-08072-00
gtwsecurity.c @376 (50332208): Thu May 21 00:55:16 2013
34-08072-00 tdgss
supported methods: ldap
34-08072-00
00:55:17.162739 34-02900-00
13/05/21 00:55:17 Users are logged on
00:55:17.162969 34-02900-00
13/05/21 00:55:17 Logons are enabled
*** Echo accepted.
MiniCylPacks
Returns all MiniCylPacks related events logged in the DBC.Software_Event_Log table for a set period
of time.
Syntax
MiniCylPacks ( Fromdate [, Todate ] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Fromdate
The date on which the search is to stop.
The format is 'YYYY-MM-DD'. This parameter can be coded either as a character string, for
example, '2013-05-31', or as a numeric value, for example, 1130531. The default value for
Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The MiniCylPacks report is based on event codes 034-05141-00, 034-05142-00, and 034-05143-00.
You can use the ListErrorCodes macro to get a brief description of these events. For a detailed description,
see the information about database messages in Teradata Vantage™ - Database Messages, B035-1096.
This macro is useful to determine whether MiniCylPacks were done successfully, and whether they were
performed in anticipation of their use or while there were other tasks waiting. This information is determined
based on the specific event code, as follows:
5142 Indicates a successful freeing of cylinders, but caused other tasks to wait.
5143 Indicates no success at freeing cylinders, and that the event caused other tasks to wait.
Note:
These event codes can also be viewed in the ListErrorCodes report (see ListErrorCodes).
Examples
The following statement generates a MiniCylPacks report for the last seven days:
The following statement gives a report of the MiniCylPacks between January 1, 2013 and March 10, 2013:
The following statement gives a report of the MiniCylPacks between January 21, 2013, and the date
of today:
NoFallBack_All
Returns all tables in the system which have no fallback protection.
Syntax
NoFallBack_All ;
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The NoFallBack_All macro reports the names of the database and tables, and the size of the table in bytes.
This macro is useful for obtaining a look at all the tables on the system which do not have fallback copies.
For a discussion of fallback, see Teradata Vantage™ - Database Design, B035-1094.
Exec NoFallBack_All;
Exec NoFallBack_All;
NoFallBack_DB
Returns all tables in the specified database with no fallback protection.
Syntax
NoFallBack_DB ('DBName') ;
Syntax Elements
DBName
The name of the database you want to be listed. The name should be in single apostrophes
as indicated.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The NoFallBack_DB macro reports the names of the database and tables, and the size of the table in bytes.
This macro is useful for obtaining a look at all the tables in a particular database which do not have
fallback copies.
For a discussion of fallback, see Teradata Vantage™ - Database Design, B035-1094.
RecoveryLockTable 2,0
RecoveryPJTable 2,0
SavedTransactionStatusTable 2,0
SysRcvStatJournal 25,0
TransientJournal 15,859,7
UtilityLockJournalTable 2,0
PackDisk
Returns all user-issued PackDisk-related events logged in the DBC.Software_Event_Log table for a set
period of time.
Syntax
PackDisk ( Fromdate [, Todate ] ) ;
Syntax Elements
Fromdate
The date on which the search is to start. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531.
Todate
The date on which the search is to stop. The format is 'YYYY-MM-DD'. This parameter can
be coded either as a character string, for example, '2013-05-31', or as a numeric value, for
example, 1130531. The default value for Todate is the current date.
Note:
This macro is not case sensitive. Uppercase and lowercase letters can be used interchangeably.
Usage Notes
The PackDisk macro report is based on event codes 034-05144-00 and 034-05145-00.
For a complete description of these events, see the information about database messages in Teradata
Vantage™ - Database Messages, B035-1096. You can also view the events in the ListErrorCodes report
(see “ListErrorCodes”).
This macro is useful to list all PackDisk requests (indicated by event code 05144), if any, and whether these
requests were completed successfully (indicated by event code 05145). You can initiate PackDisk requests
using the Ferret utility.
For more information on Ferret, see Teradata Vantage™ - Database Utilities, B035-1102.
Examples
The following statement would give a report of the PackDisks for the last seven days:
The following statement would give a report of the PackDisk between January 1, 2013 and March
10, 2013:
The following statement would give a report of the PackDisk between January 21, 2013, and the date
of today.
Note:
The date specified is the same as the date the macro was run.
21:30:34.740000 34-05145-00
------
***** Number of PackDisks On vproc 1 = 1
2 13/01/21 21:30:20.380000 34-05144-00
21:30:37.840000 34-05145-00
------
***** Number of PackDisks On vproc 2 = 1
3 13/01/21 21:30:20.360000 34-05144-00
21:30:53.320000 34-05145-00
------
***** Number of PackDisks On vproc 3 = 1
4 13/01/21 21:30:20.360000 34-05144-00
21:30:51.280000 34-05145-00
------
***** Number of PackDisks On vproc 4 = 1
5 13/01/21 21:30:20.350000 34-05144-00
21:30:39.520000 34-05145-00
------
***** Number of PackDisks On vproc 5 = 1
6 13/01/21 21:30:20.320000 34-05144-00
21:30:30.910000 34-05145-00
------
***** Number of PackDisks On vproc 6 = 1
7 13/01/21 21:30:20.320000 34-05144-00
------
***** Number of PackDisks On vproc 7 = 1
SystemFE Macros are designed to help you monitor Vantage. The macros can be organized into the
categories shown in the following table. Information in the rest of this section describes specific scenarios and
how the macros can help.
Summary FallBack_All
FallBack_DB
MiniCylPacks
NoFallBack_All
NoFallBack_DB
PackDisk
Reconfiguration ReconfigCheck
If you have access to a client user ID or access to the system console, you can write a BTEQ script in the
above syntax. Then, you can run the script on a weekly basis without changing the date parameter.
means that a request was aborted and a snapshot dump taken without creating a restart. You should report
a high frequency of occurrence of this event to the Teradata Support Center so that they can determine the
appropriateness of requesting the site to migrate to a later software release.
If further information about these events (such as processor number, and so forth) is needed, use the
ListSoftware_Event_Log or ListEvent macro to list all the occurrences of that particular event code in
full detail.
Resource Description
Database Messages An analysis of the message log file should always accompany any results found
when using the SystemFE macros. The log file shows all system messages or
activities leading up to and following those messages found in the DBC.SW_Event_
Log. For information on the location of the message log file, see “Usage Notes”.
Administration Attached to all multi-node database systems, the AWS has a Customer Support
Workstation (AWS) Facility (CSF) knowledge base which often provides information useful for
determining the best course of action to take when addressing system messages.
SHOWSPACE This command reports on the amount of used and available system space. For more
command information, see Ferret in Teradata Vantage™ - Database Utilities, B035-1102.
(Ferret utility)
ResUsage macros Executing these macros provides assistance in analyzing system performance.
For more information, see Teradata Vantage™ - Resource Usage Macros and
Tables, B035-1099.
Reconfiguring AMPs
To reconfigure the number of AMPs in your system, run the ReconfigCheck macro to get an estimated
number of bytes per AMP required for a reconfiguration operation. Reconfigurations are performed by
Teradata Services personnel.
String of one or more digits. Do not use commas in numbers with more than
number three digits.
Example: 10045
x is optional.
[ x ]
Note:
You can repeat only the immediately preceding item. For example, if the syntax is:
KEYWORD x [...]
[ x, [...] ] y
This section shows the BTEQ script listings used to create each macro for reference purposes. Refer to these
listings to understand the source of the data of the macro and how the macro processes the data.
To obtain the most up-to-date listing of the macros that reside in the SystemFE database, use the
following query:
AllRestarts
REPLACE MACRO SystemFE.AllRestarts
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 3,4;';
echo 'set omit on 1,2;';
echo 'set heading "&DATE||(Crashable Events)||&TIME//Between &1 and &2";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Text
From DBC.Software_Event_Log
Where TheDate between :fromdate and :todate
And (Event_Tag = 0331385500 OR
Event_Tag = 0331389200 )
BynetEvents
REPLACE MACRO SystemFE.BynetEvents
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 254;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set omit on 1,2;';
echo 'set suppress on 3,4;';
echo 'set heading "&DATE BYNET Events Between &1 and &2 &TIME|| ||";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Text (Title 'Message Text')
From DBC.software_event_log
where ((Event_tag>=0331110000 AND Event_tag<=0331112100)
OR (Event_tag >= 0331290000 AND Event_tag <= 0331297800)
OR (Event_tag >= 0331300000 AND Event_tag <= 0331302100)
OR (Text like '%bynet%'))
And TheDate BETWEEN :fromdate AND :Todate
Order by TheDate, TheTime, Line;
echo 'set defaults;';
);
DiskEvents
REPLACE MACRO SystemFE.DiskEvents
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 150;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set omit on 1,2;';
echo 'set suppress on 3,4,5;';
echo 'set heading "&DATE||Disk Events Between &1 and &2||&TIME";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Text (Title 'Message Text')
FROM DBC.Software_Event_Log
Where Event_Tag in (0331103600, 0331103800, 0331109400)
And TheDate BETWEEN :fromdate AND :Todate
Order by TheDate, TheTime;
echo 'set defaults;';
);
EventCount
REPLACE MACRO SystemFE.EventCount
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set omit on 1,2;';
echo 'set pagelength 60;';
echo 'set heading "&DATE||Total Of Each Event||&TIME//Between &1 and &2";
';
FallBack_All
REPLACE MACRO SystemFE.FallBack_All AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 1;';
echo 'set heading "&DATE||FallBack Tables In All Databases||&TIME";';
Select DBC.AllSpace.DataBaseName
(Title 'DataBase', Format 'X(15)')
, DBC.AllSpace.TableName (Title 'Table')
, Sum(CurrentPerm) (Title 'Bytes')
From DBC.AllSpace, DBC.Tables
Where DBC.Allspace.Databasename = DBC.Tables.Databasename
And DBC.Allspace.Tablename = DBC.Tables.Tablename
And DBC.Tables.ProtectionType = 'F'
And DBC.Tables.TableKind ^= 'J'
Order By 1,2
Group By 1,2;
echo 'set defaults;';
);
FallBack_DB
REPLACE MACRO SystemFE.FallBack_DB (DBName (Char(30))) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 82;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 1;';
echo 'set heading "&DATE||FallBack Tables In Database &1||&TIME";';
Select DBC.AllSpace.DataBaseName
(Title 'DataBase', Format 'X(30)')
, DBC.AllSpace.TableName (Title 'Table')
, Sum(CurrentPerm) (Title 'Bytes')
From DBC.AllSpace, DBC.Tables
Where DBC.AllSpace.Databasename = :DBName
And DBC.Allspace.Databasename = DBC.Tables.Databasename
And DBC.Allspace.Tablename = DBC.Tables.Tablename
And DBC.Tables.ProtectionType = 'F'
Order By 1,2
Group By 1,2;
echo 'set defaults;';
);
ListErrorCodes
REPLACE MACRO SystemFE.ListErrorCodes AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set heading "&DATE||Error Code Summary||&TIME";';
Select ErrorCode (Format '---,--9')
, ErrorText
From DBC.ErrorMsgs
Where ErrorCode > 0000
Order By ErrorCode;
ListEvent
REPLACE MACRO SystemFE.ListEvent
(Event(Integer),
Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 3,4;';
echo 'set omit on 1,2,5;';
echo 'set heading "&DATE||All &5 Events Between &1 and &2||&TIME";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Event_Tag
, Text
From DBC.Software_Event_Log
Where Event_Tag=:Event
And TheDate Between :fromdate and :Todate
Order By TheDate, TheTime, Line;
echo 'set defaults;';
);
ListRestart_Logon_Events
REPLACE MACRO SystemFE.ListRestart_Logon_Events
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
ListSoftware_Event_Log
REPLACE MACRO SystemFE.ListSoftware_Event_Log
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 254;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set omit on 1,2;';
echo 'set suppress on 3,4;';
echo 'set heading "&DATE Software Event Log Listing Between &1 and &2
&TIME|| ||";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Event_Tag
, Text
From DBC.Software_Event_Log
Where TheDate between :fromdate and :todate
MiniCylPacks
REPLACE MACRO SystemFE.MiniCylPacks
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 3,4;';
echo 'set omit on 1,2;';
echo 'set heading "&DATE||MiniCylPacks Performed Between &1 and &2||&TIME"
;';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, VProc
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Event_Tag (Title 'Event')
From DBC.Software_Event_Log
Where Event_Tag in (0340514100, 0340514200, 0340514300)
And Line=1
And DBC.Software_Event_Log.TheDate Between :Fromdate and :Todate
With Count(*) (Title '***** Number of MiniCylPack log messages On vproc &3
=', FORMAT 'zzzz9')
By 3
Order By 3,4,5;
echo 'set defaults;';
);
NoFallBack_All
REPLACE MACRO SystemFE.NoFallBack_All AS
(
echo 'set defaults;';
NoFallBack_DB
REPLACE MACRO SystemFE.NoFallBack_DB (DBName (Char(30))) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 1;';
echo 'set heading "&DATE||NoFallBack Tables In Database &1||&TIME";';
Select DBC.AllSpace.DataBaseName
(Title 'DataBase', Format 'X(30)')
, DBC.AllSpace.TableName (Title 'Table')
, Sum(CurrentPerm) (Title 'Bytes')
From DBC.AllSpace, DBC.Tables
Where DBC.AllSpace.Databasename = :DBName
And DBC.Allspace.Databasename = DBC.Tables.Databasename
And DBC.Allspace.Tablename = DBC.Tables.Tablename
And DBC.Tables.ProtectionType = 'N'
Order By 1,2
Group By 1,2;
echo 'set defaults;';
);
PackDisk
REPLACE MACRO SystemFE.PackDisk
(Fromdate (date, FORMAT 'YYYY-MM-DD'),
Todate (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 3,4;';
echo 'set omit on 1,2;';
echo 'set heading "&Date||PackDisks Performed Between &1 and &2||&TIME";';
Select :Fromdate (Format 'YYYY-MM-DD')
, :Todate (Format 'YYYY-MM-DD')
, VProc
, TheDate (Title 'Date')
, TheTime (Title 'Time')
, Event_Tag
From DBC.Software_Event_Log
Where Event_Tag in (0340514400, 0340514500)
And Line=1
And DBC.Software_Event_Log.TheDate Between :Fromdate and :Todate
With (Count(*) +1)/2 (Title '***** Number of PackDisks On vproc &3 ='
, FORMAT 'zzzz9')
By 3
Order By 3,4,5;
echo 'set defaults;';
);
ReconfigCheck
REPLACE MACRO SystemFE.ReconfigCheck (DestAMPs (SmallInt)) AS
(
Delete From SystemFE.Temp_ReconfigSpace all;
Insert Into SystemFE.Temp_ReconfigSpace
select Sum(Currentperm)
From DBC.TableSizeV;
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set omit on 1;';
echo 'set heading "&DATE||Bytes Required For &1 AMP
System||&TIME";'
;
select :DestAmps,
(Permspace/:DestAmps)
(Title 'Bytes//Required//Per AMP', Format 'zz,zzz,z99,999')
From SystemFE.Temp_ReconfigSpace;
echo 'set defaults;';
);
Teradata Links
Link Description