You need to establish "mydsn" as an ODBC datasource name.     How to do this 
depends greatly on what platform you're connecting from.    Options include:

windows: http://technet.microsoft.com/en-us/library/ms188681%28v=sql.105%29.aspx

freeTDS: http://www.freetds.org/userguide/prepodbc.htm

etc.

pyodbc also allows "DSN-less" connections, see 
https://code.google.com/p/pyodbc/wiki/ConnectionStrings.


Once you get pyodbc to connect, then you can start applying that to SQLAlchemy.




On May 26, 2014, at 11:04 AM, Massi <[email protected]> wrote:

> Hi everyone,
> 
> I'm trying to access data from a linked server using SQLalchemy (0.9.4), The 
> usual connection established via pyodbc (engine = 
> create_engine('mssql+pyodbc://scott:tiger@mydsn')) does not seem to work. 
> Actually I can only read the data with SQL Server using SQL Management Studio 
> and the openquery syntax. I'm totally new to the linked servers world, so 
> what I'm looking for is a starting point to understand if SQLalchemy somehow 
> allows to get access to the data.
> Any help or suggestion is welcome!
> Thanks in advance.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to