use DBI;

my $DSN = "driver={SQL Server};Server=192.168.2.90;Database=dbname;UID=sa;PWD=123456";
my $dbh=DBI->connect("DBI:ODBC:$DSN") or die "couldn't open database: DBI->errstr";
my $sth=$dbh->prepare("select name from sys.objects") or die "Couldn't prepare statement: DBI->errstr";
$sth->execute();
$sth->dump_results();
$sth->finish();
$dbh->disconnect();