Jump to: navigation, search

Difference between revisions of "HowTo:Connect To Oracle With A Workflow"


(Example)
Line 30: Line 30:
 
Connecting to an Oracle database and fetching data with the [[Activity:CreateOLETableScope (Activity)]]<br />
 
Connecting to an Oracle database and fetching data with the [[Activity:CreateOLETableScope (Activity)]]<br />
 
[[File:ora_example_worfklow.JPG|440px|border|alt=Example Workflow|Example Workflow]]<br />
 
[[File:ora_example_worfklow.JPG|440px|border|alt=Example Workflow|Example Workflow]]<br />
 +
{{FileLink|oratest.uwf|Download Workflow example}}
  
{{FileLink|oratest.uwf|Example Workflow}}
+
Connecting to oracle DB and reading data with a CreateOLEQueryScope
 
+
{{FileLink|example_workflow_sql_statement.uwf|Download Workflow example using a SQL Statement}}
<br/><br/><br/>
+
 
+
Connecting to oracle DB and reading data with a CreateOLEQueryScope: [[Media:example_workflow_sql_statement.uwf|Example SQL Statement Workflow]]
+
 
<br/>
 
<br/>
  
 
[[Category:How-To|Connect To Oracle With A Workflow]]
 
[[Category:How-To|Connect To Oracle With A Workflow]]
 
[[Category:OLE|Connect To Oracle With A Workflow]]
 
[[Category:OLE|Connect To Oracle With A Workflow]]

Revision as of 09:16, 20 May 2015

UBIK® uses OLEDB to connect 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:
    • Locate the file tnsnames.ora in the directory [ORACLESOFTWARE]\network\admin\
    • 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)
     )
    )
  2. Use the CreateOLEOracleScope (Activity) activity to configure the connection via the arguments:
      • the Oracle database DataSource
      • the InitialCatalog
      • UserName and Password
  3. 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.
  4. Use a ForEach<DataRow> activity to iterate over the records fetched from the table.
  5. A column of the recordset (table) can be accessed by its index.

Example

Connecting to an Oracle database and fetching data with the CreateOLETableScope (Activity)
Example Workflow
IC FileLink Download.png Download Workflow example

Connecting to oracle DB and reading data with a CreateOLEQueryScope IC FileLink Download.png Download Workflow example using a SQL Statement