That's an Oracle error and a quick search on Metalink indicates that
this tends to happen with tools like Pro*C and if DBD::Oracle uses the
OCI like Pro*C then this bug will apply also. It is reproducable in
8.1.x 9.0.x and 9.2.0.1 ... Apparently the solution is (guess what?)
upgrading to Oracle 10.0 or to Oracle 9.2.0.2 (since it's back-ported
there)

>From Metalink:

"...When running a pro*c program which issues a large select statement
which  encounters an error, for example if the database connection has
been closed  for some reason, then subsequent execution of a large sql
statement will fail  with error ORA-00972: identifier is too long..."

Maybe the solution might include re-establishing your connection?

Hope that helps..


-----Original Message-----
From: Laurie Vien [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 2:38 PM
To: '[EMAIL PROTECTED]'
Subject: "identifier too long"?


I am on the very last step of my Perl script.  Have read a bunch of
records into arrays, using a 'select table handler' with DBI.  Now I
want to cycle back through the data in those arrays, and based on the
value of one specific field, update a field in the corresponding
database record.

Because I need to use one of the array elements as part of the WHERE
clause of the UPDATE statement, I built the SQL statement in a scalar
first, then passed that scalar to the "$dbh->do()" command, as follows.
(Due to the nature of the error message, I'm going to use exact table
and var names):

      $sql_cmd = "\"UPDATE Chunkmail SET Contribute_flag=1 WHERE
Chunkmail_ID=" . @contribute_flag[$_] . "\"";
      $rslt = $dbh->do($sql_cmd);       

Executing the "do" causes the following error:
DBD::Oracle::db do failed:  ORA-00972: identifier is too long (DBD
ERROR:
OCIStmtExecute) [for Statement ""UPDATE Chunkmail SET CONTRIBUTE_FLAG=1
WHERE CHUNKMAIL_ID=1""] at testprog.pl line 161.

Is is complaining that my Update statement is too long??  If not, what?
If so, do I need to make the names of my arrays shorter?  What is the
limit?

Thank you--hope someone else is still at work!

Laurie A. Vien
Sr. Programmer/Analyst
Ben & Jerry's Homemade, Inc.

Reply via email to