문서의 이전 판입니다!
# apt-get install freetds-common freetds-dev
$ apt-get install libdbd-sybase-perl libdbd-odbc-perl
try server login = yes try domain login = no tds version = 7.0
[admindb] host = 192.168.100.2 port = 1433 tds version = 8.0
$ tsql -S admindb -U mssql_username $ tsql -S admindb -U mssql_username -P mssql_password
#!/usr/bin/perl use DBI; $dsn = 'DBI:Sybase:server=admindb'; my $dbh = DBI->connect($dsn, "mssql_username", 'mssql_password'); die "unable to connect to server $DBI::errstr" unless $dbh; $dbh->do("use mssql_database"); $query = "SELECT * FROM scott"; $sth = $dbh->prepare ($query) or die "prepare failed\n"; $sth->execute( ) or die "unable to execute query $query error $DBI::errstr"; $rows = $sth->rows ; print "$row rows returned by query\n"; while ( @first = $sth->fetchrow_array ) { foreach $field (@first) { print "field: $field\n"; } }
[global] # TDS protocol version tds version = 4.2