Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time out error for oracle and sql server databases #676

Open
mellasmpa opened this issue Aug 30, 2024 · 1 comment
Open

Time out error for oracle and sql server databases #676

mellasmpa opened this issue Aug 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mellasmpa
Copy link

What language are you using?

Replace this text with the Python.

What version are you using?

I am using python 3.11.5

What database are you using?

Oracle and Sqlserver

What dataframe are you using?

Pandas

Can you describe your bug?

  • I want to switch from sqlalchemy to connectorx. However, for one of the oracle databases I am getting a time out error and yet when using the same configuration for sqlachemy it works well.
  • Again, I want to access the sql server but I couldn't do so with connectorx. This is works for me with sqlalchemy: create_engine(mssql+pyodbc://username:password@ip\EBMV1PRO/CISBackOffice?driver=ODBC+Driver+17+for+SQL+Server). I would be glad to a connectorx uri version.

What are the steps to reproduce the behavior?

If possible, please include a minimal simple example including:

Database setup if the error only happens on specific data or data type

Table schema and example data

Example query / code
import connectorx as cx
import pandas as pd
from sqlalchemy import create_engine

query = "select * FROM awunadm.sad_item where rownum < 10"
conn = "oracle://username:password@ip:1521/db_name"
engine = create_engine("oracle+cx_oracle://username:password@ip:1521/db_name")

pd.read_sql(sql=query, con=engine)  # A version that works with sqlalchemy
cx.read_sql(conn=conn, query=query)  # A version that does not work with connectorx

#Note that for some of my oracle databases this works well using both sqlalchemy and connectorx

What is the error?

RuntimeError: timed out waiting for connection: OCI Error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

@mellasmpa mellasmpa added the bug Something isn't working label Aug 30, 2024
@RaphCodec
Copy link

RaphCodec commented Sep 19, 2024

Hi

I've been having the same problem when using the latest version of connectorx. However, I had an old environement with connectorx==0.3.2 and that version works with MS SQL Server without any issue. Not sure what changed between that version and the latest version. I can't verify with oracle as I have not figured out the oracle syntax for connecting with a tns yet. Hope this helps a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants