Oracle Enterprise Manager Concepts Guide

Contents Index Home Previous Next

CHAPTER 14. Managing and Moving Data

This chapter describes how to use Oracle Data Manager to move data to and from an Oracle database. This chapter assumes that you have read "Overview of the Database Tools," [*], and that you are familiar with the interface elements of the database tools. The topics included in this chapter are:

For more information on the tasks Data Manager performs, see the sections on the Export, Import and SQL*Loader utilities in Oracle7 Server Utilities. For information about standard elements of your operating system, see your operating system-specific documentation.

Starting the Data Manager

To start the Data Manager, select a database object from the Navigator tree list. Then click on the Data Manager icon in the Applications Launch Palette, or choose Applications and then Oracle Data Manager from the Tools menu.

Note: You can change the database connection with the Change Database Connection option in the File menu of the Console.

After the Data Manager has successfully connected to a database, the Oracle Data Manager property sheet displays.

Figure Figure 14 - 1 shows the first page of the Data Manager property sheet.

Figure 14 - 1. First Page of the Data Manager Property Sheet

The Data Manager property sheet contains the following tabs:

For general information about:

Exporting Data to a File

You use the Export page of the Data Manager property sheet to transfer data from an Oracle database to an operating system file in Oracle-binary format. Files in this proprietary fomrat can only be read by using the Import component of Data Manager.

Export files can be used to transfer data between databases or used as backups. You can define how the data is exported.

To export data to a file, perform the following steps:

Export File Enter the operating system filename that will contain your exported data. (Specifies the value for the FILE parameter.)
Browse Choose Browse to select the operating system filename that will contain your exported data.
To be Exported Tables: Choose Tables to export tables to the file. You must then choose Specify to select the tables to export. (Specifies the value for the TABLES parameter.)
Users: Choose Users to export database objects belonging to specified owners. You must then choose Specify to select users whose objects are to be exported. (Specifies the value for the OWNER parameter.)
Full Database: Choose Full Database to export the entire database to the file. (Specifies the value for the FULL parameter.)
Specify If you selected Tables or Users, choose Specify to select a list of tables or a list of users to export.
Objects to Export Grants: Check this box to also export grants on the database objects that will be exported. (Specifies the value for the GRANTS parameter.)
Rows: Check this box to export rows of tables. You can elect not to export rows if you want to export only table definitions. (Specifies the value for the ROWS parameter.)
Indexes: Check this box to export indexes. (Specifies the value for the INDEXES parameter.)
Constraints: Check this box to export table constraints. (Specifies the value for the CONSTRAINTS parameter.)
Export Exports the data to the file.
Run on Host Runs the export operation as an Enterprise Manager job on the node containing the selected database. For more information, see "Data Manager Tasks," [*].
Advanced Choose Advanced to edit advanced parameters.
Reset Choose Reset to set all options to their default values.
Close Closes Oracle Data Manager.

Exporting Objects to a File

To export objects to a file, perform the following steps:

Export Moves selected objects from the Remaining Tables/Owners list to the Selected Tables/Owners list.
Export All Moves all objects from the Remaining Tables/Owners list to the Selected Tables/Owners list.
Don't Export Moves selected objects from the Selected Tables/Owners list to the Remaining Tables/Owners list.
Export None Moves all objects from the Selected Tables/Owners list to the Remaining Tables/Owners list.

Exporting Table(s) to a File

To export a table or a list of tables that you own or have privileged access to, from the Export page of the Oracle Data Manager, perform the following steps:

Exporting Owner(s) to a File

To export all objects belonging to an owner or list of owners, from the Export page, perform the following steps:

Exporting the Full Database

To export the full database to a file, from the Export page, perform the following steps:

Selecting Advanced Export Options

To select advanced export options, from the Export page, perform the following steps:

