OracleInstance & database
Listener registration and services
Which listeners the instance registers with and which services it offers on every node. When clients get ORA-12514, the service they ask for is missing from this list or the listener parameters point somewhere else.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 200 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN name FORMAT A204COLUMN value FORMAT A120 WORD_WRAPPED5 6SELECT name, value7FROM v$parameter8WHERE name IN ('local_listener', 'remote_listener', 'service_names')9ORDER BY name;10 11COLUMN service FORMAT A4012COLUMN network_name FORMAT A6013SELECT inst_id, name AS service, network_name14FROM gv$active_services15ORDER BY inst_id, name;Save it as ora-listener-reg.sql and run it with SQL> @ora-listener-reg.
Open in denrepoRelated tool: Connection string builder
Helps with
- ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
- ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Part of these runbooks
More Oracle scripts: Instance & database
- Instance status on every nodeHost, instance, version, status, whether logins are allowed, startup time and archiver state for every instance. A quick RAC-wide check after a…
- Working with the spfileShows which spfile the instance is using, where parameter files live and the order Oracle searches for them, and what SCOPE = MEMORY, SPFILE and BOTH…
- Database and instance overviewOne row per instance: host, version, uptime, role, open mode, archive log mode and whether it's a CDB. The first thing to run when you land on an…
- Non-default initialization parametersEvery parameter that has been changed from its default. Handy for comparing two databases or documenting a build.
- Processes and sessions against their limitsCurrent and peak usage of processes, sessions and transactions since startup. A PEAK % near 100 means the next connection storm will hit ORA-00020.
- Installed components and their statusEverything in DBA_REGISTRY. Anything not VALID after a patch or upgrade needs attention before you hand the database back.