- 论坛徽章:
- 0
|
本帖最后由 beyondlee1 于 2016-12-15 09:14 编辑
请问一下,你这段代码是在Linux环境写的,我在windows环境,
这个要怎么改:- $ENV{DBI_AUTOPROXY}='dbi:Proxy:hostname=133.2.2.5;port=3333';
复制代码
还有,
这个模块我没找到啊?是叫
$ vi b.pl
use strict;
use DBI;
$ENV{DBI_AUTOPROXY}='dbiroxy:hostname=133.2.2.5;port=3333';
my ($dbh,$sth);
my $user = 'ai_sel';
my $pass ='jbjbjbjb';
my $remote="dbi:Oracle:crmdb1";
$dbh = DBI->connect($remote, $user, $pass) ||die "connect did not work: $DBI::errstr";
my $sql = " SELECT service_num ,subscription_id
FROM hiucrm1o.ucs_subscription
WHERE ROWNUM<200";
printf $sql."\n";
$sth=$dbh->prepare($sql);
$sth->execute();
my @ora_cursors=();
while(@ora_cursors=$sth->fetchrow_array)
{
print $ora_cursors[0]."||".$ora_cursors[1]."\n";
}
$sth->finish();
$dbh->disconnect();
|
|