Record Length Enter a value for the length in bytes of the file record. (Specifies the value for the RECORDLENGTH parameter.).
Buffer Size Enter a value for the size in bytes of the buffer used to fetch data rows. ( Specifies the value for the BUFFER parameter.)
Generate Log File Select if you want a log file generated for the export (Specifies the value for the EXP parameter). You must specify the name of the log file.
Log File Name of log file. Used only when Generate Log File is selected. (Specifies the value for the LOG parameter.) Use the associated Browse button to specify the path and filename for the log file.
Export Read-Consistent View of Data Select if you want to export a read-consistent view of the database (Specifies the value for the CONSISTENT parameter).
Increment Type Select the type of incremental export. (Specifies the value for the INCTYPE parameter). Valid values for Windows are None, Incremental, Complete, and Cumulative.
Statistics Type Select type of database optimizer statistics to generate when exported data is imported back into Oracle. (Specifies the value for the STATISTICS parameter). Valid values for Windows are None, Estimate, and Compute.
Merge Extents for Export Select if you want to compress table data into one extent during an import (Specifies the value for the COMPRESS parameter).

Using the Command-line Option

In certain situations, you may want to use the command-line option to export data from an Oracle database to a file.

To start the Export process, type:

c:\> EXP72 [options]

Note: The Run on Host feature is not available as a command line option.

For more information about command-line options for the Export utility, see Oracle7 Server Utilities.

BUFFER and RECORDLENGTH Defaults

When running the Data Manager, note that the default values for certain parameters are operating-system specific. Specifically, the BUFFER parameter defaults to a value of 4K under Windows NT and the RECORDLENGTH parameter defaults to 2K.

Importing Data from a File

You use the Import page of the Data Manager property sheet to transfer data from an export file to an Oracle database. Import can only read data that has been created with the Export component of Data Manager. You can define how the data is imported.

To import data to a file, perform the following steps:

Import File Specify operating system file to import into an Oracle database. (Specifies the value for the FILE parameter.)
Browse Use this to select the operating system filename that will be imported into an Oracle database.
To be Imported Tables: Choose Tables to import tables from the file. You must then choose Specify to select the tables to import. (Specifies the value for the TABLES parameter.)
Users: Choose Users to import database objects belonging to specified owners. You must then choose Specify to select users whose objects are to be imported. (Specifies the value for the OWNER parameter.)
Full Database: Choose Full Database to import the entire database from the file. (Specifies the value for the FULL parameter.)
Specify If you selected Tables or Users, choose Specify to select a list of tables or a list of users to import.
Objects to Export Grants: Check this box to also import grants on the database objects that will be imported. (Specifies the value for the GRANTS parameter.)
Rows: Check this box to export rows of tables. You can elect not to import rows if you want to import only table definitions. (Specifies the value for the ROWS parameter.)
Indexes: Check this box to import indexes. (Specifies the value for the INDEXES parameter.)
Import Imports the data from the file to the Oracle database.
Run on Host Runs the import operation as an Enterprise Manager job on the node containing the selected database. For more information, see "Data Manager Tasks," [*].
Advanced Choose Advanced to edit advanced parameters.
Reset Choose Reset to set all options to their default values.
Close Closes Oracle Data Manager.
Ignore Creation Errors If selected, Import will not report "object already exists" errors when attempting to create database objects. (Specifies the value for the IGNORE parameter.)

Importing Table(s) From a File

To import a list of tables from an operating system file, from the Import page, perform the following steps:

Importing User(s) Objects From a File

To import a list of objects owned by specified users from an operating system file, from the Import page, perform the following steps:

Importing a Full Database From a File

To import a full database from an operating system file, from the Import page, perform the following steps:

Selecting Advanced Import Options

To select advanced import options, perform the following steps:

Record Length Enter the length in bytes of the file record. (Specifies the value for the RECORDLENGTH parameter).
Buffer Size Enter the size in bytes of the buffer used to transfer data rows. (Specifies the value for the BUFFER parameter.)
Generate Log File If selected, Import will generate an import log file.
Log File The name of the log file that contains the screen output. (Specifies the value for the LOG parameter.) Use the associated Browse button to specify the path and filename for the log file.
Increment Type Select which type of incremental import, System, Restore, or None. (Specifies the value for the INCTYPE parameter.)
Write Index- Creation Commands to a File If selected, Import will create a file to hold the index-creation SQL statement.
Index File The name of the file that will contain the index- creation SQL statement. Use the associated Browse button to specify the path and filename for the index file. (Specifies the value for the INDEXFILE parameter.)
Commit After Each Array If selected, Import will commit after each array insert. (Specifies the value for the COMMIT parameter.)
Overwrite Existing Data Files When doing a full database import, select this if you want to overwrite the existing data files making up the database. (Specifies the value for the DESTROY parameter.)

