Oracle7 Server Utilities
Creating Oracle Server Version 6 Export Files from Oracle7
It is possible to create a Version 6 export file from Oracle7 by running the Version 6 export executable with the Oracle7 Server. To do so, you must first run CATEXP6.SQL as SYS. This script creates the export views that make the database look to Export like a Version 6 database.
Note: A normal Oracle7 export requires CATEXP.SQL to be run by SYS after CATALOG.SQL to create the necessary views. If needed, both CATEXP.SQL and CATEXP6.SQL can be run, in any order. Once one of these scripts has been run, it does not have to be run again.
Excluded Objects
The Version 6 export utility produces a Version 6 export file by issuing queries against the views created by CATEXP6.SQL. Because this file is Version 6 compatible, it excludes the following Oracle7 objects:
- stored procedures, functions, and packages
- tables stored in hash clusters
Suggestion: You can use the UTLEXP6.SQL script to obtain the names of all objects that are excluded from the export
file. Review this script for the most up-to-date notes on conversion issues.
Datatype Conversion
The Oracle7 VARCHAR2 datatype is automatically converted to its Version 6 equivalent CHAR. Fixed-length Oracle7 CHAR columns are also converted to variable-length Version 6 CHAR data.
Database Link Names Truncated
Database link names in Oracle7 have the format name.d1.d2.d3..., where name is the database name, d1 is a domain specification, and d2..d3 are optional components in a domain name. In a Version 6 export, link names are truncated, leaving only the name component.
VARCHAR Errors
Oracle7 character data (VARCHAR2) can be up to 2,000 characters long, whereas Version 6 CHAR data is limited to 255. The entire column is placed in the export file. The CREATE TABLE statement in the export file includes the actual length of the column, as it was defined in the Oracle7 database.
When Version 6 Import attempts to create the table, the specification of a CHAR column greater than 255 produces an error. One solution is to change the table's datatype to LONG, but be aware of the many restrictions on the Version 6 LONG datatype. See "Selecting a Datatype" in the Oracle7 Server Application Developer's Guide for details.
LONG Data Errors
Oracle7 LONG data can be 2 gigabytes. Unlike VARCHAR data, Version 6 Export truncates LONG data when writing to the export file.
In Version 6.0.35.0 and later, Export truncates LONG data to 64K - 3 bytes and produces a warning message. Earlier releases truncate to
64K - 2 bytes with no warning.
Warning: When importing into a Version 6 database, such overly long data produces an error and causes the rest of the table data to be skipped.
System Audit Options Dropped
Oracle7 object audit options on tables and views are automatically exported in their equivalent version 6 form. However, the wide array of Oracle7 privileges makes it impossible to translate them into any Version 6 equivalent. As a result, system audit options are not exported. After Importing into Version 6, issue one or more of the following statements to re-establish system audits:
AUDIT DBA [WHENEVER [NOT] SUCCESSFUL]
AUDIT CONNECT [WHENEVER [NOT] SUCCESSFUL]
AUDIT NOT EXISTS
AUDIT ALL [WHENEVER [NOT] SUCCESSFUL]