company logo

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 details

  1. 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.

  2. to list
  3. 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()).

  4. to list
  5. 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()).

  6. to list
  7. 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()).

  8. to list