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;
    
  • 相关阅读:
    iOS7,iOS8和iOS9的区别
    NSUrl
    什么是 MIME TYPE?
    TCP协议与UDP协议的区别
    KVC、KVO、NSNotification、delegate 总结及区别
    cocoapods 安装过程及常见问题
    素材丶资料
    方法 笔记(二)
    UIWebView UITextView
    在oj中Python的循环输入问题解决
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348920.html
Copyright © 2011-2022 走看看