How to connect to ORACLE Database

Connecting UiPath with Oracle

  1. Go to the following link and download the 32-bit client. Make sure to download the client of the same version as Oracle DB. (In this case, it was 12.1.0.2.0)
    https://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html
  2. Install the downloaded client.
    From the installation options, choose InstantClient.
  3. It will probably be installed under C:\app\Adminstrator\product\12.1.0
  4. Create a tnsnames.ora file with the following data:
    auto_claims=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=10.x x.xxx)(PORT=1521))
    (CONNECT_DATA=
    (SERVICE_NAME=auto_claims)
    )
    )
    Where,
    auto_claims = Service name
    10.x.x.xxx = Host name
    1521 = Port
  5. Place the tnsnames.ora file under C:\app\Adminstrator\product\12.1.0\client_3
  6. Create an environment variable TNS_ADMIN with the value C:\app\Adminstrator\product\12.1.0\client_3
  7. Add the following to path envrionment variable if not already added:
    C:\app\Adminstrator\product\12.1.0\client_3
  8. Open ODBC Data Sources (32-bit) from the Start Menu.
  9. From the User DSN tab, click on Add.
  10. From the data sources, select Oracle in OraClient12Home3_32bit. (It should have been created automatically).
  11. If you face any error, download and install the following:
    Microsoft Visual C++ 2010 x86 Redistributable – 10.0.xxxxx
  12. Click Finish.
  13. Enter the following values:
    Data Source Name: Any name of your choice
    TNS Service Name: auto_claims (same name from tnsnames.ora file)
    User ID: UserID (same from tnsnames.ora file)
  14. Click on Test Connection.
  15. It will prompt for a password. Enter the password and Click OK.
  16. It should say, Connection Successful.
  17. In UiPath Studio, take a Database Connect activity.
  18. Click on Configure Connection.
  19. Click on Connection Wizard.
  20. Click on Microsoft ODBC Data Source and Click OK.
  21. Select the DSN you created before from the Use user or system data source name dropdown.
  22. Provide User name and Password below that.
  23. Click Test Connection. It should be successful.
  24. Select the Provider as System.Data.Odbc
  25. Create a connection object and use it wherever you want!!

Regards,
Hiren

9 Likes