Database :: initializeRecovery - Initialize recovery file
In order to activate a new recovery file, it has to be initialized by calling this function. The function assigns a recovery file number (iRecoveryNumber) and a location (sRecoveryPath) to the recovery. When an empty recovery path is passed, the recovery file will be written to the current work directory.
Implementation overview
- Initialize next recovery file
Database :: initializeRecovery (  ) - New recovery number
Database :: initializeRecovery ( iRecoveryNumber ) - Change recovery path
Database :: initializeRecovery ( sRecoveryPath ) - Set recovery path and number
Database :: initializeRecovery ( sRecoveryPath, iRecoveryNumber )
Implementation details
-
Initialize next recovery file
Database  :: initializeRecovery (  )
The function increases the recovery number by 1. The recovery path remains unchanged.
The default recovery initialization might be called, after the recovery path has been set. When no recovery path is set, the recovery file is written to the current directory.
to list
-
New recovery number
Database  :: initializeRecovery ( int32 iRecoveryNumber )
The function initializes a new recovery file with the number passed in iRecoveryNumber. Numbers for recovery files need not to be strictly ascending, but have to be unique.
In order to activate TransactionRecovery, 0 has to be passed in iRecoveryNumber. Passing a value greater 0 will set the recovery type to FullRecovery. When using full recovery, make sure, that a recovery path has been set before.
- iRecoveryNumber
- Number of recovery file
Recovery files have got an internal number that has been generated when creating the recovery file (initializeRecovery()).
to list
- iRecoveryNumber
- Number of recovery file
-
Change recovery path
Database  :: initializeRecovery ( odaba::String &sRecoveryPath )
In order to change the location for the recovery path, a new recovery path (folder for recovery files) has to be passed to the function in sRecoveryPath.
In order to initialize the first recovery file, this function should be called. The function always activates FullRecovery.
- sRecoveryPath
- Location for recovery folder path
The recovery folder path points to a folder that contains the recovery files. The folder has been defined when creating the recovery file. (Database::initializeRecovery()).
to list
- sRecoveryPath
- Location for recovery folder path
-
Set recovery path and number
Database  :: initializeRecovery ( odaba::String &sRecoveryPath, int32 iRecoveryNumber )
The function allows changing recovery path and recovery number. The function is called in order to initialize a new recovery file at a new location and also changing the consecutive recovery number.
- sRecoveryPath
- Location for recovery folder path
The recovery folder path points to a folder that contains the recovery files. The folder has been defined when creating the recovery file. (Database::initializeRecovery()).
- iRecoveryNumber
- Number of recovery file
Recovery files have got an internal number that has been generated when creating the recovery file (initializeRecovery()).
to list
- sRecoveryPath
- Location for recovery folder path