connector-x
                                
                                 connector-x copied to clipboard
                                
                                    connector-x copied to clipboard
                            
                            
                            
                        Time out error for oracle and sql server databases
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