zoukankan      html  css  js  c++  java
  • DBD 超时和报错

    [oracle@yyjk sbin]$ time perl testdbi3.pl 
    DBI connect('//10.3.249.22:1521/tllspj','cips',...) failed: ORA-12541: TNS: 无监听程序 (DBD ERROR: OCIServerAttach) at testdbi3.pl line 14.
    -------------------
    11111111111111
    
    real	0m0.125s
    user	0m0.107s
    sys	0m0.016s
    
    
    [oracle@yyjk sbin]$ time perl testdbi3.pl 
    DBI connect('//10.2.120.192:1521/uacdb','uac',...) failed: ORA-12170: TNS: 连接超时 (DBD ERROR: OCIServerAttach) at testdbi3.pl line 15.
    -------------------
    11111111111111
    
    real	1m0.181s
    user	0m0.107s
    sys	0m0.013s
    You have mail in /var/spool/mail/oracle
    [oracle@yyjk sbin]$ cat testdbi3.pl 
    use DBI;
    no warnings;
    
    use DBI;
    use HTTP::Date qw(time2iso str2time time2iso time2isoz);
    use Net::SMTP;
    use Encode;
    use JSON;
    use Sys::SigAction qw( set_sig_handler );
    my $dbip='10.2.120.192';
    #my $dbip='10.2.120.192';
    my $dbname='uacdb';
    my $dbuser='xx';
    my $dbpass='xxx';
     eval {$dbh1 = DBI->connect( "dbi:Oracle://$dbip:1521/$dbname", $dbuser, $dbpass ) or die "Cannot conenct db: $DBI::errstr
    ";};
    if ($@){
       print '-------------------'."
    ";
       print '11111111111111'."
    ";
    }
    else{
      print '222222222222222'."
    ";
    };
    print %h2;
    
  • 相关阅读:
    2016Wireshark
    移动UI
    Javascript 严格模式详解
    [转]深入浅出JSONP解决ajax跨域问题
    savedev和save的区别
    jquery各版本区别
    Webpack学习笔记(一)
    Html5新特性
    chrome浏览器debug
    bootstrap笔记
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348920.html
Copyright © 2011-2022 走看看