Hello,
I just upgrades from Oracle 8.1.7.4 to Oracle 9.2.0.1 along with Perl and
DBD and DBI and I have an odd error.
Current Environment (were I am having errors):
Oracle: 9.2.0.1
Perl: 5.8.0
DBD Oracle: 1.14
DBI: 1.37
Old Environment (were the scripts worked):
Oracle: 8.7.1.4
Perl: 5.6.1
DBD Oracle: 1.12
DBI: 1.28
The script is connecting to a data base, reading the columns names of a
table then creating a select statement that structures the output (of the
select statement) to produce a delimited text file.
The offending code is:
$select_strg = 'select '.$middle_str.' from '.$prep_table_nm;
printf LOG_FILE "Command string: %s\n", $select_strg;
printf LOG_FILE "\nTest\n";
$sth1 = $dbh->prepare($select_strg);
$sth1->execute() || warn "Can't execute select statement \n";
$log_date = &ParseDate("today");
$date_2 = &UnixDate($log_date,"%d-%m-%Y %H:%M:%S");
printf LOG_FILE "Start unload to file at: %s\n", $date_2;
$count = 0;
while (@array_ref = $sth1->fetchrow_array ) {
>>> printf DATA_FILE "@array_ref\n"; <<< OFFENDING LINE
@array_ref = '';
$count++;
}
The error I am getting is: Modification of a read-only value attempted at
unload_table.pl line 242.
As you can see for the log output below script runs fine for 10 of the 11
files, but fails on one of the tables. The file is the largest one in terms
of the nunmber of rows of data, but the failure occurs at about 50,000 rows.
Start Run: 25-06-2003 10:11:10 On table: DEPT_TBL_VW
Start Run: 25-06-2003 10:11:18 On table: EARNINGS_TBL_VW
Start Run: 25-06-2003 10:11:21 On table: EMPLOYEES_VW
Start Run: 25-06-2003 10:12:05 On table: FTEBURN_TBL2_VW
Start Run: 25-06-2003 10:18:06 On table: JOBCODE_TBL_VW
Start Run: 25-06-2003 10:18:36 On table: JOB_VW
Start Run: 25-06-2003 10:29:07 On table: PAY_CHECK_VW
Start Run: 25-06-2003 10:44:19 On table: PAY_EARNINGS_VW
Modification of a read-only value attempted at unload_table.pl line 242.
Start Run: 25-06-2003 10:44:46 On table: PAY_OTH_EARNS_VW
Start Run: 25-06-2003 11:06:39 On table: POSITION_VW
Start Run: 25-06-2003 11:10:34 On table: XLATTABLE_VW
If I move the code to a machine running the old environment on it (Perl
5.6.1; DBI 1.12; DBD 1.28) the script runs fine! Any hints where I should
start looking?
Cheers