Restore (lkt_restore)

Use the following functions to restore all, or a selected set of, in-memory objects:

dvkerr_t lkt_restore(lpar_t host, lpar_t names, lpar_t *dblist);
dvkerr_t lkt_restoreT(lpar_t host, lpar_t names, lpar_t tran, lpar_t *dblist);

If a restore of multiple objects is requested all objects that can be restored are restored, even if the restore of one or more other objects fail. The exception is if there is a failure because an incomplete join set was specified. In this case the entire request fails. If some objects were restored successfully and others were not, DVK_ERR_PARTIALRESTORE is returned and the error item is a list of objects that failed to be restored.

When restoring a database table the entire joined set of tables must be specified. Unlike the lkt_checkpoint command, the restore command does not automatically fill out the join set. A join set is a parent table and all child tables of that parent table.

Note that the restore command locks the checkpoint files of all objects to be restored. This might block other commands, such as lkt_delete_thesaurus, lkt_dbmove, lkt_checkpoint, any command that creates, deletes or renames one of the objects to be restored. As a restore can take a significant amount of time, this can seriously impact performance. If the durable-data feature is enabled, lkt_restore has no effect and returns successfully.

Input

host (optional)

This is used to identify the server. For more information, see Communicating with TIBCO Patterns Servers

names (required)

The name parameter for restore is the same as that for the checkpoint command, see names (required). name (required).

tran (optional)

identifies the user transaction (LPAR_LONG_TRAN_ID) under which the restore operation is to be performed.

Output

dblist (optional)

If non-null a list of the objects successfully restored is returned. The list is a generic list (LPAR_LST_GENERIC) of object names. The entries can be a mix of LPAR_STR_DBDESCRIPTOR, LPAR_STR_CHARMAP, LPAR_STR_THESAURUSNAME and LPAR_STR_RLMODELNAME. The entries are not returned in any particular order.

Error codes and items returned by lkt_restore

DBNOTFOUND

list of objects not found (i.e. not previously checkpointed)

DBPARAM

invalid lpar from object list

DUPDBDESCS

duplicate object name

EXPECTDBDESC

 

FEATURESET

Checkpoint/restore is not enabled on the server.

JOINSET

The table name list with incomplete joined set of tables

LPAR_NULL

if checkpointing not enabled

INTERNAL

description of error, or LPAR_NULL

NODBDESC

LPAR_STR_DBDESCRIPTR with empty value, or LPAR_LST_GENERIC with no entries

NOSYSINIT

(none)

PARMTYPE

The object name that is invalid

PARAMVAL

The invalid object name

PARTIALRESTORE

list of databases that failed to restore

RESTOREFAIL

list of databases that failed to restore 2.6 Server control

TRAN_UNKNOWN

lpar that contains the unknown transaction id

TRAN_IN_USE

lpar that contains the transaction id

TRANCONFLICT

list that contains LPAR_LONGINT_TRAN_ID and LPAR_STR_ERRORDETAILS