Create Oracle Datastores Using Script Files

Important: Unlike other database types that will create the physical database in which the datastore is to be stored if that database doesn't already exist, when using Oracle, the physical database must already have been created before these scripts are run.
  1. To create the database script file, on the command line, enter the following command:
    dbfhadmin -script -type:datastore -provider:ora -name:<datastore-name> -file:<script-name.sql> 

    where <datastore-name> is the name of the datastore to be created within the database, and <script-name.sql> is the name of the script file to be created.

    Note: If you omit the -file option, the default name is create_datastore_<datastore-name>_ora.sql
  2. Create further script files for any more required datastores.

    Once you have created the script files, use the dbfhadmin utility to run them, and create the required databases.

    Before you run the -createdb command, ensure that the sqlplus command is on the PATH. (SQL *Plus is Oracle's command line database utility.)

  3. To create the database, on the command line, enter the following command:
    dbfhadmin -createdb -file:<script-name.sql> -type:datastore -provider:ora -existdb:<db-name> -user:<user-name> -password:<password>

    where <script-name.sql> is the name of the script file that was created in an earlier step; <db-name> is the name of a database reference in your tnsnames.ora file; and <user-name> and <password> are valid credentials for the instance.

Now that the datastores have been created, you can configure the database configuration file to use them.