找不到unixODBC数据源名称,并且未指定默认驱动程序

时间:2019-10-27 09:14:37

标签: docker driver pyodbc superset

我正在Ubuntu 16.04服务器上设置Apache超集BI。 一切似乎都很好。我唯一遇到的问题是从超集GUI连接到SQL Server:

sqlalchemy.exc.InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] 
[unixODBC][Driver Manager]Data source name not found and no default driver 
 specified (0) (SQLDriverConnect)')

我已经成功为SQL Server设置了unixODBC和Microsoft ODBC驱动程序:

root@ApacheBi:/home/bi# isql -v MYSERVER user password
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

但仍然无法通过父集进行连接(在Python 3.6上运行)

这是[ODBC]调试日志:

Entry:
                    Connection = 0x7f3fdc0d58f0
                    Window Hdl = (nil)
                    Str In = [Server=MYSERVER;Database=MYDATABASE ;UID=user 
;PWD=password][length = 53 (SQL_NTS)]
                    Str Out = (nil)
                    Str Out Max = 0
                    Str Out Ptr = (nil)
                    Completion = 0
[ODBC][22223][1572166555.155032][SQLDriverConnectW.c][499]Error: IM002
[ODBC][22223][1572166555.155061][SQLDriverConnect.c][748]
            Entry:
                    Connection = 0x7f3fdc0d58f0
                    Window Hdl = (nil)
                    Str In = [Server=MYSERVER;Database=MYDATABASE ;UID=user 
;PWD=********][length = 53 (SQL_NTS)]
                    Str Out = 0x7f3fe9921ee0
                    Str Out Max = 2048
                    Str Out Ptr = (nil)
                    Completion = 0
[ODBC][22223][1572166555.155081][SQLDriverConnect.c][1239]Error: IM002
[ODBC][22223][1572166555.155101][SQLGetDiagRecW.c][535]
            Entry:
                    Connection = 0x7f3fdc0d58f0
                    Rec Number = 1
                    SQLState = 0x7f3fe9925ed0
                    Native = 0x7f3fe9925ecc
                    Message Text = 0x7f3fe9925ee0
                    Buffer Length = 1023
                    Text Len Ptr = 0x7f3fe9925eca
[ODBC][22223][1572166555.155122][SQLGetDiagRecW.c][596]
            Exit:[SQL_SUCCESS]
                    SQLState = [IM002]
                    Native = 0x7f3fe9925ecc -> 0
                    Message Text = [[unixODBC][Driver Manager]Data source 
name not found and no default driver specified]
[ODBC][22223][1572166555.155151][SQLFreeHandle.c][290]

0 个答案:

没有答案