You can user the EXPORT SCHEMA command to export the data belonging to the application of the specified schema.
You require the Demo Database DEMODB.
Only the owner of
the schema may execute the EXPORT SCHEMA command. Start the Loader as database
administrator MONA and log on to the demo database DEMODB. Use the Session
Mode.
loadercli –d demodb –u mona,red
The data of the HOTEL schema is to be exported.
You can make entries after the keyword CATALOG and/or DATA to select what is to be exported, the database catalog and/or the data belonging to the application.
You can export the database catalog information belonging to the application of the schema.
EXPORT SCHEMA hotel
CATALOG OUTSTREAM
'hotel_ddl.catalog'
The database catalog (CATALOG) is exported in the DDL format (default value).
See also:
Loader, Data
Stream
You can export the application data of the schema.
EXPORT SCHEMA hotel
DATA OUTSTREAM
'hotel_pages.data'
The application data (DATA) is exported in the PAGES format (default value).
EXPORT SCHEMA hotel
DATA OUTSTREAM 'hotel_records.data'
RECORDS
The application data (DATA) is exported in the RECORD format.
An PAGES export uses a database format (based on a page), and is therefore faster than an export that uses the RECORDS format of the Loader.
You may not change a data file in either case as the binary format is specific to the Loader.
See also:
Loader, PAGES,
RECORDS
You can export the data belonging to the application of the specified schema.
EXPORT SCHEMA hotel
CATALOG OUTSTREAM
'hotel_ddl.catalog'
DATA OUTSTREAM
'hotel_pages.data'
Observe the sequence of the syntax elements. Always enter the syntax element for the export of the database catalog first, and then the syntax element for the export of the application data.
By specifying a data stream after the keyword CONFIGURATION, you can exclude the application data of the tables specified in this data stream. The tables must be identified in the data stream by specifying their schema and the table name.
The CITY and HOTEL tables are to be excluded from the export.
Create the hotel_table.configuration file with the following contents:
HOTEL,CITY
HOTEL,HOTEL
Specify the following export command in the Loader session mode. Observe the sequence of the syntax elements. First, enter the syntax element that excludes the table from the export.
EXPORT SCHEMA hotel
CONFIGURATION INSTREAM
'hotel_table.configuration'
CATALOG OUTSTREAM
'hotel_ddl.catalog'
DATA OUTSTREAM 'hotel_records.data'
The database catalog entries of all tables are always exported, regardless of the restrictions made in hotel_table.configuration .
If you specify a data stream after the keyword PACKAGE, the command entries from the SYSLOADER.TRANSFORMATIONMODEL table are exported to this data stream. This is an additional log option. Always enter the PACKAGE syntax element as the last syntax element.
EXPORT SCHEMA hotel
CATALOG OUTSTREAM 'hotel_ddl.catalog'
PACKAGE OUTSTREAM
'hotel_csv.package'
See also:
Loader, Additional Log
Functions (package_spec)
Combining the syntax options can result in correspondingly complex commands. Observe the sequence of the syntax elements.
EXPORT SCHEMA hotel
CONFIGURATION INSTREAM FILE 'hotel_table.configuration' CSV
ASCII
CATALOG OUTSTREAM FILE 'hotel_ddl.catalog' DDL
DATA OUTSTREAM FILE 'hotel_pages.data' PAGES
PACKAGE OUSTREAM FILE 'hotel_csv.package' CSV
For a complete
syntax description, see EXPORT SCHEMA
Command in the Loader documentation.
See also:
Other Commands for Exporting
Corresponding Import command IMPORT SCHEMA