Unloading Data to Named Pipes Created by Fast Clone
Unloading Data to Named Pipes Created by Fast Clone
You can configure Fast Clone to create a named pipe in the output directory for each source table before unloading data from the tables. The target load utility reads data from the pipes and loads it to the target.
When unloading data to named pipes, Fast Clone performs a checkpoint for the source database and then creates the pipes for the tables to unload. Checkpoint processing can take up to 20 seconds.
Before you run the load job for a table, ensure that Fast Clone created the pipe for the table. You can create a script to delay the load job until after the pipe is created.
If you start a load job for a table before Fast Clone creates the pipe for the table, the load process fails because the target load utility cannot read data from the pipe. Also, the unload process remains in a pending state.
Create a cloning configuration file.
Specify connection information for the source and target databases, the source tables to unload, the load script base name, and other settings, as needed.
To generate a load script for the target utility, complete the following steps:
Configure Fast Clone to generate the load script in one of the following ways:
In the Fast Clone Console, select the
Generate loader input only, do not unload data
option on the
Runtime Settings
tab >
File Locations
view.
At the command line, enter create_load_input_only=true.
In the configuration file, enter the create_load_input_only=true parameter.
Save the cloning configuration file.
Run the Fast Clone with the updated cloning configuration file.
Fast Clone generates a .cmd load script on Windows or a .sh load script on Linux and UNIX in the output directory.
Configure Fast Clone to unload data without overwriting the generated load script in one of the following ways:
In the Fast Clone Console, clear the
Generate loader input only, do not unload data
option and select the
Unload data only, do not generate loader input
option on the
Runtime Settings
tab >
File Locations
view.
At the command line, enter the create_load_input_only=false and unload_data_only=true parameters.
In the configuration file, enter the create_load_input_only=false and unload_data_only=true parameters.
Configure Fast Clone to create named pipes in the output directory in one of the following ways:
In the Fast Clone Console, select the
Create output as pipes instead of files
option on the
Runtime Settings
tab >
Miscellaneous Conditions
view.
At the command line, enter the create_output_pipe_instead_of_file=true parameter.
In the configuration file, set the create_output_pipe_instead_of_file parameter to true.
Run the data unload job.
Fast Clone performs a checkpoint for the source database and creates a named pipe for each source table. Fast Clone then unloads the source data to the pipes.
After Fast Clone creates the pipes, run the load script that was generated in Step 2.
To delay the load job until after the pipes are created, you can use another script that monitors creation of the pipes and invokes the load script. For example, use the following Perl script on Linux:
perl -e "while (not(-p '/
output_directory
/
table_name
.dat')) {sleep 1;}";
/
output_directory
/
load_script
.sh
The target load utility reads data from the named pipes and loads it to the target.