Oracle DBA - what's the difference between the connection strings?

by Vaethin   Last Updated June 19, 2018 15:06 PM

I'm working on a .NET application that is supposed to connect to any OracleDB but I'm a bit stumped, trying to get it to work on different versions.

I originally started with Oracle 11g (Express), trying to connect was actually rather easy, I simply used the following Connection String and it worked: Data Source=hostname:port;User Id=myUsername;Password=myPassword;

I then tried to connect to a 12c and it told me that I didn't specify the service name. This confused the shit out of me because I never had to specify the Service Name in 11 but I looked online and found another Connection String in this format: SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID))); uid=myUsername;pwd=myPassword;. It still didn't work. A colleague gave me the tipp to use the "Global Database Name" instead of the SID (ORCL.domainname.local instead of ORCL) and it worked after we added ORCL.domainname.local to our DomainController's DNS Server's forward lookup zones.

I then went back to 11g did the same things there but turns out using the new Connection String there doesn't work .

While we could probably implement some kind of "trying until it works"-feature in our connection string builder (user specifies the data) this seems like a terrible solution and I don't think it's a good idea. Also at this point we really want to know WHY so we can tell if it's a configuration issue or an absolute version issue.

Anyone care to give me some insight?

Related Questions

Altering the location of Oracle-Suggested Backup

Updated July 03, 2016 08:02 AM

Ways to Schedule Rman backups

Updated February 24, 2017 12:06 PM

EMCA insists that it cannot connect to the service

Updated August 28, 2017 14:06 PM

Password for Oracle Database 18c user “system”

Updated August 02, 2018 06:06 AM