The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,865 other followers

Archive for October 27th, 2015

The curse of “ORA-12560: TNS:protocol adapter error”

Posted by jpluimers on 2015/10/27

Today it is about the curse of

ORA-12560: TNS:protocol adapter error

Don’t you love the overly generic error messages you often get, especially from Oracle.

We log the additional information which doesn’t bring much help either:

Errors:Oracle.DataAccess.Client.OracleErrorCollection; Number: 12560

There is so much that can cause the Oracle 12560 error (including spurious SSL things), that it is often like searching for a needle in a haystack.

What in fact happened is that in a few of our .NET config files got empty ConnectionString attributes for Data Source, User Id and Password as this fragment shows:

connectionString=”Data Source=; User Id=; Password=;”

The cause was a parameter substitution step in our build process where we generate each config file based on templates. It failed on some of them as this simple grep query can reveal:

grep -ind connectionstring\=.*\=; *.config
grep -indl connectionstring\=.*\=; *.config

The first one shows the files and lines, the second one only the files.

So we now have some guarding in place that will prevent these attributes to become empty.

–jeroen

Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Database Development, Development, OracleDB, Software Development | Leave a Comment »

 
%d bloggers like this: