Perl Verify PMCoreBasedAD
来源:互联网 发布:安装mysql步骤 编辑:程序博客网 时间:2024/04/30 14:56
#!/usr/bin/perl -w
use strict;
use English;
use Carp;
use Getopt::Long;
use ReadConfFile;
use PerformDBOperations;
my ($confFile, $boolHelp) = ();
my $boolError = GetOptions("c=s" => \$confFile,
"h|help!" => \$boolHelp);
if ($boolHelp || $confFile eq "")
{
Help();
exit(0);
}
eval
{
# my $readConf = new ReadConfFile();
my $readConf = ReadConfFile->new();
my %confValues = $readConf->ReadConfFile($confFile);
undef $readConf;
while(my ($key, $value) = each %confValues)
{
print "$key => $value\n";
}
};
if ($EVAL_ERROR)
{
print "Fail to read $confFile!\n";
}
eval
{
my $dbUser = "pmr";
chomp(my $pmrPwd = `polpasmx -$dbUser`);
my $pmrDbPtr = new PerformDBOperations();
$pmrDbPtr->ConnectTo($dbUser, $pmrPwd);
my $sql = "select co_gid, co_int_id, co_name, co_dn from utp_common_objects where co_dn like '%BRS%'";
my $sth = $pmrDbPtr->DoSQLStatement($sql);
print "\n-------------------------------------------------------------------------";
print "\n|CO_GID\t\t\t|CO_INT_ID\t|CO_NAME\t|CO_DN\t\t|";
print "\n-------------------------------------------------------------------------\n";
while(my @arrRow = $sth->fetchrow())
{
foreach(0..$#arrRow)
{
print "|".$arrRow[$_]."\t";
}
print "|\n-------------------------------------------------------------------------\n";
}
};
sub Help
{
print " Usage: perl VerifyPMCoreBasedAD.pl -c <ConfigFileName with full path> -m <test mode> -label <label to be used in result file names>\n";
print "\n Example: perl VerifyPMCoreBasedAD.pl -c /home/omc/test.cf -m 1 -label testrun \n";
}
use strict;
use English;
use Carp;
use Getopt::Long;
use ReadConfFile;
use PerformDBOperations;
my ($confFile, $boolHelp) = ();
my $boolError = GetOptions("c=s" => \$confFile,
"h|help!" => \$boolHelp);
if ($boolHelp || $confFile eq "")
{
Help();
exit(0);
}
eval
{
# my $readConf = new ReadConfFile();
my $readConf = ReadConfFile->new();
my %confValues = $readConf->ReadConfFile($confFile);
undef $readConf;
while(my ($key, $value) = each %confValues)
{
print "$key => $value\n";
}
};
if ($EVAL_ERROR)
{
print "Fail to read $confFile!\n";
}
eval
{
my $dbUser = "pmr";
chomp(my $pmrPwd = `polpasmx -$dbUser`);
my $pmrDbPtr = new PerformDBOperations();
$pmrDbPtr->ConnectTo($dbUser, $pmrPwd);
my $sql = "select co_gid, co_int_id, co_name, co_dn from utp_common_objects where co_dn like '%BRS%'";
my $sth = $pmrDbPtr->DoSQLStatement($sql);
print "\n-------------------------------------------------------------------------";
print "\n|CO_GID\t\t\t|CO_INT_ID\t|CO_NAME\t|CO_DN\t\t|";
print "\n-------------------------------------------------------------------------\n";
while(my @arrRow = $sth->fetchrow())
{
foreach(0..$#arrRow)
{
print "|".$arrRow[$_]."\t";
}
print "|\n-------------------------------------------------------------------------\n";
}
};
sub Help
{
print " Usage: perl VerifyPMCoreBasedAD.pl -c <ConfigFileName with full path> -m <test mode> -label <label to be used in result file names>\n";
print "\n Example: perl VerifyPMCoreBasedAD.pl -c /home/omc/test.cf -m 1 -label testrun \n";
}
- Perl Verify PMCoreBasedAD
- Perl Verify Data
- Verify
- Verify
- verify
- VERIFY是什么意思
- Application Verify
- perl
- Perl
- perl
- perl
- Perl
- perl
- perl
- perl
- Perl
- perl
- perl
- Bash Shell 字符串操作
- Perl Read Configuration File
- sqlserver事务与oracle事务
- 【命令提取】工具
- 30 岁? 25思考.......
- Perl Verify PMCoreBasedAD
- .net的组件
- HTML to Image in C#(C#实现Html转换为Image,即网页截图)
- 通过使用resetlog恢复控制文件恢复数据库
- 查询Oracle使用的特性
- Perl I/O Read & Write
- android 电话状态的监听(来电和去电)
- 简介Spring中常用的hql查询方法
- 注册JDBC驱动的三种方式