Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 163 164 165 166 167 168 < 169 > 170 171 172 173 174 175 .. 218 >> Next


Example of OBJECT Data for One Query

This example illustrates the rows in DBQLObjectTbl resulting from a query logged with the WITH OBJECT option:

ObjDBName ObjTblName ObjColName ObjID ObjNum ObjType FreqofUse

D_ PERSONNEL ? ? 00001604 0 D 1
D_ PERSONNEL DEPARTMENT ? 00009005 0 T 1
D_ PERSONNEL DEPARTMENT DeptNo 00009005 1, 025 C 2
D_ PERSONNEL DEPARTMENT DeptName 00009005 1, 026 C 1
D_ PERSONNEL DEPARTMENT EmpCount 00009005 1, . 027 C 1
D_ PERSONNEL DEPARTMENT Loc 00009005 1, . 028 C 1

Example of STEP Data for One Query

This example illustrates the rows in DBQLStepTbl resulting from a query logged with the WITH STEPINFO option:

StepLevl StepLev2 StepName StepStartDate StepStopDate RowCount

1 0 MLK 2002-07-08 20: 37: 22 2002-07-08 20: 37: 23 1
2 0 MLK 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 0
3 0 MLK 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 1
4 1 SAT 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 0
4 2 SAT 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 0
4 3 INS 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 1
4 4 INS 2002-07-08 20: 37: 23 2002-07-08 20: 37: 23 1
4 5 INS 2002-07-08 20: 37: 23 2002-07-08 20: 37: 24 1
4 6 INS 2002-07-08 20: 37: 23 2002-07-08 20: 37: 24 1
4 7 CTRts 2002-07-0 ! 20 :37 :24 2002-07-08 20 37: 25 1
5 0 Ctb 2002-07-08 20: 37: 25 2002-07-08 20: 37: 25 1
6 0 Edt 2002-07-08 20: 37: 25 2002-07-08 20: 37: 25 1

Teradata RDBMS Database Administration 14 - 15 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Reviewing or Ending Current Rules

Reviewing or Ending Current Rules

The DBQLRules view provides a view into the contents of DBQLRuleTbl.

Note: Only a user with SystemFE or DBC privileges (which should include your DBAdmin user) can access the DBQLRules view.

A SELECT on the DBQLRules view displays the rules currently in effect. You can qualify the response by user name, or account string (if it exists), or both.

SELECT * FROM DBC.DBQLRULES WHERE ACCTSTRING='$L&D&HTest';

The fields this view can return include:

DBQLRules View Description
User name The name of a user for whom you defined logging rules.
Account (if defined) An account for which you defined logging rules, or which you defined as the qualifier for logging sessions of this user.
Logging options (if defined) Any logging options you defined for this user and/or account, such as OBJECTS, STEPINFO, SQL, SQLTEXT, SUMMARY, or THRESHOLD.
Time parameters (if defined) Any time intervals or limits you defined for the SUMMARY and THRESHOLD options.

Dynamically Enable/Disable Logging

When you enable or disable query logging, the change has an immediate effect on active sessions where the user or account being logged appears within the first 100 names you specify in the user and/or account list of a single BEGIN/END QUERY LOGGING statement.

For users listed beyond the first 100, the user must log off from Teradata RDBMS and restart the session.

Note: If you need to enable or disable large volumes of users or accounts, the best practice is to submit an additional BEGIN/END QUERY LOGGING statement for each block of 100 names.

DBQL behavior as a result of a change to an active session is as follows:

Teradata RDBMS Database Administration

14 - 15 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Reviewing or Ending Current Rules

IF ... AND . THEN .
you enable logging (submit a BEGIN QUERY LOGGING statement) for an active session a query for that session is already in process Data for the current query is not collected Logging begins with receipt of the next query
you abort a session that is being logged a query for that session is in process and data is already cached If a default row is being logged (logging was not just SUMMARY), the AbortFlag is set to T.
you disable logging (submit an END QUERY LOGGING statement) for an active session a query for that session is in process and data is already cached The data is committed immediately One or more DBQL rows are written (but may be incomplete) The cache is flushed Subsequent queries during that session are not logged

14 - 20

Teradata RDBMS Database Administration 14 - 15 Chapter 14: Tracking Processing Behavior with the Database Query Log (DBQL)

Logging Implementation and Validation

Logging Implementation and Validation

Implementing Query Logging

The EXECUTE privilege on the special macro DBQLAccessMacro is needed by a user submitting the BEGIN QUERY LOGGING statement.

The system users DBC and SystemFE have this privilege and can grant it to others when needed. If you want other users, such as DBAdmin, to be able to execute DBQLAccessMacro, follow this procedure:

Step Action
1 Log on as user DBC (or SystemFE).
2 List the contents of database DBC to see if the DBQLAccessMacro, DBQLRuleTbl, and DBQLRuleCountTbl have been created: HELP DATABASE DBC ; The DBQL components listed in "The DBQL Components" on page 14-5 should be reported.
Previous << 1 .. 163 164 165 166 167 168 < 169 > 170 171 172 173 174 175 .. 218 >> Next