ttCkptHistory

This procedure returns information about the last eight checkpoints of any type. Also see Displaying Checkpoint History and Status in Oracle TimesTen In-Memory Database Operations Guide.

Required Privilege

This procedure requires no privilege.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic.

TimesTen Scaleout applications can call this built-in procedure.

In TimesTen Scaleout this procedure returns a row for the element from which it was called.

Related Views

This procedure has these related views.

SYS.GV$CKPT_HISTORY

SYS.V$CKPT_HISTORY

Syntax

ttCkptHistory()

Parameters

ttCkptHistory has no parameters.

Result Set

ttCkptHistory returns the result set:

Column Type Description

startTime

TT_TIMESTAMP NOT NULL

Time when the checkpoint was begun.

endTime

TT_TIMESTAMP

Time when the checkpoint completed.

type

TT_CHAR (16) NOT NULL

The type of checkpoint taken. Value is one of:

Static - Automatically taken at database creation and at last disconnect.

Blocking - Transaction-consistent checkpoint.

Fuzzy - nonblocking checkpoint. The background checkpointer performs this type if possible.

None - For temporary databases, which have no checkpoint files.

status

TT_CHAR (16) NOT NULL

Result status of the checkpoint operation. Value is one of:

In Progress - The checkpoint is currently in progress. Only the most recent result row can have this status.

Completed - The checkpoint completed successfully.

Failed - The checkpoint failed. Only the most recent result row can have this status. In this case the error column indicates the reason for the failure.

initiator

TT_CHAR (16) NOT NULL

The source of the checkpoint request. Value is one of:

User - A user-level application. This includes TimesTen utilities such as ttIsql.

Checkpointer - The background checkpointer.

Subdaemon - The managing subdaemon of the database. For a shared database, the final disconnect checkpoint is taken by the subdaemon.

reason

TT_CHAR (16) NOT NULL

The reason for this checkpoint. For example: after database creation, after recovery, final checkpoint after shutdown, after the user runs a built-in procedure, or after a flush operation.

error

TT_INTEGER

If a checkpoint fails, this column indicates the reason for the failure. The value is one of the TimesTen error numbers.

ckptFileNum

TT_INTEGER NOT NULL

The database file number used by the checkpoint. This corresponds to the number in the checkpoint file extension datastore.ds0 or datastore.ds1.

ckptLFN

TT_INTEGER

The transaction log file number of the checkpoint log record.

ckptLFO

TT_BIGINT

The transaction log file offset of the checkpoint log record.

blksTotal

TT_BIGINT

The number of permanent blocks currently allocated in the database. These blocks are subject to consideration for checkpointing.

bytesTotal

TT_BIGINT

The number of bytes occupied by blksTotal.

blksInUse

TT_BIGINT

Of blksTotal, the number of blocks currently in use.

bytesInUse

TT_BIGINT

The number of bytes occupied by blksInUse.

blksDirty

TT_BIGINT

The number of dirty blocks written by this checkpoint.

bytesDirty

TT_BIGINT

The number of bytes occupied by blksDirty.

bytesWritten

TT_BIGINT

The total number of bytes written by this checkpoint.

Percent_Complete

TT_INTEGER

If there is an in-progress checkpoint, indicates the percentage of the checkpoint that has been completed. If no checkpoint is in-progress, the value is NULL. The returned value is calculated by comparing the block ID of the last-written block against the database's PermSize. The value does not necessarily indicate the precise time remaining to complete the checkpoint, although it does give some indication of the remaining time needed to complete the disk write. The field shows only the progress of the writing of dirty blocks and does not include additional bookkeeping at the end of the checkpoint. The value is non-NULL if you call this procedure while a checkpoint is in progress.

ckptVNo

TT_INTEGER NOT NULL

The checkpoint sequence number that is incremented for each checkpoint.

logsPurged

TT_BIGINT

The number of log files purged by this checkpoint.

bookmarkName

TT_VARCHAR (30) INLINE

The name of the log hold up to which this checkpoint purged log records. For example: Backup, Checkpoint, or Oldest Transaction Undo.

additional_details

TT_VARCHAR (1000)

Additional information provided for this checkpoint, such as error codes and timestamps for multiple failed checkpoints.

Examples

This example shows a checkpoint in progress:

< 2019-02-05 16:56:34.169520, <NULL>, 
Fuzzy           , In Progress     , User            , 
BuiltIn         , <NULL>, 
0, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, 
<NULL>, <NULL>, <NULL>, 13, 6, 0, <NULL>, <NULL> >
 
