I have installed oracle client winx64_12102_client and configured tnsnames.ora . when I try to login with connect with sqlplus /nolog and then connect enter username and password.
It gives me error
ORA-12560: TNS: protocol adapter error.
I have been through many forums and have set ORACLE_HOME, PATH and TNS_ADMIN, but I am still getting the error.
In the Oracle net configuration assistant when i test if I am able to connect to database. the test succeeds, but in sqlplus I get this error
For client
I used username as username#servicename and password and then it worked.
Related
I am able to connect to Oracle DB using Toad with Datasource name and username/password. Oracle client 12 as Oracle driver. oracle database path is set properly in the environment variables. sqlnet.ora, listener.ora and tnsnames.ora is present in ORACLE\ORANT\NETWORK\ADMIN folder and configured properly. I tried to query using Sqlplus in cmd prompt using following command:
connect User/pass#dw-prod.server.int:1527/pdw1s_servicename
I am getting ORA-12170: TNS Connect timeout error. Please help.
In SQL*Plus, just need to connect using the TNS alias.
connect user/password#tns_alias
If your password contains specific characters like # or ! probably you are getting the error for this
Connecting through Oracle SQL Developer(version 18.2.0.183) using wallet files(cwallet.sso and ewallet.p12) we are getting the following error “ORA-12154:TNS:could not resolve the connect identifier specified “when we test the connection via Advanced connection type in SQL Developer. We are using “jdbc:oracle:oci:/#NAME”. We are able to connect using SQLPLUS using “sqlplus /#NAME”. This is on a Mac(High Sierra) with the Instant Client Version 12.2.0.1.0.
https://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
We have the TNSNAMES.ora and SQLNET.ora files configured and the wallet is set and working fine with SQLPLUS.
Is there anything we should look at to troubleshoot this further? Or any workarounds you might suggest?
Thanks,
Tom
Same advice I gave on the OTN forums -
make sure SQL Developer is reading the TNSNAMES file you think it is.
show tns
connect hr/oracle#orcl -- execute in a sqlworksheet with F5
TNS Lookup locations
--------------------
1. USER Home dir
C:\Users\jdsmith
Location used:
-------------
C:\Users\jdsmith
Available TNS Entries
---------------------
LISTENER_ORCL12C
ORCL
ORCL12C
Connected.
Connection created by CONNECT script command disconnected
If that fails, try EZCONNECT syntax
connect hr/oracle#server:port/SID
Also, there is a TNS connection type you can use. If OCI is enabled in preferences, your connection will be 'thick' and use sqlnet and tnsnames ora files.
I must have searched the entire net for a solution but no success.
I have installed a DeveloperDay prebuilt Oracle Linux 7.3 form the following site: http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html
I am able to connect to the database through SQL Developer using configurations like
Connection type : Basic
Username : scott
Password : oracle
hostname : localhost
Port : 1521
Service name : orcl
Connection is successful and I am able to query properly.
But while trying to connect from jdbc from eclipse I am unable to connect. I am getting various errors for various attempts like
jdbc:oracle:thin:#localhost:1521:orcl
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
jdbc:oracle:thin:#localhost:1521:orcl12c
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
(username and password is entered as scott and oracle respectively)
jdbc:oracle:thin:#127.0.0.1:1521:orcl12c
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
Please help to resolve this issue.
Because you try to access to a distance database, you consider VM like it is localhost and this is wrong, in fact it is another machine.
To solve this problem you should to use the IP Address of this VM not localhost, and this not easy you should to make some configuration of your VM you can follow this manuals here:
How to access Oracle DB in VirtualBox from Host (windows) and How to access localhost on Virtualbox host machine
and here
Connecting to Oracle from Your Host to a VirtualBox Guest
Hope this can help you.
I want to connect with my Oracle database without installing Oracle Client.
I downloaded:
"Instant Client Package - Basic" and
"Instant Client Package - SQL*Plus"
Then I created folder on C:\Oracle\instantclient, where I extracted all packages.
I have been set system environment like:
Path - C:\Oracle\instantclient
NSL_LANG - with properly key
ORACLE_HOME - C:\Oracle\instantclient
ORACLE_SID - C:\Oracle\instantclient
TNS_ADMIN - C:\Oracle\instantclient
Then I created tnsnames.ora file with configuration in C:\Oracle\instantclient
and when I puted a command to cmd:
sqlplus user/password #HOST
I have a message like:
ERROR:
ORA-12560: TNS:protocol adapter error
but when I tried like:
sqlplus user/password#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=address to host)(Port=1521))(CONNECT_DATA=(SID=address to SID)))
everything works properly. Why SQL have a problem with recognize tnsnames.ora file?
Your command should be:
sqlplus user/password#HOST
with no space between the password and #HOST part.
With the space it treats the #HOST as a script to execute once you've logged in, and it tries to connect locally, which produced that TNS error. (As you don't log in the HOST isn't ever evaluated to establish if it exists, so it's effectively noise at this point).
C:\>sqlplus -l -s x/y #HOST
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
With the space removed it looks for HOST as a TNS alias:
C:\>sqlplus -l -s x/y#HOST
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
For me that still gets an error since I don't have HOST in my tnsnames.ora, but it's a different error and you can see it's at least trying to use it as a TNS alias. If you have it defined properly it will be able to connect to your database.
NEVER edit $ORACLE_HOME/network/admin/tnsname.ora manually, use "netmr" to create Local Name.
Don't know why it's same but do not work.
This commando works fine for me:
sqlplus /nolog
connect username/password#hostname:port/SERVICENAME
I'm trying to define a database link on oracle 10.2 with connection identifier that throws the error in the question header.
I have the connection identifier (service name) in my tnsnames.ora file.
I can connect with sqlplus using this service name. no problem.
This is the creation sql:
create database link dev1.REGRESS.RDBMS.DEV.US.ORACLE.COM
connect to user1 identified by pass1
using 'dev1';
select using the link:
select * from t_users#dev1;
I get: ORA-12154: TNS:could not resolve the connect identifier specified
connecting to oracle with sqlplus to the 'unidentified' service (with no problem):
sqlplus user1/pass1#dev1
I defined another link to the same database I'm woking in (loopback) - works OK.
I read and tried anything I could find about the subject but did not solve this.
Any suggestions?
Try:
create database link dev1 connect to user1 identified by pass1 using 'dev1';
Also note that a tnsnames.ora entry for dev1 has to exist on the database server that you're linking from.