NET: Invalid SID

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ajcastineira
Posts: 4
Joined: Wed 11 Jul 2007 17:24

NET: Invalid SID

Post by ajcastineira » Sun 29 Jul 2007 22:35

Good afternoon.

I'm getting this error: CoreLab.Oracle.OracleException: NET: Invalid SID.

I'll like know if you can help me to solve this problem?, I'm Connecting to the Oracle server in Direct mode

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 30 Jul 2007 06:45

I will gladly help you. The problem is that you specified invalid SID in the connection string.
For example, if you have the following record in tnsnames.ora file:

Code: Select all

ORA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DB)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL920)
    )
  )
your connection string shoul read:

Code: Select all

Data Source=DB;SID=ORCL920;Port=1521;Direct=true;User ID=;Password=

ajcastineira
Posts: 4
Joined: Wed 11 Jul 2007 17:24

Thanks, but thats not the problem.

Post by ajcastineira » Mon 30 Jul 2007 13:38

Good morning.

My connection string is according to the values of the TNSNAMES.ORA.

The Error of Invalid SID, appears after making multiple connections to the database server.

I see that after several connections, a new connection can't be established, and then throw the exception.

There is a way to avoid this?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 30 Jul 2007 15:06

I see that after several connections, a new connection can't be established, and then throw the exception.
How many connections do you establish? There is a server restriction on maximum number of connections.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 30 Jul 2007 15:08

I see that after several connections, a new connection can't be established, and then throw the exception.
How many connections do you establish? There is a server restriction on maximum number of connections.

ajcastineira
Posts: 4
Joined: Wed 11 Jul 2007 17:24

Post by ajcastineira » Mon 30 Jul 2007 16:34

Between 20 and 50, they are for a Web Solution, that will be used by more than 200 users.

I use a Businesses Rul to control all the communication with the database, and when I finish using a connection I Execute Connection.Close() and Connection.Dispose(). what I think is that these connections are really closed after some minutes.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 31 Jul 2007 05:31

Try to set Pooling=false in your connection string.
If the problem persists, send me a test project to reproduce the problem. It is desirable to use 'scott' schema, otherwise include definition of your own database objects.
Use e-mail address provided in the Readme file.
Do not use third party components.

Post Reply