Role of TNS in Oracle
What is TNS?
TNS is a part of Oracle Net. It is a tool used to manage and configure the connection between the Oracle database and the client. In most cases, to communicate with the database, TNS must be configured, of course, in a few cases, you can connect to the Oracle database without configuring TNS, such as through JDBC. if you use TNS to connect to Oracle, the Oracle client must be installed on the client.
When to use TNS
As mentioned above, TNS is required for non-JDBC connection to ORACLE. In addition, when the local database client connects to data, the host string is the locally specified service name, not the database SID, note This. The client software of TNS must be specified, including PL/SQL and SQL * PLUS.
As mentioned above, TNS is used in non-JDBC and other connection modes. In other words, TNS does not need to be configured when data is directly connected using JDBC or other methods, such client tools include SQL Developer. These clients connect to the database using some Development Speech such as JAVA and other JDBC methods, so you do not need to configure TNS.