Message "NET: Invalid SID"

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
tremel
Posts: 5
Joined: Thu 24 Jan 2008 15:08

Message "NET: Invalid SID"

Post by tremel » Thu 24 Jan 2008 15:12

Hello CoreLab Team!

we've got problems with OraDirect (4.25.23.0) with an exception message saying "NET: Invalid SID". What is this? We are using a connection string in the format:

Data Source=servername;Direct=true;Port=1521;SID=database;User Id=user;Password=password

What are we doing wrong? Is this a known issue in the version (see above) we are using?

Regards from Munich,
Andreas Tremel

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 24 Jan 2008 15:33

You can get a valid SID from the file “tnsnames.ora”, where SID is taken from SERVICE_NAME parameter. Path to the file: (\network\ADMIN\tnsnames.ora).
In this example connection string contains such SID:

Code: Select all

"...;SID=orcl920;..."
tnsnames.ora
------------------
ORA920 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SERVER)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl920)
)
)

tremel
Posts: 5
Joined: Thu 24 Jan 2008 15:08

Post by tremel » Thu 24 Jan 2008 15:39

Hello Alexey,

Yes, but this is direct mode, do we have a tnsmaes.ora here?

Sorry for my question, but I'm a newbie here.

Regards
Andreas

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 25 Jan 2008 12:41

Code: Select all

user id=scott;server=ORA1010;direct=False;port=1521        // via client
user id=scott;server=db;direct=True;sid=orcl1010;port=1521 //direct
You definitely have this file. It is installed by Oracle client. Search the path specified in the previous post.

tremel
Posts: 5
Joined: Thu 24 Jan 2008 15:08

Post by tremel » Mon 28 Jan 2008 15:33

Hello Alexey,

The Oracle Client is not installed on my system.
I've been searching for tnsnames.ora on my hard disk - I can't find it.

How do I find out the correct Sid then?

Regards,
Andreas

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Tue 29 Jan 2008 14:07

Oracle System Identifier (SID) is set on a database creation in Database Configuration Assistant (on the server side).
You can see it in Control Panel -> Administrative Tools -> Services
For example:

Name
...
OracleServiceORA11
...

Where OracleServiceORA11 = OracleService;
SID = ORA11;

tremel
Posts: 5
Joined: Thu 24 Jan 2008 15:08

Post by tremel » Fri 01 Feb 2008 16:43

Hello Alexey,

ok, this issue is getting strange. Only SOME operations / transactions fail with the sid-error, not all of them. It seems that larger transactions with many INSERT or SELECT statements fail, while smaller ones work perfectly.

Could that be an error in the OraDirect component?

Regards,
Andreas

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Tue 05 Feb 2008 09:02

Hello Andreas,
Do you use distributed transactions?
Does any other application use distributed transactions?
Do you have firewall on the server side?
Probably the server closes some connections because of large size of the packages sent.
Try to localize the problem by splitting large transactions (where you have the exception) into a bunch of smaller ones.

tremel
Posts: 5
Joined: Thu 24 Jan 2008 15:08

Post by tremel » Mon 18 Feb 2008 17:05

Hello Alexey,

no, we don't use distributed transactions, on my test server there are no other applications running. No, there is no server-side firewall, although we have one at the router.

I understand, splitting the transactions will probably identify the cause. However, the transactions we're using are atomic - I can under no circumstances split them in the final version of the product. Unfortunately, your suggestion won't help us. Can the problem be somehow reproduced by the development team of CoreLab? We need a solution, and it's becoming to get urgent.

Regards,
Andreas

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Tue 19 Feb 2008 16:19

Do you use RAC?
Of course you won't split transactions in the final version.
But currently, that might help to find the source of the problem.
If you say that sometimes it works ok and sometimes it fails with the error message.

Yes, we can try to reproduce the problem, but we need a test project.
Please send it to my email (alexeyman*crlab*com).
We will try find out the reason of the problem in the nearest time.

Post Reply