Skip Headers
Oracle® TimesTen In-Memory Database Reference
Release 11.2.1

Part Number E13069-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

ttCheck

Description

Performs internal consistency checking within a TimesTen data store. You can specify a specific structure to be checked and a desired level of checking.

Required privilege

This utility requires the ADMIN privilege.

If authentication information is not supplied in the connection string or DSN, this utility prompts for a user ID and password before continuing.

Syntax

ttCheck {-h | -help | -?}
ttCheck {-V | -version}
ttCheck [ [-blkDir] [-compHeap] [-header] [-heap] [-indexHeap] [-log]
[-permBlkDir] [-permHeap] [-tempBlkDir] [-tmpHeap]
[-tables tblName [...]] [-users userName [...]]
[-level levelNum] ] [...]
[-m maxErrors] [-f outFile] [-v verbosity]
{DSN | [-connstr] connection_string | dspath}

Options

ttCheck has the options:

Option Description
-blkDir Checks all the block directories.
-compHeap Checks the compilation heap structure.
-connStr connection_string An ODBC connection string containing the name of the data store, the server name and DSN (if necessary) and any relevant connection attributes.
DSN Specifies an ODBC data source name of the data store to be checked.
dspath The fully qualified name of the data store to be checked. This is not the DSN associated with the connection. It is the fully qualified data store path name associated with the data store as specified in the DataStore= parameter of the data store's ODBC definition.

For example, for a data store consisting of files/home/payroll/1997.ds0, /home/payroll/1997.ds1, and several transaction log files /home/payroll/1997.logn,dspath is/home/payroll/1997.

-f outFile Specifies the output file name; defaults to stdout.
-h

-help

-?

Prints a usage message and exits.
-header Checks the content of the data store header.
-heap Checks all heap structures.
-indexHeap Checks the index heap structure.
-level levelNum Can be used to indicate the level of checking for header, block directory, heap and table. Different structures can be checked using different levels in a same command. A level specification is applied to all structures specified to its left in the command string that do not already have a level specification. A level specification is applied to all structures if no structure is specified in the command string.

1-Checks sanity bytes and simple fields. For example, counts enums for validity in all high-level structures.

2-Does all checks in level 1, plus checks the validity of structures, referenced by fields in other structures.

3-Does all checks in level 2, plus checks each table row for column values. For example, checks valid VARCHAR2 and FLOAT sizes.

4-(the default) Does all checks in level 3, plus checks index/table mapping for each row and each index.

-log Checks the log buffer.
-m maxErrors Maximum number of errors to report. Default is 10; a few extra related errors may be reported. If 0, the utility only connects, then returns.
-permBlkDir Checks the permanent partition block directory.
-permHeap Checks the permanent heap structure.
-tables tblName [...] Checks table(s) specified by tblName.
-tempBlkDir Checks the temporary partition block directory.
-tmpHeap Checks the temporary heap structure.
-users userName [...] Checks tables belonging to the user(s) specified by userName.
-V | -version Prints the release number of ttCheck and exits.
-v verbosity 0-no output (program's exit status indicates if an error was found).

1-(the default) enable error output only.

2-error output and a progress report.


Examples

To perform a check of all structures in the test_db data store, use:

ttCheck test_db

To perform a sanity check of all structures in the test_db data store, use:

ttCheck -level 1 test_db

To perform a check of all tables in the test_db data store, use:

ttCheck -tables test_db

To check the physical structures and row contents of all tables in the test_db data store, use:

ttCheck -tables -level 3 test_db

To perform a sanity check of all heap structures, row contents and indexes of all tables in the test_db data store, use:

ttCheck -heap -level 1 -tables -level 4 test_db

To check the physical structures and row contents of tables tab1 and tab2 in the test_db data store, use:

ttCheck -tables tab1 tab2 -level 3 test_db

Notes

While primarily intended for use by TimesTen customer support to diagnose problems with internal data structures of a TimesTen data store, the information returned by ttCheck may be useful to system administrators and developers.

The ttCheck utility should be run when there are no active transactions on the system. If run on a shared data store and other transactions are active, ttCheck may return errors when the data store is in fact intact.

The ttCheck utility checks views in the same manner as other tables in a data store. The utility cannot verify that the contents of a view matches view query's result.

If no structures are specified, ttCheck checks all structures. No errors are returned if a specified table's name or user is not found.

This utility may take some time to run. Verbosity level 2 allows you to print a progress report.

This utility is supported only where the TimesTen Data Manager is installed.