Journal file related API. More...
Public Member Functions | |
_.SYS.Journal.Record | GetRecordAfter (_.Library.Integer Address) |
Return the object reference to the record after the given journal location (<parameter>Address</parameter>) | |
_.SYS.Journal.Record | GetRecordAt (_.Library.Integer Address) |
Return the object reference to the record at the given journal location (<parameter>Address</parameter>) | |
_.SYS.Journal.Record | GetRecordBefore (_.Library.Integer Address) |
Return the object reference to the record prior to the given journal location (<parameter>Address</parameter>) | |
_.Library.Status | Open (_.Library.String FileName) |
To open a journal file for record retrieval. | |
_.Library.Integer | Use () |
To use an open journal file for record retrieval (necessary when you have multiple journal file instances. More... | |
Static Public Member Functions | |
_.Library.Status | Archive (_.Library.Integer NSecondsOld, _.Library.Integer NBackupsOld) |
Purpose: Archive old journal files based on criteria given in number of seconds or backups, taking care not to archive files required for transaction rollbacks or crash recovery. More... | |
_.Library.Status | ArchiveAll () |
Archive all journal files except those required for transaction rollbacks or crash recovery. More... | |
_.Library.Status | ArchiveOne (_.Library.String FilePath) |
Purpose: Archive the journal file with the given name. More... | |
_.Library.Status | CheckIntegrity (_.Library.String jrnlist, _.Library.Integer Detail, _.Library.String SrcDirs, _.Library.Integer quietly) |
Purpose: Check integrity of the journal file(s) More... | |
_.Library.Status | Compress (_.Library.String infile, _.Library.String outfile, _.Library.String enginename, _.Library.Integer chunksz) |
Compress a journal file More... | |
_.Library.Status | Decompress (_.Library.String infile, _.Library.String outfile) |
Decompress a journal file More... | |
_.Library.String | GetGUID (_.Library.String FileName) |
Get the GUID assigned to the given journal file. | |
_.Library.Integer | GetMaxSize (_.Library.String FileName) |
Purpose: Get max size of a journal file. | |
_.Library.Status | GetNext (_.Library.String FileName, _.Library.String NextFileName, _.Library.Boolean MirOnly, _.Library.String MirrorSetName) |
Purpose: Get journal file following the given journal file. More... | |
_.Library.Status | GetPrev (_.Library.String FileName, _.Library.String PrevFileName, _.Library.Boolean InSession, _.Library.Boolean MirOnly, _.Library.String MirrorSetName) |
Purpose: Get journal file prior to the given journal file. More... | |
_.Library.String | GetReason (_.Library.SysPath File) |
Return the reason for the creation of the given journal file (<parameter>File</parameter>) in string form. | |
_.Library.String | GetSystemGUID (_.Library.String FileName) |
Get the GUID assigned to this system in the mirror configuration file. More... | |
_.Library.Status | IsValidJournal (_.Library.String FileName) |
TRUE if the given <parameter>FileName</parameter> is a journal file. | |
_.Library.String | LastEncrypted (_.Library.String OldestFile, _.Library.Integer csn) |
Return the path of the last encrypted file no older than OldestFile if given. | |
_.Library.Status | Purge (_.Library.Integer NDaysOld, _.Library.Integer NBackupsOld) |
Purpose: Purge old journal files based on criteria given in number of days or backups, taking care not to purge files required for transaction rollbacks or crash recovery. More... | |
_.Library.Status | PurgeAll () |
Purge all journal files except those required for transaction rollbacks or crash recovery. More... | |
_.Library.Status | PurgeOne (_.Library.String FilePath, _.Library.String PurgeTimeH, _.Library.Integer LogOnly) |
Purpose: Purge the journal file with the given name. More... | |
_.Library.Status | RequiredForClusterRecovery (_.Library.String FileName, _.Library.Integer FileCount, _.Library.Boolean SkipSelf) |
Return the path of the oldest journal file on each node that is required. More... | |
_.Library.Status | RequiredForRecovery (_.Library.String FileName, _.Library.Integer FileCount) |
Return the name of the oldest journal file required for crash recovery, which. More... | |
_.Library.Status | RequiredForRollback (_.Library.String FileName, _.Library.Integer FileCount) |
Return the path of the oldest journal file containing open transactions. More... | |
_.Library.Status | Restore (_.Library.String FileName, _.Library.Integer Detail) |
Purpose: (virtually) restore the journal. | |
_.Library.Status | RestorePIDList (_.Library.String FileName) |
Purpose: Regenerate the jobid->PID translation table based on records stored. More... | |
_.Library.Status | Summary (_.Library.String FilePath, _.Library.String DataFields) |
FileCount: the file counter value assigned to the file. | |
_.Library.String | TranslateReason (_.Library.Integer reason) |
Translate the numeric reason for the creation of a new journal file to string form. | |
Public Attributes | |
ClusterStartTime | |
Cluster start time in TimeStamp format or "" if not a cluster journal file. More... | |
ClusterStartTime0 | |
Cluster start time in time(0) format (i.e., # of seconds since the Epoch) More... | |
End | |
The end of the last valid record in the journal file (applicable to open file only) More... | |
FirstRecord | |
Object reference to the first record in the journal file (applicable to open file only) More... | |
LastMarker | |
Object reference to the last marker record in the journal file (applicable to open file only) More... | |
LastRecord | |
Object reference to the last record in the journal file (applicable to open file only) More... | |
Name | |
Path of the journal file. More... | |
Static Public Attributes | |
DOMAIN = None | |
Default Localization Domain. | |
Journal file related API.
|
static |
Purpose: Archive old journal files based on criteria given in number of seconds or backups, taking care not to archive files required for transaction rollbacks or crash recovery.
Parameters:
If both parameters are specified, only one criterion has to be met to qualify a journal file for archiving (subject to the restriction about rollback and crash recovery).
Note: It is the completion time, rather than the creation time, of a file that must meet the time criterion if specified. Thus, a file may not be OK to archive even though its timestamp appears to meet the time criterion.
|
static |
Archive all journal files except those required for transaction rollbacks or crash recovery.
Warning: Post-backup journal files are not necessarily preserved.
|
static |
Purpose: Archive the journal file with the given name.
Warning: This method does NOT check for open transactions before deleting the journal file.
FilePath: the full path of the journal file to archive
ArchiveTimeH: Time of archiving in $H format
LogOnly: if 1, skip archiving and log the archived file only. Default = 0
|
static |
Purpose: Check integrity of the journal file(s)
jrnlist can be either a file path or, if passed by reference, a number-indexed array of file paths, e.g.:
jrnlist(1)=path1, jrnlist(2)=path2, etc.
The file paths in the array should be in chronicle order, that is, path1 and path2 are assumed to have been created consecutively in the example above. If it is determined that the files in the given array do not meet that criterion, a single value 0 is returned (for "Invalid Parameter") and the top node of the array is set to the number index of the offending path.
Detail: If 1, scan each given journal file forward to locate the last record and verify it is the last record to be expected.
If 2, verify values stored in each record are retrievable.
If SrcDirs is set to 1 and passed by reference, the database directories used in the specified journal file(s) will be stored in SrcDirs array upon return.
|
static |
Compress a journal file
The engine and chunksz parameters use the default system values if omitted.
If compression fails a partially created output file is deleted.
The output file must not exist to start with or an error is returned.
In order to compress an encrypted file the encryption key must be active and the output file will be encrypted.
Caution: Be careful with file names. If the intention is to create a compressed version of a journal file with the system's naming scheme by appending a 'z' to the name, specify a temporary output file and then rename/move the resulting file if the operation is succesful to the target name. It is best to avoid having incomplete files with a file name the system might look for. Also take care to ensure the output file has the proper filesystem level protection.
|
static |
Decompress a journal file
Caution: Be careful with file names and locations. If the intention is to create a uncompressed version of a journal file with the system's naming scheme by removing the 'z' from the name it is best to specify a temporary file name and then rename/move the resulting file if the operation is succesful to the desired target name. When opening a journal file the system first tries to open the uncompressed version. If it opens a file which is being generated it may think that the file is smaller than it actually is (the size will be determined when it is opened) and may return incorrect results. Also take care to ensure that the output file has the proper filesystem level protection.
|
static |
Purpose: Get journal file following the given journal file.
|
static |
Purpose: Get journal file prior to the given journal file.
InSession: whether to limit the search within a journal session (default=NO)
|
static |
Get the GUID assigned to this system in the mirror configuration file.
This is used to help people identify which system created the journal file.
Since this comes from the config file, it's possible that this can change over time but its not supposed to.
|
static |
Purpose: Purge old journal files based on criteria given in number of days or backups, taking care not to purge files required for transaction rollbacks or crash recovery.
Parameters:
If both parameters are specified, only one criterion has to be met to qualify a journal file for purging (subject to the restriction about rollback and crash recovery).
Note: It is the completion date, rather than the creation date, of a file that must meet the date criterion if specified. Thus, a file may not be OK to purge even though the date in its name appears to meet the date criterion.
|
static |
Purge all journal files except those required for transaction rollbacks or crash recovery.
Warning: Post-backup journal files are not necessarily preserved.
|
static |
Purpose: Purge the journal file with the given name.
Warning: This method does NOT check for open transactions before deleting the journal file.
FilePath: the full path of the journal file to purge
PurgeTimeH: Time of purging in $H format
LogOnly: if 1, skip purging and log the purged file only. Default = 0
|
static |
Return the path of the oldest journal file on each node that is required.
for cluster recovery, which includes rolling forward and back transactions.
FileName = # of nodes where journal recovery is required
FileName(csn) = the path of the oldest journal file on node <#csn>
If SkipSelf = 1, skip the node where the method is called (local node is covered by RequiredForRecovery()
|
static |
Return the name of the oldest journal file required for crash recovery, which.
includes rolling forward and backward transactions.
FileName="" if journaling is disabled, meaning that none is required, as transactions cannot be rolled forward or backward from a pre-disabling file
|
static |
Return the path of the oldest journal file containing open transactions.
FileName: the oldest file containing open transactions or current journal file
FileCount: the file counter value assigned to the file
|
static |
Purpose: Regenerate the jobid->PID translation table based on records stored.
in the specified journal file
_.Library.Integer Use | ( | ) |
To use an open journal file for record retrieval (necessary when you have multiple journal file instances.
open at the same time and need to switch from one file to another).
ClusterStartTime |
Cluster start time in TimeStamp format or "" if not a cluster journal file.
ClusterStartTime0 |
Cluster start time in time(0) format (i.e., # of seconds since the Epoch)
or 0 if not a cluster journal file
End |
The end of the last valid record in the journal file (applicable to open file only)
FirstRecord |
Object reference to the first record in the journal file (applicable to open file only)
LastMarker |
Object reference to the last marker record in the journal file (applicable to open file only)
LastRecord |
Object reference to the last record in the journal file (applicable to open file only)
Name |
Path of the journal file.