Jump to: navigation, search

Connect To Oracle With A Workflow


Revision as of 12:35, 11 February 2015 by KNO (Talk | contribs)

UBIK® uses OLEDB to connecti to Oracle via TNS (Transparent Network Substrate), therefore it is necessary to configure the connection to the server on your local environment prior to connecting to an Oracle database.

[edit]

Instructions

  1. Configure the Oracle server in the TNS Names of your Oracle client:
    1. Locate the file tnsnames.ora in the directory [ORACLESOFTWARE]\network\admin\
    2. Configure the connection and call it (like in this example TESTDB):

TESTDB=

(DESCRIPTION =
  (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(Host =AUGTESTORACLE.cloudapp.net)(Port = 1521))
  )
(CONNECT_DATA =
  (SERVICE_NAME = UBIKTEST)
)

)

  1. Use the [[CreateOLEOracleScope (Activity)}} activity to configure the connection via the arguments:
    • the Oracle database DataSource
    • the InitialCatalog
    • UserName and Password
  2. Use the CreateOLETableScope (Activity) activity or a CreateOLEQueryScope (Activity) to define the table you want to fetch data from. Set the tablename in the DisplayName argument.
  3. Use a ForEach<DataRow> activity to iterate over the records fetched from the table.
  4. A column of the recordset (table) can be accessed by its index.

Example Workflows

Connecting to an Oracle database and fetching data with the CreateOLETableScope activity
Example Workflow
Oratest.uwf


Connecting to oracle DB and reading data with a CreateOLEQueryScope: Example workflow sql statement.uwf