Why does the system generated TNSNAMES.ORA have two entires, one with a full connect descriptor and another with just a network address? My TNSNAMES.ORA file was auto-generated when I installed my database. It generates with two entries for my database however. One entry looks "complete" with a full connect descriptor, while the 2nd entry is just the network address of the listener.  What's the difference between the two and when would you use one versus the other?

DB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = db2)
    )
  )

LISTENER_DB2 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
No, it generated 1 entry for the database (DB2), and another for the listener (LISTENER_DB2). 

Then your local_listener parameter was set to LISTENER_DB2, so your database could use this address to find the listener and register into it, since it is not listening on the default port (1521).