ttBackupStatus

This procedure returns a single row with information about the current or last backup of the database. If a backup is in progress, this information represents the current backup. If no backup is in progress, this information represents the last backup taken.

If no backup has been taken on the database since the last first-connect, the status field is 0 and the rest of the columns are NULL.

Required Privilege

This procedure requires the ADMIN 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 runs locally on the element from which it is called.

Related Views

This procedure has these related views:

SYS.GV$BACKUP_STATUS

SYS.V$BACKUP_STATUS

Syntax

ttBackupStatus ()

Parameters

ttBackupStatus has no parameters.

Result Set

ttBackupStatus returns the results:

Column Type Description

status

TT_INTEGER NOT NULL

An INTEGER code representing the current progress of a backup or the completion status of the last backup. Values are:

0 - No backup has been taken on the database since the last first-connect.

1 - A backup is currently in progress.

2 - The last backup completed successfully.

3 - The last backup failed. In this case the error column contains the error code for the failure.

destination

TT_INTEGER

The type of backup taken. The value is NULL when no backup has been taken on the database. Value is one of:

0 - Backup is/was being written to a file.

1 - Backup is/was being written to a stream.

2 - Backup is/was taken on behalf of replication duplicate.

backupType

TT_INTEGER

Backup type, either full or incremental. The value is NULL when no backup has been taken on the database. Value is one of:

0 - Incremental backup.

1 - Full backup.

startTime

TT_TIMESTAMP

Time when the backup was started. The value is NULL when no backup has been taken on the database.

endTime

TT_TIMESTAMP

Time when the backup completed. If NULL and startTime is non-NULL, a backup is currently in progress.

backupLFN

TT_INTEGER

The transaction log file number of the backup point. The value is NULL when no backup has been taken on the database.

backupLFO

TT_BIGINT

The transaction log file offset of the backup point. The value is NULL when no backup has been taken on the database.

error

TT_INTEGER

If a backup fails, this column indicates the reason for the failure. The value is one of the TimesTen error numbers. The value is NULL when no backup has been taken on the database.

processId

TT_INTEGER

The ID of the process or daemon performing the backup (if known).

Examples

CALL ttBackupStatus ();
< 2, 2, 1, 2021-09-13 13:10:32.587557, 
2005-08-12 13:10:33.193269, 1, 1531840, 0, 6968 >
1 row found.

Note:

The procedure does not return information about previous backups other than the current or last one. Also, the information returned is not persistent across database startup or shutdown.