The database administrator can use the IMPORT TABLE statement to load a new base table using the information contained in the export file into a schema in a SESAM/SQL database. The CCSN of the export file must match the database’s coded character set (CODE_TABLE). If no coded character set is used for the database, the export file’s CCSN is ignored. The new base table can also be a partitioned table.
A base table which can be partitioned is generated in the specified database from the export file's metadata:
The table is created.
The space resp. the definition of the partitions is taken from the statement. The spaces must already have been created for partitioned tables.
The table type is taken over from the exported table.
All the columns of the exported table are taken over. The data type, default attributes and the sequence of rows are retained.
If there is a primary key then this is also taken over. A primary key must exist for partitioned tables.
You can decide whether or not the user data stored in the export table is to be taken over. If you decide to import the user data you can also insert the corresponding indexes or integrity constraints from the export file into the new table.
Interrupting logging in the case of IMPORT TABLE
If a base table is located in a user space for which logging has been activated, SESAM/SQL logs all DML or DDL statements that update the table contents or table definition in DA-LOG or CAT-LOG files.
If data is loaded into this table by means of IMPORT TABLE then logging is interrupted. If integrity constraints are also loaded into the table using IMPORT TABLE then it is guaranteed that these integrity constraints are fulfilled.
If logging has been interrupted then, after IMPORT TABLE, the database administrator must create a backup copy of the user space in which the table is located. Otherwise the user space will remain in the state “copy pending” and can only be worked on with utility or retrieval statements (see the “SQL Reference Manual Part 2: Utilities”).