Connect to SQL Server Analysis Service from Python

馋奶兔 提交于 2019-12-25 02:26:05

问题


I'm using PyODBC for SQL Server 2008 database engine and it works well. I can retrieve records and execute procedures and views with no problem.

My issue is I can't connect to SQL Server 2008 Analysis Server using PyODBC. Following list shows what I've tried:

cnxn = pyodbc.connect(r'Driver={SQL Server};Server=127.0.0.1;Database=DB1;Trusted_Connection=yes;')

And

cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=127.0.0.1;DATABASE=DB1;Trusted_Connection=yes;UID=TB\\user;PWD=123123')

What's the problem? How can I address this issue?

来源:https://stackoverflow.com/questions/24712994/connect-to-sql-server-analysis-service-from-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!