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/.