此处借用 ODBC 来操作timesten 数据库,前提安装tt数据库
#!/usr/bin/perl
use warnings;
use DBI;
use DBD::ODBC;
use strict;
main:
{
my ($batch_count,$spliter,$ins_sql);
my ($starttime,$endtime);
$batch_count = 10;
$spliter = ',';
$ins_sql = "select * from t;";
my %db_attr = (
"RaiseError" => 1,
"PrintError" => 1,
"AutoCommit" => 0,
);
my $db;
#$db = DBI->connect('DBD:ODBC:test','','') or die "Connect to T error!\n";
$db = DBI->connect("DBI:ODBC:test","admin","admin");
my $st = $db->prepare($ins_sql);
my $result = $st->execute();
print "====>>>>".$result;
}