Using the Command-line Option

In certain situations, you may want to use the command-line option to import data from a file to an Oracle database.

To start the Import process, type:

c:\> IMP72 [options]

Note: The Run on Host feature is not available as a command line option.

For more information about command-line options for the Import utility, see Oracle7 Server Utilities.

BUFFER and RECORDLENGTH Defaults

When running the Data Manager, note that the default values for certain parameters are operating-system specific. Specifically, the BUFFER parameter defaults to a value of 4K under Windows NT and the RECORDLENGTH parameter defaults to 2K.

Loading Data from an External File

You use the Load page of the Data Manager property sheet to transfer data to an Oracle database from files that have a different format from export files. By using a control file you specify how the data is stored externally and how it is to be loaded into the database.

To load data from an external file to an Oracle database, perform the following steps:

Control File Enter the path and filename for the control file, or choose the Control File Browse button to select the control file from a list.
Note: You cannot load data until you supply a control filename. The Load button will remain disabled until you do so.

Optional Files Data File: Either enter the path and filename for the data file, or choose the Optional Files Browse button to select the data file from a list.
Log File: Enter the path and filename for the log file.
Bad File: Enter the path and filename for the bad file.
Discard: Enter the path and filename for the discard file.
Load Loads the data from the external file to the Oracle database.
Run on Host Runs the load operation as an Enterprise Manager job on the node containing the selected database. For more information, see "Data Manager Tasks," [*].
Advanced Choose Advanced to edit advanced parameters.
Reset Choose Reset to set all options to their default values.
Close Exits Data Manager.

Selecting Advanced Loader Options

To select advanced loader options, perform the following steps:

Records to Skip Specifies the number of logical records from the beginning of the file that should not be loaded. Use this parameter to continue loads that have been interrupted. (Specifies the value for the SKIP parameter.)
Records to Load Specifies the number of logical records to load (LOAD parameter) after skipping the number of records specified in Records to Skip.
Rows per Commit This parameter (ROWS) indicates the number of rows in the bind array.
Maximum Errors Specifies the number of insert errors (ERRORS parameter.) to allow before the Loader process terminates with an error.
Maximum Discards Specifies the number of discards (DISCARDS parameter) to allow before the Loader process terminates with an error.
Maximum Bind Array Specifies the maximum size of the bind array (BINDSIZE parameter) in Bytes.
Data Path Conventional: Indicates that a conventional data path will be used to load your data into an Oracle7 database.
Direct: Sets the DIRECT parameter to TRUE.
Defaults Sets all options in this property sheet to their default values.

Using the Command-line Option

In certain situations, you may want to use the command-line option to load data from an external file to an Oracle database.

To start the SQL*Loader process, type:

c:\> IMP72 [options]

Note: The Run on Host feature is not available as a command line option.

For more information about command-line options for the SQL*Loader utility, see Oracle7 Server Utilities.

Data Manager Tasks

When you click on the Run On Host button on one of the Data Manager property sheet pages, you create a job to perform one of the export, import, or load operations. You then use the Oracle Enterprise Manager Job system to execute those jobs. The following tasks are defined in the Oracle Enterprise Manager Job system and executed by Oracle Enterprise Manager intelligent agents residing on managed hosts. For information on using the job system, see Chapter 4, Job Scheduling, in this guide.

Export

This job exports data from an Oracle database to a file.

The parameters match those of the Export page of the Data Manager property sheet, except for the following elements:

Import

This job imports data from a file to an Oracle database.

The parameters match those of the Import page of the Data Manager property sheet, except for the following elements:

Loader

This job loads data from an external file to an Oracle database.

The parameters match those of the Load page of the Data Manager property sheet, except for the following elements:


Contents Index Home Previous Next

<Oracle Enterprise Manager Concepts GuideOracle Enterprise Manager Concepts Guide