Previous Topic

Next Topic

rollforwarddb Command—Recover a Database

Permission required: DBA or a system administrator running rollforwarddb with the –u flag. On VMS, if using this command against a database in a group level installation, you must have the VMS CMKRNL privilege.

The rollforwarddb command recovers a database or table from the last checkpoint and the current journal and dump files. When executing table level recovery, you can optionally move the table to a new location.

If the target checkpoint was performed online (while the database was in use), then rollforwarddb does the following:

  1. Restores the database from the checkpoint location to the database location
  2. Applies the log records in the dump location to the database, which returns the database to its state when the checkpoint began
  3. Applies the journal records to the database

If the target checkpoint was executed offline, then the second step is omitted.

By default, rollfrowarddb sequentially restores data locations one at a time. A database with more than one data location can be restored in parallel.

For detailed procedures on performing backup and recovery of the database, see the Database Administrator Guide.

The rollforwarddb command has the following format:

rollforwarddb dbname[/server_class] [+c|-c] [+j|-j] [#m[n]]
[-mdevice{, device}] [-bdd-mmm-yyyy:hh:mm:ss[.cc]] [-edd-mmm-yyyy:hh:mm:ss[.cc]]
[-norollback] [#c[n]] [+w|-w] [-v] [#f] [-uusername] [-help] [-statistics]
[-table=tablename{, tablename} [-nosecondary_index] [-on_error_continue]
[-relocate –location=locationname {, locationname}
-new_location=locationname{, locationname}]]
[-dmf_cache_size= x] [-dmf_cache_size_4k|8k|16k|32k|64k= x]

Previous Topic

Next Topic

rollforwarddb Examples

  1. The following command recovers the empdata database from the target checkpoint and journal, and provides diagnostic information about all operations executed during the recovery process.

    Note: Both the journal and the checkpoint must be online before executing the command.

    rollforwarddb empdata –v

  2. This command recovers tables emp and emphist from the empdata database:

    rollforwarddb empdata –table=emp,emphist

  3. This command recovers tables emp and emphist from the empdata database without recovering the indexes:

    rollforwarddb empdata –table=emp,emphist -nosecondary_index

    Note: The indexes on tables emp and emphist will have to be rebuilt or dropped before the tables can be accessed.

  4. This command recovers table emp in the empdata database and relocates it from location emploc to the new location newemploc:

    rollforwarddb empdata –table=emp,emphist -relocate –location=emploc –new_location=newemploc

    UNIX:

    rollforwarddb empdata +c +j –m/dev/rmt0

    VMS:

    rollforwarddb empdata +c +j –mMTA0:


© 2007 Ingres Corporation. All rights reserved.