Hi, I have a perl script which uses sqlplus for data processing. below is a part of my code...
##### Generating log file--- my $logfile = "${basePath}/VoucherStateChange.$filedate.log"; open (STDOUT, ">>", "$logfile") or die "Can't open logfile $logfile fo +r writing: $!\n"; open (STDERR, ">>", "$logfile") or die "Can't open logfile $logfile fo +r writing: $!\n"; print "$logfile\n"; my $SQLPLUS='/opt/oracle/product/11g/db_1/bin/sqlplus -S system/coolma +n7@vsdb'; `$SQLPLUS \@${basePath}/VoucherQuery1.sql $startdate> ${basePath}/Quer +yResult1.txt`;
Now output of my query which is written in VoucherQuery1.sql is being redirect to QueryResult1.txt. Now If I want that in case of any error, error message comes to the log file (oucherStateChange.$filedate.log) taken care by perl script instead of this QueryResult1.txt file. is it possible? thanks a lot...
In reply to How to handel sqlplus error in perl script. by Ankur_kuls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |