18

We use the 'Oracle.ManagedDataAccess' ODP.NET driver for database access to Oracle.

When connecting to the database with the connection string:

Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=10.40.40.38)(Port=1521)))(CONNECT_DATA=(SERVICE_NAME=D3T))); User Id=test; Password=test'

Internal error message:

OracleInternal.NotificationServices.ONSException**: ONS: No node lists have been configured' after opening the connection.

code:

string connect = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=10.40.40.38)(Port=1521)))(CONNECT_DATA=(SERVICE_NAME=D3T))); User Id=test; Password=test";
OracleConnection connection = new OracleConnection(connect);
connection.Open();

The connection to the database is working fine. But what is internally wrong with the configuration?

9
  • Does this page help? Commented Jan 9, 2018 at 15:07
  • The ONS service is not started or configured on the Oracle server. Why do I get this error? Commented Jan 10, 2018 at 9:54
  • The ons. config on the server has the following content: localport=6150 remoteport=6250 nodes=10.40.40.38:6250 But the ONS service (onsctl) is not started. Commented Jan 10, 2018 at 9:57
  • I get this after switching from Devart to the Oracle .NET Core 2 beta driver. Commented Jun 4, 2018 at 20:14
  • 1
    I have the same issue when I starting my application. I get 'OracleInternal.NotificationServices.ONSException' in Oracle.ManagedDataAccess.dll six times when I openning the connection. Commented Sep 4, 2018 at 8:25

5 Answers 5

8

I found this link helpful: https://www.databaseusers.com/article/6046913/ONS%3A+No+node+lists+were+configured

Basically, you need to configure ONS, or disable LoadBalancing and HAEvents like so:

Oracle.ManagedDataAccess.Client.OracleConfiguration.LoadBalancing = false;
Oracle.ManagedDataAccess.Client.OracleConfiguration.HAEvents = false;
Sign up to request clarification or add additional context in comments.

Comments

6

We configure the OracleConnection with a single connection string (without any xml).
Setting those two parameters is possible using the following names, the other parts are for example and not relevant for this problem.

Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mydbhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myservicename)));load balancing=false;ha events=false;Min Pool Size=1;Incr Pool Size=1;user id=mydbuser

Comments

5

Thanks to Jacob Peterson.

But if you are unable to find the mentioned setting in C# code then configure your config as below. "Add settings if the block is already there"

<oracle.manageddataaccess.client>
    <version number="*">
      <settings>
        <setting name="LoadBalancing" value="false" />
        <setting name="HAEvents" value="false" />
      </settings>      
    </version>   
  </oracle.manageddataaccess.client>

1 Comment

this eliminates error. But what does It mean anyway, I don't understand It at all ?
2

I am using ODP.NET Managed Client for years and never saw those OSN exceptions until recent updates when migrating to .NET Core and using Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.Core Nuget packages.

Thanks to Jacob Peterson and other members who suggested to either ignore or disable the both properties "LOAD BALANCING=False;HA Events=False". Each one generates 3 exceptions if enabled on opening connection.

I assume that the new releases suppose that those features are enabled regardless if the server and/or connection string were prepared for that.

So, I suggest to ignore them or append disabled values to the connection string.

Comments

-1

I faced the same issue and fixed it if I add "load balancing=false;ha events=false" in my conn string.

1 Comment

This is the same solution as in this other answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.