tns-check for tnsnames.ora

drop tnsnames.ora here-ish
tns-check: drop another file as needed
{{errors}}

{{file.name}}

{{file.lastModifiedDate | date}} {{file.size | bytes}} {{entries.length}} Entries

{{parseErrors.length}} Possible Syntax Errors


  • Entry {{error.alias}}, Line {{error.line}} Column {{error.column}}: {{error.msg}}

Based on Oracle 11g R2 Syntax
Unable to collect TNS entries or there were no TNS entries present

This often happens if there were multiple errors in your file and the parser is unable to complete.

Another common reason is parsing a different type of .ORA file which may not be supported.



Show Hide Text
{{entry.alias}}
Hide Show Attributes
  • {{key}}: {{entry[key]}}
{{entry.rawText}}
Copy to Clipboard

What should I do and why use this?


This application explores tnsnames.ora files which can often become unmanageable or disconnected. Once you have located your tnsname.ora you can drop the file in the area above. The file is then parsed and exposed in the browser checking syntax and allowing for search and filtering.

tnsnames.ora files in general are pretty boring and you never really have to deal with them but when the time comes to crack them open they can be annoying. This application exposes their structure offing possible syntax issues and tools to organize entries based on a number of criteria.

Please note, no data is sent to a server, a large goal of this application is to keep the text local.

How does it work?


The heart of this application is an Antlr4 tnsnames.ora parser. Thankfully Antlr4 has a JavaScript 'grammar' export ability which we leverage to parse the tnsnames.ora structure into the browsers memory.

Once in memory, we can perform several cleanup actions like alerting on possible syntax issues in the tnsnames.ora text or manipulating the order of tnsnames.ora entries.

A special thanks goes out to all those who have developed the tnsnames.g4 . This grammar is based on the Oracle 11g Release 2 Network Reference manual

What is a tnsnames.ora file?


The tnsnames.ora file is a configuration file that contains net service names mapped to connect descriptors for the local naming method, or net service names mapped to listener protocol addresses.

A net service name is an alias mapped to a database network address contained in a connect descriptor. A connect descriptor contains the location of the listener through a protocol address and the service name of the database to which to connect.

Clients and database servers use the net service name when making a connection with an application. By default, tnsnames.ora is located in the $ORACLE_HOME/network/admin directory on UNIX operating systems and in the %ORACLE_HOME%\network\admin directory on Windows operating systems.