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

Document connection api #2

Closed
gouthambs opened this issue Oct 9, 2014 · 4 comments
Closed

Document connection api #2

gouthambs opened this issue Oct 9, 2014 · 4 comments

Comments

@gouthambs
Copy link

It would be really helpful if there was some document pertaining to connection string for various cases. I am trying to connect to SQLanywhere database, using a service. I am getting a few errors.

My connection string is as follows:
url="sqlalchemy_sqlany://user:pwd@localhost/database_file_path?ServerName=MyServer"

I get the following error:

OperationalError: (OperationalError) Specified database not found None None

Can some one help out!

@gperrow-SAP
Copy link
Contributor

Connection strings are described in the online SQL Anywhere documentation. If you are having problems with connection strings, you can also ask questions on http://sqlanywhere-forum.sap.com.

@gouthambs
Copy link
Author

I mean the connection string to use with SQLAlchemy. I am able to connect using the raw SQLAny api. But I want to use SQLAlchemy ORM. I will try the forum as well.

@mgrandi
Copy link
Contributor

mgrandi commented Nov 14, 2014

I noticed on my mac, that if you are running it locally, it seems to be bypassing the network stack or something? I had to remove 'localhost' from the connection string

# works
url = URL(drivername="sqlalchemy_sqlany", username="csdbo", password="<>")

# doesn't work 
url = URL(drivername="sqlalchemy_sqlany", username="csdbo", password="<>", host="localhost")

@gperrow-SAP
Copy link
Contributor

If you are running the personal server (dbeng) rather than the network server (dbsrv), TCP/IP is not started by default, so using "host=localhost" will fail. Removing the host parameter makes the client use shared memory, which is (almost) always available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants