Introduction Oracle ORA-12514 `TNS:listener does not currently know of service requested in connect descriptor` occurs when the listener cannot find the requested database service. This commonly happens after database restarts, when the PMON process has not yet registered the service, or when the service name in the connection string is incorrect.

Symptoms - `ORA-12514: TNS:listener does not currently know of service requested` - Application cannot connect to Oracle database immediately after restart - `lsnrctl status` shows no service handlers or only `UNKNOWN` services - Connection works with SID but fails with service name - Intermittent connection failures during database startup

Common Causes - Database instance not fully started (PMON not yet registered with listener) - Service name in connection string does not match `SERVICE_NAMES` parameter - Listener running on a different port than configured - Database `local_listener` parameter pointing to wrong listener - RAC node down, service not available on the connected node

Step-by-Step Fix 1. **Check the listener status": ```bash lsnrctl status

# Look for: # Service "ORCL" has 1 instance(s). # Instance "ORCL", status READY, has 1 handler(s) for this service... ```

  1. 1.**Force service registration":
  2. 2.```sql
  3. 3.-- Connect as sysdba
  4. 4.sqlplus / as sysdba

-- Check the service name SHOW PARAMETER service_names; SHOW PARAMETER instance_name;

-- Force PMON to register with the listener ALTER SYSTEM REGISTER;

-- Wait a few seconds and check listener again -- lsnrctl status ```

  1. 1.**Fix the local_listener parameter":
  2. 2.```sql
  3. 3.-- Check current setting
  4. 4.SHOW PARAMETER local_listener;

-- Set correctly ALTER SYSTEM SET local_listener = '(ADDRESS=(PROTOCOL=TCP)(HOST=db-server)(PORT=1521))';

-- Re-register ALTER SYSTEM REGISTER; ```

  1. 1.**Verify the connection string matches the service name":
  2. 2.`
  3. 3.# tnsnames.ora
  4. 4.ORCL =
  5. 5.(DESCRIPTION =
  6. 6.(ADDRESS = (PROTOCOL = TCP)(HOST = db-server)(PORT = 1521))
  7. 7.(CONNECT_DATA =
  8. 8.(SERVER = DEDICATED)
  9. 9.(SERVICE_NAME = ORCL) -- Must match SHOW PARAMETER service_names
  10. 10.)
  11. 11.)

# Or JDBC URL jdbc:oracle:thin:@//db-server:1521/ORCL ```

  1. 1.**Restart the listener if registration fails":
  2. 2.```bash
  3. 3.lsnrctl stop
  4. 4.lsnrctl start

# Wait 30 seconds for PMON to register sleep 30 lsnrctl status ```

Prevention - Include `ALTER SYSTEM REGISTER` in database startup scripts - Monitor listener status with automated health checks - Use connection strings with SERVICE_NAME instead of SID - Set `local_listener` correctly in RAC and Data Guard configurations - Add connection retry logic with exponential backoff for startup periods - Test connection strings after any database restart or failover - Document the correct service names for each database environment