Siebel Marketing Installation and Administration Guide > Installing and Administering Siebel Marketing >

Installing Marketing Contact List Import Using PL/SQL


The following topics contain information about how to install and implement Marketing Contact List Import using PL/SQL.

NOTE:  You must have installed the Siebel Database Server before you can implement this feature. For more information, see Siebel Database Upgrade Guide on the Siebel Bookshelf.

Preinstallation Tasks

Note the following important information before you install this feature:

Setting System Preferences to Enable Contact List Import Using PL/SQL

Use the following procedure to set system preferences.

To set the system preferences

  1. Navigate to Sitemap > Administration Application > System Preferences and query for the MktgEnableDBImport and MktgIsDBOracle system preferences.
  2. Make sure that the System Preference value is set to Y for both system preferences. If it is not, set the value to Y and log into the Siebel Marketing application again.

Activating the Mktg Master DB Import Process Workflow

Use the following procedure to activate the Mktg Master DB Import Process workflow.

To activate the Mktg Master DB Import Process workflow

  1. Log into Siebel Tools, and query for the Mktg Master DB Import Process workflow.
  2. If its status is Not In Use, click the Revise/Publish button to activate the workflow.

Editing the CallPLSQL Business Service

Use the following procedure to edit the CallPLSQL business service.

To edit the CallPLSQL business service

  1. Query for the CallPLSQL business service and click on the Business Service Server Script node.
  2. Within the CallPLSQL business service, edit its script attribute as shown in the following example:

    function CallPLSQL(Inputs, Outputs)

    {var vImptJobId;

    var cmdString;

    vImptJobId = Inputs.GetProperty("ImportJobId");

    Clib.sprintf(cmdString,
    "<absolute path of the sqlplus.exe file on the Siebel Server> <DB table owner username>/<DB table owner password>@<database table owner> @<absolute path of callplsql.sql file> %s", vImptJobId);

    Clib.system(cmdString);

    return (ContinueOperation);

    }

  3. Edit the line highlighted in bold text to point to the:
    • sqlplus executable on the Siebel Server
    • User name (the name of the table owner) and password (the password of the database table owner)
    • @local_SID (database name in the .ini file) of the database you are connected to
    • The location of the callplsql.sql script

      For example, on a Solaris environment, the line would look like:

      /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/sqlplus ORAPERF/ORAPERF@ORAPERF @/home/oracle/siebel/81114_23044_app4/siebsrvr/temp/callplsql.sql

      Where

      /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/sqlplus

      is the path of the sqlplus executable

      ORAPERF/ORAPERF@ORAPERF are the connection credentials and

      @/home/oracle/siebel/81114_23044_app4/siebsrvr/temp/callplsql.sql is the path of the callplsql.sql script

      The callplsql.sql file is located in the <build folder>/ses>/dbsrvr/oracle/ and <build folder>/ses/siebsvr/sqltempl/ folders.

      NOTE:  The sqlplus executable is usually located in the ORACLE_HOME/bin folder where ORACLE_HOME is your environment variable that points to the Oracle home directory.

      For example, on the Linux platform:

      Clib.sprintf(cmdString,

      "<absolute path of the sqlplus.exe on the siebel server> <DB table owner username>/<DB table owner password>@<database table owner> @<absolute path of mktg_listimp_callplsql.sql file> %s", vImptJobId);

      The path to the callplsql.sql script is <absolute path to mktg_listimp_callplsql.sql>

      In Siebel Tools, it would look like:

      function CallPLSQL(Inputs, Outputs)

      {

      var vImptJobId;

      var cmdString;

vImptJobId = Inputs.GetProperty("ImportJobId");

Clib.sprintf(cmdString,
"<absolute path of the sqlplus.exe file on the Siebel Server> <DB table owner username>/<DB table owner password>@<database table owner> @<absolute path of callplsql.sql file> %s", vImptJobId);

Clib.system(cmdString);

return (ContinueOperation);

}

  1. When you have finished editing the script attribute, deploy the business service to the Siebel runtime repository.

Creating the Database Directory and Uploading the File to the Database Server

Use the following procedure to create the IMPORT DIR database directory.

To create the IMPORT DIR database directory

  1. On the database server, create a database directory using the following command:

    SQL> CREATE OR REPLACE DIRECTORY IMPORT_DIR AS <DIR_PATH>';

    For example: CREATE OR REPLACE DIRECTORY IMPORT_DIR AS '/TMP';

    SQL> GRANT READ,WRITE ON DIRECTORY 'IMPORT_DIR' TO PUBLIC;

  2. Verify that you have read/write permission for the IMPORTDIR database directory.
  3. Upload the .txt file that contains the contact records to the folder on the database server that is mapped to the MPORT_DIR database directory (designated as '/TMP' in Step 1).
  4. Give the IMPORT_DIR (/TMP) read/write permission for the TBLO user (the database table owner).
  5. Give all the attached files read/write permission.
  6. Grant CREATE/DROP table privileges for the database table owner.

Creating the PL/SQL Package on the Database Server Manually

  1. Navigate to the /build/ses/dbsrvr/oracle folder, and untar the MktgListImportPkg.tar file to that directory.
  2. Use the instructions in the Readme.txt file to manually create the PL/SQL package on the database server.
  3. When the package has been successfully created on the database, navigate to the folder with the untarred folder and look for the mktg_listimp_pkg_body.log and mktg_listimp_pkg_spec.log files. If the file contains errors (such as TNS entry not valid... and so on), rerun the executable.

    If the mktg_listimp_pkg_body.log file contains the "Warning: Package Body created with compilation errors" error message, check with your administrator.

Siebel Marketing Installation and Administration Guide Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices.