免费资源网 – https://freexyz.cn/
下面看下zabbix监控sqlserver。首先下载安装freetds
wget -c http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz tar -zxvf freetds-stable.tgz cd freetds-0.91/ ./configure –prefix=/usr/local/freetds –with-tdsver=8.0 –enable-msdblib make && makeinstallFreeTDS默认安装在/usr/local/freetds目录当中,库文件在相应的lib目录下。
#vim /etc/ld.so.conf /usr/local/freetds/lib配置生效
#ldconfig修改/usr/local/freetds/etc/freetds.conf全局配置版本号tds version为8.0
#vim /usr/local/freetds/etc/freetds.conf [global] # TDS protocol version ; tds version = 4.2 tds version = 8.0连接测试
/usr/local/freetds/bin/tsql -H 192.168.31.158 -p 1433 -U sa -P 12345678安装unixODBC unixODBC-devel
yum -y install unixODBC unixODBC-devel修改配置
#vim /etc/odbcinst.ini [FreeTDS] Driver = /usr/local/freetds/lib/libtdsodbc.so.0 #vim /etc/odbc.ini [sql1] Driver = FreeTDS Server = 192.168.31.158 PORT = 1433 TDS_Version = 8.0 [sql2] Driver = FreeTDS Server = 192.168.31.159 PORT = 1433 TDS_Version = 8.0测试连接
#isql -v sql1 sa 12345678 +—————————————+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +—————————————+ SQL>选择模板
免费资源网 – https://freexyz.cn/
© 版权声明
THE END
暂无评论内容