Makes a copy of a database in an intermediate form. Use the IMPORT statement to rebuild an Oracle Rdb database from the interchange file (.rbr file extension) created by the EXPORT statement. You use the EXPORT statement with the IMPORT statement to make changes to Oracle Rdb databases that cannot be made any other way. The EXPORT statement unloads a database to an .rbr file. The IMPORT statement creates the database again with the changes that are both allowed and not allowed through ALTER statements. See the IMPORT statement for more information.
1 – Environment
You can use the EXPORT statement in interactive SQL only.
2 – Format
(B)0[m[1;4mEXPORT[m[1m [1;4mDATABASE[m[1m qwq> [1;4mALIAS[m[1m <alias> qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk [m [1m tq> [1;4mFILENAME[m[1m <file-spec> qwqwqqqqqqqqqqqqqqqqqqqqqqwqqqu [m [1m mq> [1;4mPATHNAME[m[1m <path-name> qj mq> literal-user-auth qj x [m [1mlqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj [m [1mmq> [1;4mINTO[m[1m <file-spec> qwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> [m [1m mq [1;4mWITH[m[1m qwq> [1;4mEXTENSIONS[m[1m [m [1mqqqqqqqqqqqu [m [1m tq> [1;4mNO[m[1m [1;4mEXTENSIONS[m[1m qqqqqqqqqqu [m [1m tq> [1;4mDATA[m[1m [m [1mqqqqqqqqqqqqqqqqqu [m [1m tq> [1;4mNO[m[1m [1;4mDATA[m[1m [m [1mqqqqqqqqqqqqqqqu [m [1m tq> [1;4mFORWARD_REFERENCES[m[1m qqqqu [m [1mmq>[m [1;4mNO[m[1m [1;4mFORWARD_REFERENCES[m [1mqqj[m (B)0[m[1mliteral-user-auth = [m [1m [m [1mqqq> [1;4mUSER[m[1m '<username>' qwqqqqqqqqqqqqqqqqqqqqqqqqwqq> [m [1m mq> [1;4mUSING[m[1m '<password>' qj [m [1m [m
3 – Arguments
3.1 – ALIAS alias
Specifies the source database files to be written to an .rbr file. o The ALIAS argument specifies the alias of an already attached database. If the database you want to export is already attached, specifying ALIAS avoids the overhead of a second attachment to the database and the locking that attachment entails. o The FILENAME and PATHNAME arguments both identify the database root file associated with the database. If you specify a repository path name, the path name indirectly specifies the database root file. Because the EXPORT statement does not change any definitions in the repository the effect of the PATHNAME and FILENAME arguments is the same.
3.2 – FILENAME file spec
Specifies the source database files to be written to an .rbr file. o The ALIAS argument specifies the alias of an already attached database. If the database you want to export is already attached, specifying ALIAS avoids the overhead of a second attachment to the database and the locking that attachment entails. o The FILENAME and PATHNAME arguments both identify the database root file associated with the database. If you specify a repository path name, the path name indirectly specifies the database root file. Because the EXPORT statement does not change any definitions in the repository the effect of the PATHNAME and FILENAME arguments is the same.
3.3 – PATHNAME pathname
Specifies the source database files to be written to an .rbr file. o The ALIAS argument specifies the alias of an already attached database. If the database you want to export is already attached, specifying ALIAS avoids the overhead of a second attachment to the database and the locking that attachment entails. o The FILENAME and PATHNAME arguments both identify the database root file associated with the database. If you specify a repository path name, the path name indirectly specifies the database root file. Because the EXPORT statement does not change any definitions in the repository, the effect of the PATHNAME and FILENAME arguments is the same.
3.4 – FORWARD_REFERENCES
Syntax options: FORWARD_REFERENCES | NO FORWARD_REFERENCES The EXPORT statement analyzes all dependencies in the database to determine which functions and procedures are referenced by other definitions. Since IMPORT defines each object type in a strict order, it is possible that some definitions may be used prior to their definition. For instance, tables are defined before modules, but the table might call an SQL function from a module. The FORWARD_REFERENCES option requests that EXPORT save descriptions of these routines first in the interchange file so that IMPORT can declare them prior to their usage. See the DECLARE Routine statement for more details. FORWARD_REFERENCES is the default. If the interchange file is to be used by a version prior to Oracle Rdb V7.1.0.4 then the NO FORWARD_REFERENCES option should be used to exclude this information.
3.5 – INTO file spec
Specifies the name for the .rbr file the EXPORT statement creates. Optionally, the file specification can include a device and directory specification.
3.6 – literal-user-auth
Specifies the user name and password for access to databases, particularly remote database. This literal lets you explicitly provide user name and password information in the EXPORT statement.
3.7 – USER username
Defines a character string literal that specifies the operating system user name that the database system uses for privilege checking.
3.8 – USING password
Defines a character string literal that specifies the user's password for the user name specified in the USER clause.
3.9 – WITH_[NO]_DATA
Specifies whether the .rbr file created by the EXPORT statement includes the data and metadata contained in the database, or the metadata only. The default is WITH DATA. When you specify the WITH NO DATA option, the EXPORT statement copies metadata, but not the data, from a source database to an .rbr file. Use the IMPORT statement to generate an empty database whose metadata is identical to that of the source database. NOTE The WITH NO DATA option is not compatible with Oracle CDD/Repository databases (CDD$DATABASE.RDB). If you attempt to export a CDD$DATABASE.RDB database, SQL issues an error message stating that the WITH NO DATA option is not valid for Oracle CDD/Repository databases.
3.10 – WITH_[NO]_EXTENSIONS
Specifies whether or not the .rbr file created by the EXPORT statement includes extensions that are compatible only with Oracle Rdb Version 3.0 or higher database systems. The default is WITH EXTENSIONS. When you specify the WITH NO EXTENSIONS option, the resulting interchange (.rbr) file contains only the definitions of the domains, the tables, and indexes. Indexes are converted to sorted indexes and are minus storage maps. The following conversions take place for domains: o TINYINT data types are converted to SMALLINT data types o DATE ANSI, TIMESTAMP, and TIME data types are converted to DATE VMS data types In addition, all null values are converted to the columns' missing value or default to a data type specific missing value. For example, null numeric values are replaced by zeros and null character values are replaced by blanks. When you specify the WITH NO EXTENSIONS option, many features of Oracle Rdb databases are not exported. For example, storage areas, storage maps, triggers, collating sequences, functions, modules, and outlines are not backed up when you specify the WITH NO EXTENSIONS argument. NOTE The WITH NO EXTENSIONS option is not compatible with Oracle CDD/Repository databases (CDD$DATABASE.RDB). If you attempt to export a CDD$DATABASE.RDB database, SQL issues an error message stating that the WITH NO EXTENSIONS option is not valid for Oracle CDD/Repository databases.