Victor Reichert
2013-06-13 22:58:30 UTC
Hi,
I'm working through the Alembic tutorial and I have reached the point where
I need to enter the DB URL (sqlalchemy.url).
The URL below (with the DSN py_test) works and I am able to run my
migration, but I would like to connect without the DSN.
sqlalchemy.url = mssql+pyodbc://py_test; Trusted_Connection=Yes
I am able to connect to the DB with SQL Alchemy using the URL in the line
below:
sqlalchemy.url = mssql+pyodbc:///?odbc_connect=DRIVER={SQL
Server};Server=Server;Database=DB;Trusted_Connection=Yes
However, it generates the following error.
sqlalchemy.exc.DBAPIError: (Error) ('08001', '[08001] [Microsoft][ODBC SQL
Server Driver]Neither DSN nor SERVER keyword supplied (0)
(SQLDriverConnect)') None None
I think the URL is ncoded in SQL Alchmey, and I have tried the line below
as well:
sqlalchemy.url =
mssql+pyodbc:///?odbc_connect=DRIVER%3D%7BSQL+Server%7D%3BServer%3DServer%3BDatabase%3DDB%3BTrusted_Connection%3DYes
Which generates the error below:
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(',
found:
'%3D%7BSQL+Server%7D%3BServer%3DServer%3BDatabase%3DDB%3BTrusted_Connection%3DYes;Trusted_Connection=Yes'
If anyone could please help me I would greatly appreciate it.
Thank you in advance :)
~Victor
I'm working through the Alembic tutorial and I have reached the point where
I need to enter the DB URL (sqlalchemy.url).
The URL below (with the DSN py_test) works and I am able to run my
migration, but I would like to connect without the DSN.
sqlalchemy.url = mssql+pyodbc://py_test; Trusted_Connection=Yes
I am able to connect to the DB with SQL Alchemy using the URL in the line
below:
sqlalchemy.url = mssql+pyodbc:///?odbc_connect=DRIVER={SQL
Server};Server=Server;Database=DB;Trusted_Connection=Yes
However, it generates the following error.
sqlalchemy.exc.DBAPIError: (Error) ('08001', '[08001] [Microsoft][ODBC SQL
Server Driver]Neither DSN nor SERVER keyword supplied (0)
(SQLDriverConnect)') None None
I think the URL is ncoded in SQL Alchmey, and I have tried the line below
as well:
sqlalchemy.url =
mssql+pyodbc:///?odbc_connect=DRIVER%3D%7BSQL+Server%7D%3BServer%3DServer%3BDatabase%3DDB%3BTrusted_Connection%3DYes
Which generates the error below:
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(',
found:
'%3D%7BSQL+Server%7D%3BServer%3DServer%3BDatabase%3DDB%3BTrusted_Connection%3DYes;Trusted_Connection=Yes'
If anyone could please help me I would greatly appreciate it.
Thank you in advance :)
~Victor
--
You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.