Oracle Net and Connectivity
Oracle Net and Connectivity covers how clients find and connect to a database: naming methods, the listener, and the error codes that identify which link broke.
Naming and configuration files
tnsnames.ora maps an alias to a connect descriptor with ADDRESS (PROTOCOL, HOST, PORT) and CONNECT_DATA (SERVICE_NAME, or SID in older setups). sqlnet.ora sets NAMES.DIRECTORY_PATH, for example tnsnames, ezconnect, ldap. listener.ora defines the listening endpoints and, optionally, a SID_LIST for static registration. Easy Connect (host:port/service) needs no client files at all.
Registration
PMON registers each started instance with the listener named by LOCAL_LISTENER, defaulting to host:1521; service names come from SERVICE_NAMES, and DBMS_SERVICE can add services with their own attributes. Static registration in SID_LIST matters when the instance is not open, for example remote startup with RMAN or connections during NOMOUNT.
Worked example
A client reports ORA-12514: TNS:listener does not currently know of service requested. The listener is reachable, so either the CONNECT_DATA value is wrong or the instance has not registered; check lsnrctl status for the service and verify LOCAL_LISTENER. By contrast, ORA-12541 means nothing is listening at that address, and ORA-12154 means the alias could not be resolved at all, which is a tnsnames or NAMES.DIRECTORY_PATH problem and not a listener problem.
Traps
Mixing SERVICE_NAME and SID; editing tnsnames.ora on the server when the client resolves from its own copy; assuming a listener.ora entry is needed when dynamic registration is used; forgetting LOCAL_LISTENER when the listener runs on a non-default port; expecting shared-server connections without dispatchers.