NET: Invalid SID

NET: Invalid SID

Postby 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
ajcastineira
 
Posts: 4
Joined: Wed 11 Jul 2007 17:24

Postby 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=
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Thanks, but thats not the problem.

Postby 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?
ajcastineira
 
Posts: 4
Joined: Wed 11 Jul 2007 17:24

Postby 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

Postby 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.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby 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.
ajcastineira
 
Posts: 4
Joined: Wed 11 Jul 2007 17:24

Postby 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.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle