TNS:could not resolve the connect identifier specified error - python-3.x

I am trying to connect to a database using cx_Oracle in Python.
this is the way I'm doing it :
connection = cx_Oracle.connect("user", "pass", "service")
I am able to connect to the db using sql developer with the same credentials but when I try to connect from python it throws the error :
ORA-12154: TNS:could not resolve the connect identifier
specified.
I tried the same thing from another system and I am able to connect to the database using cx_Oracle. The contents of TNSNames.ora file are exactly the same in both systems.
I removed everything and installed again hoping to get rid of mistakes I might have done the first time but I am still facing the same error.
Please let me know if there is any way to fix this.
Thank You.

You can try with EZ connect instead, or you can use cx_Oracle.makedsn() to build up the connect string. If you provide the contents of your tnsnames.ora file I can provide a more detailed answer.

I realised what was going wrong.
The database uses a LDAP file. And in the SQLNET.ORA file, LDAP was not mentioned, that caused the error for me.
Just adding LDAP to NAMES.DIRECTORY_PATH in SQLNET.ORA solved this issue for me.

Related

Remote server returned an error 404 Share Point connection Manager on SSIS tool

I'm trying to read data from Share Point online. I'm using KingwaySoft SharePoint Drivers on SSIS.
I'm getting below error even though with provided credentials
what could be the reason?
do I have to change the URL pattern?
Resolved
I have added /_vti_bin/listdata.svc/ at the end of the site URL.
like :
https://company0.sharepoint.com/sites/sfinfo/IT_team/_vti_bin/listdata.svc/
Thanks
The ideal service URL that you would need to provide should include the base site and subsite, if necessary, and no other details.
Give it a try and if the error persists, please reach out to our support team with the screenshot of the SharePoint connection manager configuration.

Problem with webrtc, I can not connect per call in localhost

iam using webrtc-voice demo from tutorialspoint using nodejs its working fine in my file path but its not working in localhost it shows upgarde required error
if anyone know about this error please provide the solution

How to find a remote url for my mongoDB to use in my node.js code?

I have a cluster in mongoDB, and I want to connect to it in my node.js server. For that I need a url, but I can't find the correct form in the mongo site.
the format I'm looking for is:
"mongodb://remote_url:27017/databasetest"
so I am looking for the 'remote_url' part.
I am new to mongoDB so please help me.
I have already tried to click the 'connect' button and than choosing the 'connect to node.js app', but I get a different format.
(this is what I got):
"mongodb+srv://user:<'password'>#cluster0-afixn.mongodb.net/test?retryWrites=true"
My mistake. There is no way to reach this server through localhost or any IP since it is a cloud based cluster. Thanks for the help anyway.

Connection string with %USERPROFILE% to access DB through Box drive

I am trying to make connection from Microsoft Excel to Access database file on Box drive installed on computer. But I am not able to connect to Access DB file.
I want to replace C:\Users\raghavgupta\ with %USERPROFILE% in connection below, but not able to connect and follow the below process. Can you assist me in this?
Here is the error message:
Assuming the fixed path actually works, try %USERPROFILE%. Keep in mind that % may be a special character in the context you are trying to use it and needs to be escaped.

Brackets error: failed to connect to NodeJs

I am facing brackets error after installing an extension brackets-npm-registry. Its prompting Failed to connect to NodeJs.
How to solve this error ?
This is a known issue on the brackets-git repo. There may be workarounds/solutions on the linked issue page.
This comment by #anukanth has been reported (in a linked issue) useful to fix the issue.
You have to manually edit C:/windows/system32/drivers/etc/host with notepad and enter a line without any comment sign (#) and enter the following line without any add on like comma or anything.
127.0.0.1 localhost

Resources