Prerequisite : Before working with DB from Ui Path Studio (ORACLE)

Hello,

I am trying to connect Database for the first time from my laptop. How to setup DB/ODBC or any perquisite setup before start working in DB. I know the use of all the activities in Studio to connect DB and perform operation, but need detailed information about the Prerequisite. Please note DB is not present in local machine, but I need to access it from local machine.

ERROR : Data source name not found and no default driver specified

  • Prerequisite for DB Connection (Before working on connect/disconnect etc. activities?
  • What details of DB are required? (Like hostaname, UN, PW or type of Server etc.)?

@loginerror @Palaniyappan @nadim.warsi - Any help will be great.

@Lahiru.Fernando

HI @Ashish6541

I sometimes use this concept of creating the DB connection in the ODBC Data Sources in Windows. Then I use that connection within the Connect activity. This is much more easier…

Have you tried this?

@Ashish6541

Which DB are you trying to connect?

SQL / Oracle / any other database?

Thanks

@Lahiru.Fernando - I am looking into some setup to get data from DB. So if the concept of creating DB Connection in ODBC Data source is easy, then let’s take this way. But this is Oracle DB, which I am trying to connect.

I have not tried. How to do that?

@ksrinu070184 - Oracle

I am able to connect with all prerequisite. We can achieve it by two ways.

Way 1:

  • Download Oracle Instant Client From https://download.oracle.com/otn_software/nt/instantclient/19900/instantclient-basic-windows.x64-19.9.0.0.0dbru.zip
  • Extract it place in C Drive
  • Copy the path of main folder of this extracted folder
  • Add copied path to System Variable “Path”
  • Create new variable “TNS_ADMIN” and Value will be copied path from previous step
  • Create a file as tnsnames.OAR
  • Add this code to that file
    your source name =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Your hostname)(PORT = your port name))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = your service name)
    )
    )
  • Replace your DB Specific Info
  • Save this file in the path specified in the Environment Variable
  • Search in window search option - ODBC Data Source (32 bit)
  • Select “System DSN”
  • Click on “Add”
  • Select Oracle Driver
  • Add Data Source Name
  • Select DNS Service Name
  • Add User ID
  • Click on Test Connection
  • Add Password
  • Click on OK
  • Drag Connect activity
  • Click on Configuration Connection
  • Click on Connection Wizard
  • Select MS ODBC Data Source
  • Select creation ODBC data source under Use user or system data source name
  • Enter UN
  • Enter Password
  • Test Connection
  • Ok

Way 2:

  • Download Oracle Instant Client From
    https://download.oracle.com/otn_software/nt/instantclient/19900/instantclient-basic-windows.x64-19.9.0.0.0dbru.zip
  • Extract it place in C Drive
  • Copy the path of main folder of this extracted folder
  • Add copied path to System Variable “Path”
  • Create new variable “TNS_ADMIN” and Value will be copied path from previous step
  • Drag Connect Activity
  • Add to Connection String Properties,
    “Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = YourHostName)(PORT = YourPortNumber)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME=YourServiceName)));User Id=YourUN;Password=YourPW;”
  • Save
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.