Move a table using server save and restore commands

You can move a table from another iSeries™ server using the Save Object (SAVOBJ) and Restore Object (RSTOBJ) commands. The save commands save database files on tape or in a save file. The save file can be distributed to another server through communications.

The save and restore commands used to save and restore tables or files include:

For example, if two dealerships were merging, the save and restore commands could be used to save collections and tables for one relational database, which are then restored on the remaining server's relational database. To accomplish this an administrator would:

  1. Use the Save Library (SAVLIB) command on server A to save a collection or use the Save Object (SAVOBJ) command on server A to save a table.
  2. Specify whether the data is saved to a save file, which can be distributed using SNADS, or saved on tape.
  3. Distribute the save file to server B or send the tape to server B.
  4. Use the Restore Library (RSTLIB) command on server B to restore a collection or use the Restore Object (RSTOBJ) command on server B to restore a table.

A consideration when using the save and restore commands is the ownership and authorizations to the restored object. A valid user profile for the current object owner should exist on the server where the object is restored. If the current owner's profile does not exist on this server, the object is restored under the QDFTOWN default user profile. User authorizations to the object are limited by the default user profile parameters. A user with QSECOFR authority must either create the original owner's profile on this server and make changes to the restored object ownership, or specify new authorizations to this object for both local and remote users.

Related concepts
Backup and recovery
Related reference
Restore Library (RSTLIB) command
Restore Object (RSTOBJ) command
Save Changed Object (SAVCHGOBJ) command
Save Library (SAVLIB) command
Save Object (SAVOBJ) command