Hi all,
I am very new to Perl and the DBI package.
I have a no. of procedures which call each other on the Oracle DB. From
the SQL prompt they are running properly. But when I run the same
through a perl script, it gives some errors.
The code that i have written is :
------------------------------------------------------------------------
------------
my $dbh = DBI->connect("dbi:Oracle:$db",
$username, $password, {AutoCommit => 0} )
or die "Database connection not made: $DBI::errstr";
$timestamp = time();
eval {
my $func = $dbh->prepare("BEGIN do_complete_migration(:parameter1);
END;");
$func->bind_param(":parameter1", q{$timestamp});
$func->execute;
$dbh>commit;
};
print "Done...\n";
$dbh->disconnect();
------------------------------------------------------------------------
------------
When I run this script, I get the following error :
------------------------------------------------------------------------
-----------------------------------
DBD::Oracle::st execute failed: ORA-00911: invalid character
ORA-06512: at "APP_OWNER.INSERT_ATTR", line 21 // There is a Execute
Immediate statement on this line
ORA-06512: at "APP_OWNER.MIGRATE_LEADS", line 18 // Calls proc
Insert_attr
ORA-06512: at "APP_OWNER.DO_COMPLETE_MIGRATION", line 6 // Calls proc
migrate_leads
ORA-06512: at line 1 (DBD: oexec error) at mcs.pl line 85, <IN> line
109.
Done...
------------------------------------------------------------------------
----------------------------------------
I am not able to figure out if there is syntax problem in the perl
script. I am sure that there i no problem in the procedure as they run
properly if I execute the proc fron the sql prompt. Please help if
somebody can figure this out.
Thanks and regards,
Rahul Desai