or download this
$dbh = DBI->connect("dbi:ODBC:Driver={SQL Server};Server=<Servername>;
+UID=<username>;PWD=<pswd>") ;
my $sth = $dbh->prepare("select id,name,job,location from <databasenam
+e>.employee_relation");
$sth->execute;
my $hash = $sth->fetchall_hashref('id');
print Dumper($hash);