Connect to Remote Oracle Database

I am trying to connect to a remote Oracle database using the following connection string:
“DSN=Oracle DB Connection;Data source=(Source)(HOST={“servername”}(PORT=1521)));Uid=” + sUserName + “;Pwd=”+sPassword+ ";”

(Source) = database name
(HOST) = server name

I am getting the following error:
“Object reference not set to an instance of an object”
“Source = UiPath.Database.Activities”

I an running version 1.4 of the database activities package. Upgrading to 1.5 causes other problems.

I have tried to manually configure the connection string, as well as going thru the Connection wizard. No Joy.

We have several other Oracle database instances on the same server, which I can connect to via SQL Developer

Is using ODBC an option for you?
If so, I have some examples I made with PostreSQL.


If you are using oracle database you can use micorsoft sql server as your data source unless you have created DSN in odbc data sources. Please follow the below connection string to connect the oracle database.

“Data Source=yourServerName;Initial Catalog=DatabaseName;User ID=youruserid;Password=yourpassword”

your servername should be → servername,portnumber

eg: Server url or name,1521

if we have created DSN in ODBC data sources we have to check whether connection succesful in ODBC data sources and follow the below connection statement.

“Data Source=your DSN name;User ID=youruserid;Password=yourpassword” thats it.

please try and let us know. thanks.


Welcome back to UiPath forum

This error looks like some of the varivale passed along the connection string has no value in it
Did we check once with all the variable like whether it is passed with some value
Use a log message or writeline activity with those variables before this sql connect activity and check the value in output panel

Cheers @Skyman1

Thanks. I figured it out. I needed to make a small change to the ORA file.
Once that was done: the connection string was very easy:

String.Format(“Dsn={2};uid={0};pwd={1}”, sUsername, sPassword, “DatabaseName”)

We can close this one out

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