Open topic with navigation

TIBCO® Patterns 6.1.2

# Renaming a Database (lkt_dbmove)

    This command renames a table.
    dvkerr_t lkt_dbmove( lpar_t host, lpar_t srcname, lpar_t dstname );
    dvkerr_t lkt_dbmoveT( lpar_t host, lpar_t srcname, lpar_t tran, lpar_t dstname );

The database's new name is dstdesc. If there already exists a database with name dstdesc, that database is deleted.

Note: If you are familiar with UNIX systems, the semantics of lkt_dbmove are exactly parallel to those of the shell command mv.

Note that this includes deleting any checkpoint or durable data of the table with name dstdesc (see Checkpointing and Restoring a Database for a description of checkpointing databases).

Any checkpoint (see Checkpointing and Restoring a Database) of the table is also renamed by this command. Thus after the lkt_dbmove command is executed an `lkt_restore` of dstdesc restore the table that was checkpointed under the name srcdesc. An `lkt_restore` of srcdesc return a not found error.

The `lkt_dbmove` command is especially useful for doing updates of entire databases without appreciable down-time. Simply load the new version of the database dstdesc under the name srcdesc, and then do a `lkt_dbmove`.

## Input

## host (optional)

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

## srcname (required)

is the current name (LPAR_STR_DBDESCRIPTOR) of the database. There must be an existing loaded database with this name.

## dstname (required)

is the new name (LPAR_STR_DBDESCRIPTOR). It must differ from srcdesc.

## tran (optional)

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

Error codes and items returned by lkt_dbmove

DBMOVESAME | names supplied as both source and destination
DBNOTFOUND | name of nonexistent source database
EXPECTDBDESC | item that should have been a database name
INTERNAL | (none) or item being processed when error occurred
JOINSET | (none) Destination overwrites parent table with children
NODBDESC | (none)
NOMEM | (none)
NOSYSINIT | (none)
PARAMVAL | invalid name
TRAN_UNKNOWN | lpar that contains the unknown transaction id
TRAN_IN_USE | lpar that contains the transaction id
TRANCONFLICT | list that contains LPAR_LONG_INT_TRAN_ID and LPAR_STR_ERRORDETAILS

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.