I am having issue with the new TNS connection. I have added the below code in to the tnsnames.ora file. I can verify the connection using the SQL Oracle developer, it is perfect.
c0xlxx =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxx)(PORT=xxxxxxxxx))
)
(CONNECT_DATA =
(SERVICE_NAME = xxxxxxx )
)
)
I did the sameway in the BizTalk application dev environment, it is working perfectly.But when I use in the BizTalk application in test environment using WCF-Custom adapter for OracleDBBinding with URI oracledb://c0xlxx/ it is throwing error
The adapter failed to transmit message going to send port "WcfSendPort_LTMDBBindingtoAX_View_VW_JOB_DEPT_Custom" with URL "oracledb://c0xlxx/". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-12154: TNS:could not resolve the connect identifier specified ---> Oracle.DataAccess.Client.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified Help me out.
Have some diferent properties to conection strings on TNS, you must need to seek the correct for your situation Example:
xxxxxx =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xxxx)
(SID = xxxx)
)
)
Can you send a properties who you entered to connect in SQL Oracle developer. Are you sure if you connect over TNS protocol in SQL Oracle developer
Try tnsping on windows cmd, command tnsping servername yours is c0xlxx. This command look like a ping, but its for oracle db server ping
Related
I have an Oracle instance on a AWS EC2 instance. When I run this in the AWS linux terminal, it is successful.
ubuntu#ip-xxx-xx-xx-xxx:~$ sqlplus user101/pass101#ip-xxx-xx-xx-xxx:1521/XE
However, when I run the same arguments when connecting through cx_Oracle I get a:
"ORA-12154: TNS:could not resolve the connect identifier specified" error
I know some common problems are with the tnsnames.ora file. I've placed that below.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip-172-xx-xx-xx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
~
At the moment the full Easy Connect syntax is being interpreted as a TNS entry.
According to the Connect() documentation, you can use your current code if you specify that you are passing the user argument:
If the user parameter is passed and the password and dsn parameters are not passed, the user parameter is assumed to be a connect string in the format user/password#dsn, the same format accepted by Oracle applications such as SQL*Plus.
So this should work:
connection = cx_oracle.Connect(user="user101/pass101#ip-172-xx-xx-xx:1521/XE")
According to the Oracle connection handling documentation, you could also split that out:
connection = cx_oracle.Connect(
user="user101",
password="pass101",
dsn="ip-172-xx-xx-xx:1521/XE",
encoding="UTF-8"
)
Or if you want to use tnsnames.ora then just give that alias as the DSN value:
connection = cx_oracle.Connect(
user="user101",
password="pass101",
dsn="XE",
encoding="UTF-8"
)
I have recently installed Oracle 19c enterprise edition on Virtual box with host as windows 10 while guest machine in Linux Oracle.
I am able to connect to CDB database both from sqlplus(Installed on Virtualbox i.e. guest machine) and SQLDeveloper installed on windows 10.
But I am unable to connect to PDB database from SQL Developer while I am able to connect it from SQL PLUS i.e. from guest machine using export ORACLE_PDB_SID=testpdb1
In SQLDeveloper I am getting below error message.
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
(CONNECTION_ID=+zZy85nyTtSOaamzG3UnBw==)
When using the service name raido button below error message apprears:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
(CONNECTION_ID=H5R80kOxSAy+Cv74InS7MQ==)
Below are my Listener.ora and Tnsnames.ora
testcdb =
(ADDRESS_LIST=
# (ADDRESS=(PROTOCOL=tcp)(HOST=atif.localdomain)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.29.71)(PORT=1521))
# (ADDRESS=(PROTOCOL=tcp)(HOST=atif)(PORT=1521))
# (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
)
# SID_LIST_<lsnr>
# List of services the listener knows about and can connect
# clients to. There is no default. See the Net8 Administrator's
# Guide for more information.
#
SID_LIST_testcdb=
(SID_LIST=
(SID_DESC=
# #BEQUEATH CONFIG
# (GLOBAL_DBNAME=salesdb.mycompany)
(SID_NAME=testcdb)
(ORACLE_HOME=/f01/app/oracle/product/19.3)
# #PRESPAWN CONFIG
# (PRESPAWN_MAX=20)
# (PRESPAWN_LIST=
# (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
# )
)
)
STARTUP_WAIT_TIME_testcdb=0
CONNECT_TIMEOUT_testcdb=10
TRACE_LEVEL_testcdb=OFF
LOG_DIRECTORY_testcdb=/f01/app/oracle/product/19.3/network/admin
LOG_FILE_testcdb=testcdb
TRACE_DIRECTORY_testcdb=/f01/app/oracle/product/19.3/network/admin
TRACE_FILE_testcdb=testcdb
ADMIN_RESTRICTIONS_testcdb=ON
SUBSCRIBE_FOR_NODE_DOWN_EVENT_testcdb=OFF
Tnsnames.ora
testcdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.29.71)(PORT = 1521))
# (ADDRESS = (PROTOCOL = TCP)(HOST = atif)(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testcdb)
# (INSTANCE_NAME = testcdb)
)
)
testpdb1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.29.71)(PORT = 1521))
# (ADDRESS = (PROTOCOL = TCP)(HOST = atif)(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testpdb1)
# (INSTANCE_NAME = testcdb)
)
)
You MUST use the PDB service name when connecting to a multi-tenanted pluggable database.
The SID will also be used to go back to a Container Database.
Change your radio button to 'Service Name' from 'SID'
When i am tring to access my oracle instance using basic connection type. It gives me an error telling "TNS:listener does not currently know of SID given in connect descripton",
But i can connect to the same user using Sqlplus
tnsping orcl =
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.007gu
ard.com)))
OK (0 msec)
i even tried to use the service name instead of the sid to connect and it doesn't work !
yesterday everything was fine .. i have restarted my laptop and i got this problem .. ( all my oracle services work fine )
I'm having an error that goes beyond what I see in TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
I'm using Windows 8, Oracle 11.2 XE, java 1.7.15, and Eclipse Juno SR2.
The error I receive is:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
I have the driver registered properly, and I've edited the listener.ora to make the service explicit, in both ways I've seen given as exampled - under SID_LIST_LISTENER, I added:
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
and under LISTENER = (DESCRIPTION_LIST I added
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
tnsnames.ora contains, as its first entry:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
The source code making the calls is:
Class.forName(JDBC_DRIVER);
String connectionString = "jdbc:oracle:thin:localhost:1521/XE";
myConnection = DriverManager.getConnection(connectionString, "myuser", "myuserpw");
I've also been through the following permutations on the connectionString. with results noted here:
jdbc:oracle:thin:#localhost:1521:XE // java.sql.SQLException: ORA-01017: invalid username/password; logon denied
jdbc:oracle:thin:localhost:1521:XE // error ORA 12505
jdbc:oracle:thin:#//localhost:1521:XE // error java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
jdbc:oracle:thin:#localhost:1521/XE // error ORA-01017
jdbc:oracle:thin:#//localhost:1521/XE // error ORA-01017
Anyone have ideas?
I have an Answer! (Bloody-minded stubbornness is its own reward, I guess)
I changed which Connection call I made and restructured the connection string thataway, as in:
String connectionString = "jdbc:oracle:thin:myuser/mypw#localhost:1521:XE";
myConnection = DriverManager.getConnection(connectionString);
THAT works! Now the next guy can Google it. The version of the call with three parameters blows up every time I try it, but the same fundamental string with the username/pw embedded works in the single-parameter call.
I believe this is a bug in the driver provided with the XE database - oh Oracle, will you let us know?
OPEN cmd
execute the lsnrctl command.
Type start in the LSNRCTL> prompt.
I'm new here so I introduce myself, my name is Ettore Giallaurito and my job is in the IT services in Italy.
My question:
I'm trying to connect to an Oracle DB instance through an odbc (System DNS) connections under XP but I get an error ORA1254 TNS:could not resolvethe connect identifier specified.
I'm using oracle instant client 11.2 and I've my tnsnames properly configured, since I can get connected with DBVisualizer using the TNS method.
To be honest I do get connected in this case, but I need to insert the full connect string:
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = repsit01.sit.sor)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
since it doesn't get me in if I use just the SID, in my case REPSIT01 as showed below.
My tns entry is as follow:
REPSIT01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = REPSIT01))
)
Any help would be much apprecciated.
Thanks in advance Ettore.
Try setting the environment variable TNS_ADMIN to the directory where your tnsnames.ora file resides.