From: Edward QU Date: 2012-07-13T15:32:52+09:00 Subject: detect ms sqlserver status Hi There I just want to use ruby script to detect if the MS SQLserver works well/status, beside use "connected", is there any other better method? thanks. -------------------- require 'dbi' @server_name='localhost' @dbh=DBI.connect("DBI:ADO:Provider=SQLNCLI;Data Source=#{@server_name};Integrated Security=SSPI") if @dbh puts "connected" else puts "not connected" end -- Posted via http://www.ruby-forum.com/.