Connecting UiPath with Oracle
- 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 - Install the downloaded client.
From the installation options, choose InstantClient. - It will probably be installed under C:\app\Adminstrator\product\12.1.0
- 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 - Place the tnsnames.ora file under C:\app\Adminstrator\product\12.1.0\client_3
- Create an environment variable TNS_ADMIN with the value C:\app\Adminstrator\product\12.1.0\client_3
- Add the following to path envrionment variable if not already added:
C:\app\Adminstrator\product\12.1.0\client_3 - Open ODBC Data Sources (32-bit) from the Start Menu.
- From the User DSN tab, click on Add.
- From the data sources, select Oracle in OraClient12Home3_32bit. (It should have been created automatically).
- If you face any error, download and install the following:
Microsoft Visual C++ 2010 x86 Redistributable – 10.0.xxxxx - Click Finish.
- 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) - Click on Test Connection.
- It will prompt for a password. Enter the password and Click OK.
- It should say, Connection Successful.
- In UiPath Studio, take a Database Connect activity.
- Click on Configure Connection.
- Click on Connection Wizard.
- Click on Microsoft ODBC Data Source and Click OK.
- Select the DSN you created before from the Use user or system data source name dropdown.
- Provide User name and Password below that.
- Click Test Connection. It should be successful.
- Select the Provider as System.Data.Odbc
- Create a connection object and use it wherever you want!!
Regards,
Hiren