Quantcast
Channel: OracleDB – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 20

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

$
0
0

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


Filed under: .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

Viewing all articles
Browse latest Browse all 20

Trending Articles