I added a new connection in the tnsnames.ora on the server but I am getting the error below
tns could not resolve the connect identifier specified
Does anyone have any idea on what can be the issue. I have not restarted the server after updating tnsnames.ora
The old connections are still working but not the new one.
Related
Getting following exception two week once in PROD, when calling azure function from core api 3.1.
Below issue occurred when establishing the connection with oracle DB using ADO.Net. especially when executes the conn.open().
OracleConnection conn = new OracleConnection(connStr);
conn.Open();
OracleCommand cmd = new OracleCommand(strSQLQuery, conn)
{
CommandType = CommandType.Text
};
OracleDataReader odr = cmd.ExecuteReader();
Once restarted the app service from azure portal, it would be resolved.
Error - ora-12545 network transport unable to resolve connect hostname.
Please check if below can be worked around.
If you are using the tnsname.ora,Please make sure its configured
correctly. Check tnsname.ora file for prod and check for
servername,See if the prod listener exists in listener.ora file, it
must be missing.So try to add the listener for prod environment similar to dev
,if present.
If the Connection string had DNS name, try replacing it with IP
address. Try to use user service name as they have different names for
product and dev separately which can be useful even if SID is same
(in some cases).Always Ensure that the host field of the local_listener is
properly set to a name which can be resolved by the Oracle client.
Or
Try to update host files to contain the requird server and host port.
Go to
\etc\hosts . Insert server name and
server IP in here and save.
Also check the .net version , it may be incompatible sometimes,
maybe that’s why , after restarting ,its setting itself and the
problem is resolved in azure app service.or Some times issue maybe
due to firewall being restricting in azure portal.
You can raise a support request from overview page from troubleshoot blade ,if the issue still remains.
Reference:
oracle - Stack Overflow
today I moved my webapp project from my desktop pc to my laptop, I literally only zipped everything and moved it to this other system,
the database name and the schema is the same, so the application properties file should still have the correct parameters to connect,
but it gives me
java.net.ConnectException: Connection refused: connect
I already triedup dating maven, the project, restarting the listener of the database, if I connect from sqlDeveloper it works
here's the application properties:
# OracleDB connection settings
spring.datasource.url=jdbc:oracle:thin:#//localhost:1521/orcl.station
spring.datasource.username=C##GEST_SHOP
spring.datasource.password=admin
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
the only difference between the dbs is that this one on the laptop doesn't need a password to connect, of course I aleady tried removing it from the application properties but it still doesn't work
please help
I found the error, this new database is on the port 1522 instead of 1521, i can't run a test tho because oracle is giving me other stupid connection errors on sqlDeveloper like doesn't know the SID which is total bs because I successfully connected before on those properties, damn I hate oracle
I have a windows forms app, in which I am trying to connect to Oracle 11g DB with OracleManaged driver, which ends with an exception "ORA-12154: TNS:could not resolve the connect identifier specified". However when I am trying to connect through ODP.NET 64bit dlls, it is connecting (for this I ensured building the app in x64). The sample code below. If I toggle to second statement, I am getting the error while opening the connection.
Oracle.DataAccess.Client.OracleConnection con = new Oracle.DataAccess.Client.OracleConnection();
//Oracle.ManagedDataAccess.Client.OracleConnection con = new Oracle.ManagedDataAccess.Client.OracleConnection();
con.ConnectionString = "Data Source=v3;User Id=xxx;Password=xxx;";
con.Open();
MessageBox.Show("Done");
con.Close();
Is there a setting I am missing? Even I tried with the configure.bat that came along with manaed ODP (64bit)
The reason is simple, your managed driver does not know where to find the TNSNAMES.ORA. Oracle says it depends on environment variables.
What we do here is to set TNS_ADMIN environment variable to the folder containing the TNSNAMES and everything works perfectly.
This is the best solution since it allows you not having multiple instances of TNSNAMES.ora on your station...
I got this worked by copying the tnsnames.ora file to bin folder. It seems like the managed driver couldn't find the right tnsname.ora file.
I have installed multiple oracle (homes) clients on my server including 10g and 11g . When using SQL PLUS 11G client I am getting error "TNS:protocol adapter error."
I checked TNSNAMES.ora to resolve the issue. I found that TNSNAMES.ora in the network/admin directory for 11G home is having some values which is identical to a different tnsnames.ora on a different server from which I am successfully able to connect to the server.
I also get to know about a default TNSNAMES.ora for the entire system but not sure where I can find it.
I tried tnsping orcl but got error "TNSPING is not recognized as an internal or external command".
I am new to Oracle, please help
When I am trying to establish the connection to remote DB from JSP, I get the error TNS:could not resolve the connect identifier specified
I have configured the ODBC driver and tested the connection and it is working fine. Even the DB is also working fine. The only problem that I am facing is while connecting to remote DB from JSP using JDBC connections.
Also checked TNSNAMES.ORA and SQLnet.ora files, they are fine.
Please help me in getting this problem resolved.
Thanks
If you use JDBC OCI driver, verify your ORACLE_HOME variable (and TNS_ADMIN if exists) and be sure you can connect using sqlplus.
Check your URL http://docs.oracle.com/cd/E11882_01/java.112/e16548/urls.htm#BEIDBFDF