in reply to MSSQL- Can't proceed further

Did you read the DBI::FAQ I mentioned earlier? Have you created a DSN for the database you are trying to use (in your example XYZ)? Read DBD::ODBC::FAQ and README.windows.

Try

my $dbh = DBI->connect("dbi:ODBC:$dsn", $user, $password) or die "DBI connect failed: $DBI::errstr\n";

Martin