Creating the Directory and Running the Import Script

To import an Oracle Life Sciences Data Hub Domain, run the following commands from the database server where your target Oracle LSH instance is installed.

  1. Connect to the database instance as the Oracle Applications schema owner; usually apps.
  2. At least the first time you run the script, create an OS directory where you want the import log to be generated. For example, create it in the LSH application user's home directory so that it is easy to find.

    The import process creates a .log file that contains Oracle LSH object metadata information that may be sensitive to your organization. Oracle recommends granting full access to the OS directory only to the Oracle user and the user who runs the import process.

    For example:

    mkdir  /user/xyz/exp_imp
    # Below command removes all rights on the directory from others
    chmod o-rwx /user/xyz/exp_imp
    # Assuming the user running import owns the directory and Oracle user is part of a group called orcl
    chgrp orcl /user/xyz/exp_imp
    # Grant read,write,execute privileges on the directory to the group
    chmod g+rwx /user/xyz/exp_imp
    # Grant read,write,execute privileges on the directory owner
    chmod u+rwx /user/xyz/exp_imp

    Note:

    • Do not include any spaces in the OS directory name.
    • Before running the import script, be sure that you have only the current domain_name.zip file in the OS directory.
  3. Map the OS directory to a database directory using the following SQL command:
    create directory database_dir_name as path_of_the_OS_directory
    
  4. Go to the OS directory you created and copy the exported Domain file into it.

    Note:

    If you have not created the exported Domain file yourself, you can receive it from the person who has through a download or an email—any medium that you use to transfer files.
  5. Run the import script as follows:
    sqlplus apps@LSH_target_database_server_name @path_of_cdrruimport.sql  LSH_application_user Database_directory_name Zipped_Domain_Filename COMMIT_ON_NO_ERROR/MANUAL_COMMIT
    
  6. The script requires the following command line parameters in this sequence:
    • LSH Application Username. Enter a valid Oracle LSH application user's username. The import script creates all the imported Domain's objects and performs other required operations on them, such as checking the objects in or out, as this Oracle LSH application user. The script prompts you for a password for this user, when run.
    • Database Directory Name. Enter the name of the database directory you created in SQL*Plus that maps to an OS directory where you want the import script to generate the import log file; see Required Setup.
    • Zipped Domain Filename. Enter the name of the zipped export file (domain_name.zip) that you copied from the source Oracle LSH instance.
    • COMMIT_ON_NO_ERROR/MANUAL_COMMIT: You must specify one of these options to the import script:
      • COMMIT_ON_NO_ERROR. If you want Oracle LSH to commit the imported Domain's data to the database, enter this option. Oracle LSH commits the data if there are no errors while importing.

        If there are errors, Oracle LSH rolls back the data and you must rerun the import script after fixing the errors.

      • MANUAL_COMMIT. Enter this option if you want to commit or roll back the data manually after examining the import log.
  7. The import script creates a log file in the database directory with a name in this format: domain_name_import.log. See Import Log File Content.