Dbd Error Ocistmtprepare
Contents |
Rejected bugs Report a new bug Preferred bug tracker Please visit the preferred bug tracker to report your issue. This queue is for tickets about the DBD-Oracle ora-24373 CPAN distribution. Report information The Basics Id: 64752 Status: stalled Priority: 0/
Database Error Ora-24373 Invalid Length Specified For Statement
Queue: DBD-Oracle People Owner: Nobody in particular Requestors: dflewelling [...] epsilon.com Cc: AdminCc: Bug Information Severity: Important Broken in: 1.24 Fixed in: (no value) History Show all quoted text — Show full headers # ThuJan1315:13:472011 dflewelling [...] epsilon.com - Ticket created Subject: DBD ERROR: OCIStmtPrepare Download (untitled) / with headers text/plain 713b AIX 6.1.0.0 Perl: v5.8.8 built for aix-thread-multi DBI Version:1.613 DBD::Oracle: 1.24 Oracle: 10.2.0.3 DBD Oracle seems to get corrupted if I am switching back/forth between an ODBC connection and Oracle connection. for example: I have a connection to an ODBC (netezza) database and Oracle database. I can prepare and execute a statement against the ODBC connection, but when I try to prepare a subsequent statement against the Oracle database, I get the following error: ORA-24373: invalid length specified for statement (DBD ERROR: OCIStmtPrepare) [for Statement "SELECT * FROM EXTRACT_ATTR"] However, if I reverse the order of the statements (e.g. Oracle first and ODBC second), both work fine. # FriJan1411:43:212011 dflewelling [...] epsilon.com - Correspondence added From: dflewelling [...] epsilon.com Download (untitled) / with headers text/plain 921b On Thu Jan 13 15:13:47 2011, dflewelling wrote: Show quoted text> AIX 6.1.0.0 > Perl: v5.8.8 built for aix-thread-multi > DBI Version:1.613 > DBD::Oracle: 1.24 > Oracle: 10.2.0.3 > > DBD Oracle seems to get corrupted if I am switching back/forth between Show quoted text> an ODBC connection and Oracle connection. > > for example: I have a connection to an ODBC (netezza) database and > Oracle database. > > I can prepare and execute a statement against the ODBC connection, but Show quoted text> when I try to prepare a subsequent statement against the Oracle > database, I get the following error: > > ORA-24373: invalid length specified for statement (DBD ERROR: > OCIStmtPrepare)
PLus, where I'd say SQL> @package.spb , I have been trying to do all sorts of things with $DBH->prepare / do / etc. As of right now, this is not working: # load file contents open (FILEDATA, "$sql"); while ($record =
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with http://stackoverflow.com/questions/5972376/dbdoracle-and-dbi-error-in-perl us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up DBD::Oracle and DBI error in perl up vote 0 down vote favorite I am having a strange issue here with perl and DBI module. I can get the query successfully sometimes, but sometimes, when I add a line of code which is dbd error remotely related to database access or anything like that, I got an error saying: DBD::Oracle::st fetchrow_array failed: ERROR no statement executing (perhaps you need to call execute first) [for Statement "select * from (...)"] at script.pl line 18. I verified using sqlplus that my select command has no problem here (of course, that is why I said the script worked sometimes!) If I added a semicolon after the select command in the perl script, I got another error saying: DBD::Oracle::db prepare failed: ORA-00911: invalid dbd error ocistmtprepare character (DBD ERROR: error possibly near <*> indicator at char 970 in 'select * from (...)<*>;') [for Statement "select * from (...);"] at script.pl line 13. Can anyone please suggest to me what is going on here? Is it because the sql command is too long (~900 chars)? perl dbi dbd share|improve this question edited May 24 '14 at 22:15 Flimzy 15.7k54269 asked May 12 '11 at 1:26 Qiang Li 3,55364298 1 You should probably show us the script - or the first 20 or so lines of it. The chances are there's something you do in the loop that interferes with your statement. Have you read the documentation? Look at perldoc DBD::Oracle or DBD::Oracle; also perldoc DBI or DBI. Some drivers have odd limitations on having two statement handles active at once, or similar rules. –Jonathan Leffler May 12 '11 at 4:18 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote That error means you've prepared a statement but not executed it. You may also get it if you prepared a statement, executed it and fetched all the rows then call fetch again but I'm less sure about that. Don't put semi-colons on the end of your SQL in this case as it is not required. See https://metacpan.org/pod/DBI#Executed for th executed attribute. share|improve this answer edited Apr 10 '14 at 11:38 sid_com 7,5711461125 answered May 12 '11 at 8:04 bohica 4,50121223 Thanks for your reply. I do have execute() after pr