How to resolve a Listener refused connection error - 10.x

Symptoms

While testing connectivity to a data source profile, you get the following issue:

Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Cause

The database name you provided was incorrect and/or the listener definition and mapping contains a different name (SID).

Resolution

Contact your database administrator to obtain the proper SID for the database you are trying to connect with.