Use tnsnames.ora in Oracle SQL Developer
- In SQLDeveloper browse
Tools --> Preferences
, as shown in below image. - In the Preferences options
expand Database --> select Advanced --> under "Tnsnames Directory" --> Browse the directory
where tnsnames.ora present. - Then click on Ok,
as shown in below diagram.
tnsnames.ora available atDrive:\oracle\product\10x.x.x\client_x\NETWORK\ADMIN
Now you can connect via the TNSnames options.
How to set tnsnames.ora location for SQL Developer in Windows 10
The sequence of checks you mentioned is correct. To see what the tool is using there's 2 choices
1 - In a worksheet type "show tns"
SQL> show tns
TNS Lookup locations
--------------------
Location used:
-------------
/Users/klrice
Available TNS Entries
---------------------
SQL>
2 - Also in the worksheet issue this command.
setloglevel oracle.dbtools.raptor.utils INFO
Blog post with details here : http://krisrice.io/2008-04-16-it-seems-to-come-up-often-that-some/
tns_names.ora file not showing in pl/sql developer
Create an environment variable named TNS_ADMIN that points to the directory of the tnsnames.ora file you wish to use. Installing another Oracle product with its own home can often confuse clients using tnsnames.
Oracle TNS names not showing when adding new connection to SQL Developer
SQL Developer will look in the following location in this order for a tnsnames.ora file
- $HOME/.tnsnames.ora
- $TNS_ADMIN/tnsnames.ora
- TNS_ADMIN lookup key in the registry
- /etc/tnsnames.ora ( non-windows )
- $ORACLE_HOME/network/admin/tnsnames.ora
- LocalMachine\SOFTWARE\ORACLE\ORACLE_HOME_KEY
- LocalMachine\SOFTWARE\ORACLE\ORACLE_HOME
To see which one SQL Developer is using, issue the command show tns
in the worksheet
If your tnsnames.ora file is not getting recognized, use the following procedure:
Define an environmental variable called TNS_ADMIN to point to the folder that contains your tnsnames.ora file.
In Windows, this is done by navigating to Control Panel > System > Advanced system settings > Environment Variables...
In Linux, define the TNS_ADMIN variable in the .profile file in your home directory.
Confirm the os is recognizing this environmental variable
From the Windows command line:
echo %TNS_ADMIN%From linux:
echo $TNS_ADMINRestart SQL Developer
- Now in SQL Developer right click on Connections and select New Connection.... Select TNS as connection type in the drop down box. Your entries from tnsnames.ora should now display here.
Related Topics
How to Connect an Existing SQL Server Login to an Existing SQL Server Database User of Same Name
How to Rename a Column in a Database Table Using SQL
How to Add a Not Null Column Without Default Value
SQL Return Only Duplicate Rows
Between Clause Versus <= and >=
Postgresql Prefix Wildcard for Full Text
Cumulating Value of Current Row + Sum of Previous Rows
T-SQL Conditional Where Clause
Oracle: Getting Maximum Value of a Group
Seed Data with Old Dates in Temporal Table - SQL Server
Database/SQL Tx - Detecting Commit or Rollback
How to Change a Table Name Using an SQL Query
What Should Be the Best Way to Store a Percent Value in SQL-Server
How to List User Defined Types in a SQL Server Database
Turn Off SQL Logging While Keeping Settings.Debug
Oracle "Ora-01008: Not All Variables Bound" Error W/ Parameters