如何将Weka连接到MSSQL服务器

问题描述:

我想连接到 Weka 3.8 中的MSSQL服务器.我尝试了很多事情,但找不到连接到 SQLServer 2012数据库的方法.

I want to connect to MSSQL server in Weka 3.8. I tried lots of things and I couldn't find a way to connect to SQLServer 2012 Database.

错误::未找到驱动程序.

Error: driver not found.

我应用了有关 JDBC-ODBC桥的所有步骤(下面的链接)

I applied all steps about JDBC-ODBC bridge (link below)

https: //andersspur.wordpress.com/2013/10/11/connect-weka-to-sql-server-2012-and-14/

ErrorImage:

我知道已经很晚了,但是我遇到了同样的问题,这花了我一段时间才能找到解决方案.我几乎可以肯定您找到了解决方案.在这里,这是第二步.但是,我正在分享我的方法,并希望您和其他人对此有所帮助.

I know it is late, but I had the same problem, and this took me a while to find the solution. I am almost sure you found the solution. In here, it is the second step. However, I am sharing my approach and hope you and other find this helpful.

首先,您需要像从Microsoft一样下载jdbc驱动程序.对我来说:在这里

First, you need to download jdbc driver from Microsoft as you did. For me: Here

第二,确保已启用TCP/IP连接.更多信息是此处

Second, make sure you have enabled TCP/IP connection. More info is here and here,

第三,在SQL Server实例中启用远程连接,请参见这里.

Third, enable Remote connection in SQL server instance, See here.

第四,在SQL中启用混合安全性模式,此处设置参数,添加用户并授予其所需的数据库访问权限.

Fourth, enable mix security mode in SQL, Here, You may need to restart the sql engine. Integrated security may alos work for you. In this case, see how to set parameters here, Add a user and give it access to db you want.

第五,在此处此处,正如您提到的.

Fifth, Follow these steps in here or here, as you mentioned.

第六,按此按钮, 转到此地址'C:\ Program Files \ Weka-3-8 \ weka \ experiment'并选择'DatabaseUtils.props',您应该已经在Fifth中编辑了此文件,并且该路径在您的计算机上可能不同.

Sixth, Press this button, go to this address 'C:\Program Files\Weka-3-8\weka\experiment' and select 'DatabaseUtils.props', You should have edited this file in Fifth and this path may be different on your computer.

已更新 您可能需要按照Ivan的建议将修改后的DatabaseUtils.props复制到Weka 3.8的C:\Users\myUser\wekafiles可能位于的wekafiles文件夹中.

Updated You may need to copy the modified DatabaseUtils.props into wekafiles folder possibly located C:\Users\myUser\wekafiles for Weka 3.8 as suggested by Ivan

第七,按下此按钮,希望您可以成功连接到sql server.

Seventh, Press this button and hope you can successfully connect to sql server.

这对我有用,如下所示.

This worked for me as shown here.