Welcome 微信登录

首页 / 数据库 / MySQL / Ubuntu下通过unixODBC连接MS SqlServer2005

在Ubuntu下通过unixODBC连接MS SqlServer2005的方法:一、下载相关软件 unixODBC、freetds(1) Linux系统的ODBC      unixODBC-2.2.8.tar.gz ( http://www.unixodbc.org)(2) 连接SQLServer或Sybase的驱动     freetds-0.62.4.tar.gz ( http://www.freetds.org)二、安装和配置(1) 安装unixODBC# tar vxzf unixODBC-2.2.8.tar.gz# cd unixODBC-2.2.8# ./configure --prefix=/usr/local/unixODBC# make# make install(2) 安装freetds# tar vxzf freetds-0.62.4.tar.gz# cd freetds-0.62.4# ./configure --prefix=/usr/local/freetds --with-unixodbc=/usr/local/unixODBC --with-tdsver=8.0# make# make install三、配置freetds# cd /usr/local/freetds# vi etc/freetds.conf修改以下的一段,并把;去掉,改好之后的内容如下:[MyServer2k]host=192.168.0.32port=1433tds version=8.0其中的[MyServer2k]代表在客户端使用的服务器名称,host代表SQLServer服务器的IP地址,port代表端口,测试连接;# bin/tsql -S MyServer2k -H 192.168.0.32 -p 1433 -U sa -P password1> use gameDB2> go1> select count(*) from t_ip41> quit一切都很顺利,现在来说明以下这些参数的作用,-S:MyServer2k是在freetds.conf中定义好的-H:192.168.0.32服务器IP地址,和freetds.conf中一致,如果使用了-S参数,这个参数可以不用-p:1433用来指定端口是1433-U:sa用来指定连接数据库的用户名-P:password用来指定连接数据库的密码。
  • 1
  • 2
  • 下一页
调用Oracle函数Oracle 日志状态为stale解决方法相关资讯      Ubuntu教程 
  • Ubuntu教程 - 使用Ubuntu拷贝CD和  (12/18/2013 14:38:16)
  • 让Ubuntu 12.10支持RAR和7Z文件解  (11/15/2012 18:51:50)
  • Windows 7硬盘安装Ubuntu 12.10图  (11/03/2012 19:22:47)
  • 完美安装Ubuntu 12.10最新AMD显卡  (11/27/2012 08:17:47)
  • Win 7硬盘安装Ubuntu 12.10  (11/05/2012 13:30:34)
  • 虚拟机上Ubuntu 11.10升级到12.04  (10/12/2012 20:00:38)
本文评论 查看全部评论 (0)
表情: 姓名: 字数