< 2019-02-05 16:55:47.703199, 2019-02-05 16:55:48.188764, 
Fuzzy           , Completed       , Checkpointer    , 
Background      , <NULL>, 
1, 0, 8964304, 294, 33554432, 291, 5677288, 27, 1019512, 
1065408, <NULL>, 5, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:47.106110, 2019-02-05 16:54:47.723379, 
Static          , Completed       , Subdaemon       , 
FinalCkpt       , <NULL>, 
0, 0, 8960328, 294, 33554432, 291, 5677288, 256, 33157172, 
5321548, <NULL>, 4, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:41.633792, 2019-02-05 16:54:42.568469, 
Blocking        , Completed       , User            , 
BuiltIn         , <NULL>, 
1, 0, 8958160, 294, 33554432, 291, 5677288, 31, 1162112, 
6604976, <NULL>, 3, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:37.438827, 2019-02-05 16:54:37.977301, 
Static          , Completed       , User            ,
DbCreate        , <NULL>, 
0, 0, 1611984, 93, 33554432, 92, 1853848, 93, 33554432, 
1854052, <NULL>, 2, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:36.861728, 2019-02-05 16:54:37.438376, 
Static          , Completed       , User            , 
DbCreate        , <NULL>, 
1, 0, 1609936, 93, 33554432, 92, 1853848, 93, 33554432, 
1854052, <NULL>, 1, 0, Checkpoint, <NULL> >

This example shows that an error occurred during the most recent checkpoint attempt, which was a user-initiated checkpoint:

< 2019-02-05 16:57:14.476860, 2019-02-05 16:57:14.477957, 
Fuzzy           , Failed , User            , 
BuiltIn         , 847, 
1, <NULL>, <NULL>, 0, 0, 0, 0, 0, 0, 0, <NULL>, 7, 0, <NULL>, 
Errors   1: TT0847: 16:57:14 (2019-02-05) >
 
< 2019-02-05 16:56:34.169520, 2019-02-05 16:56:59.715451, 
Fuzzy           , Completed       , User            , 
BuiltIn         , <NULL>, 
0, 0, 8966472, 294, 33554432, 291, 5677288, 5, 522000, 
532928, <NULL>, 6, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:55:47.703199, 2019-02-05 16:55:48.188764, 
Fuzzy           , Completed       , Checkpointer    , 
Background      , <NULL>, 
1, 0, 8964304, 294, 33554432, 291, 5677288, 27, 1019512, 
1065408, <NULL>, 5, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:47.106110, 2019-02-05 16:54:47.723379, 
Static          , Completed       , Subdaemon       , 
FinalCkpt       , <NULL>, 
0, 0, 8960328, 294, 33554432, 291, 5677288, 256, 33157172, 
5321548, <NULL>, 4, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:41.633792, 2019-02-05 16:54:42.568469, 
Blocking        , Completed       , User            , 
BuiltIn         , <NULL>, 
1, 0, 8958160, 294, 33554432, 291, 5677288, 31, 1162112, 
6604976, <NULL>, 3, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:37.438827, 2019-02-05 16:54:37.977301, 
Static          , Completed       , User            ,
DbCreate        , <NULL>, 
0, 0, 1611984, 93, 33554432, 92, 1853848, 93, 33554432, 
1854052, <NULL>, 2, 0, Checkpoint, <NULL> >
 
< 2019-02-05 16:54:36.861728, 2019-02-05 16:54:37.438376, 
Static          , Completed       , User            , 
DbCreate        , <NULL>, 
1, 0, 1609936, 93, 33554432, 92, 1853848, 93, 33554432, 
1854052, <NULL>, 1, 0, Checkpoint, <NULL> >

This example selects specific columns from the checkpoint history:

select type, reason, bookmarkname, logsPurged from ttCkptHistory;
< Fuzzy           , BuiltIn         , Oldest Transaction Undo, 0 >
< Static          , FinalCkpt       , Checkpoint, 6 >
< Blocking        , BuiltIn         , Checkpoint, 0 >
< Blocking        , BuiltIn         , Checkpoint, 0 >
< Blocking        , BuiltIn         , Checkpoint, 0 >
< Blocking        , BuiltIn         , Backup, 5 >
< Blocking        , BuiltIn         , Backup, 0 >
< Blocking        , BuiltIn         , Backup, 0 >

The bottom (oldest) checkpoints could not purge log files because there was a log hold set by incremental backup, but eventually the log hold moved and five log files could be purged.

Notes

  • Results are ordered by start time, with the most recent first.

  • A failed row is overwritten by the next checkpoint attempt.