Perform the following steps only if you plan to import data using files. These steps export the data in the source database and make the files accessible to the Empirica Healthcare Analysis database.
These steps create separate export files for the data and vocabulary accounts and include directions on how to modify commands if the vocabulary account is part of the data account.
Perform these steps before you set installation and data transfer settings.
Step 1. Create the export directory in the source database.
You can use the default DATA_PUMP_DIR directory or create a new directory. Oracle recommends creating a new directory.
SQL>create or replace directory <export_directory> as '<server_path>';
where:
Example:
SQL>create or replace directory ETL_SRC_DIR as '/u01/oradata/xxx';
Step 2. Give privileges to the source user accounts for the export directory.
If the vocabulary account is the same as the data account, omit the second command.
SQL>GRANT READ, WRITE ON DIRECTORY <export_directory> TO <data_schema_name>;
SQL>GRANT READ, WRITE ON DIRECTORY <export_directory> TO <vocabulary_schema_name>;
where:
Example:
SQL>GRANT READ, WRITE ON DIRECTORY ETL_SRC_DIR TO CDM_SOURCE;
SQL>GRANT READ, WRITE ON DIRECTORY ETL_SRC_DIR TO CDM_VOCABULARY;
Step 3. Export the source data, either all of the tables or the tables of your choosing.
If you export all the tables, tables that are not needed are exported. For instance, you need only one condition table.
Export the tables along with their indexes and constraints. You do not need to export other objects in the account.
If the vocabulary account is the same as the data account, omit the second command.
You are prompted to provide a password for each account.
Commands for Oracle 11g:
$expdp <data_schema_name>@<connect_string> directory=<export_directory> dumpfile=<dump_file_name>.dmp logfile=<log_file_name>
$expdp <vocabulary_schema_name>@<connect_string> directory=<export_directory> dumpfile=<dump_file_name>.dmp logfile=<log_file_name>
Commands for Oracle 12c:
$expdp <data_schema_name>@<connect_string> dumpfile=<export_directory>:<dump_file_name>.dmp logfile=<export_directory>:<log_file_name>
$expdp <vocabulary_schema_name>@<connect_string> dumpfile=<export_directory>:<dump_file_name>.dmp logfile=<export_directory>:<log_file_name>
where:
Example for Oracle 11g:
$expdp cdm_source@ORCL directory=ETL_SRC_DIR dumpfile=data_export.dmp logfile=data_export.log
$expdp cdm_vocabulary@ORCL directory=ETL_SRC_DIR dumpfile=voc_export.dmp logfile=voc_export.log
Example for Oracle 12g:
$expdp cdm_source@ORCL dumpfile=ETL_SRC_DIR:data_export.dmp logfile=ETL_SRC_DIR:data_export.log
$expdp cdm_vocabulary@ORCL dumpfile=ETL_SRC_DIR:voc_export.dmp logfile=ETL_SRC_DIR:voc_export.log
TABLES=<table_list>
where:
Example:
$expdp cdm_source/cdm_source@ORCL directory=ETL_SRC_DIR dumpfile=data_export.dmp logfile=data_export.log TABLES=PERSON,OBSERVATION_PERIOD,DRUG_ERA,DRUG_EXPOSURE,CONDITION_ERA,PROCEDURE_OCCURRENCE
$expdp cdm_vocabulary/cdm_vocabulary@ORCL directory=ETL_SRC_DIR dumpfile=voc_export.dmp logfile=voc_export.log TABLES=CONCEPT
Step 4. Move the export files you created in step 3 to the import directory location on the Empirica Healthcare Analysis database server.
You can move the files using a tool of your choice, such as an sFTP client.
Step 5. Create a database directory on the Empirica Healthcare Analysis database server machine.
SQL>create or replace directory <import_directory> as '<server_path>';
where:
Example:
SQL>create or replace directory ETL_SRC_DIR as '/u01/oradata/xxx';
| Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
|---|