An important factoid I left out:
This is a DBD::Oracle install that has the patch that paco over at macosxhints.com wrote applied to it. It's an Intel Mac.

http://www.macosxhints.com/article.php?story=20061021211559813

--- dbdimp.c.orig       2007-12-21 11:03:55.000000000 -0500
+++ dbdimp.c    2008-01-31 14:19:37.000000000 -0500
@@ -56,7 +56,6 @@
 static sql_fbh_t ora2sql_type _((imp_fbh_t* fbh));

 void ora_free_phs_contents _((phs_t *phs));
-static void dump_env_to_trace();

 static sb4
oci_error_get(OCIError *errhp, sword status, char *what, SV *errstr, int debug)
@@ -383,9 +382,6 @@

     imp_dbh->get_oci_handle = oci_db_handle;

-    if (DBIS->debug >= 6 )
-       dump_env_to_trace();
-
if ((svp=DBD_ATTRIB_GET_SVP(attr, "ora_envhp", 9)) && SvOK(*svp)) {
        if (!SvTRUE(*svp)) {
            imp_dbh->envhp = NULL; /* force new environment */
@@ -3503,20 +3499,3 @@
     }
     return sql_fbh;
 }
-
-static void
-dump_env_to_trace() {
-       dTHX;
-    PerlIO *fp = DBILOGFP;
-    int i = 0;
-    char *p;
-#ifndef __BORLANDC__
-    extern char **environ;
-#endif
-    PerlIO_printf(fp, "Environment variables:\n");
-    do {
-       p = (char*)environ[i++];
-       PerlIO_printf(fp,"\t%s\n",p);
-    } while ((char*)environ[i] != '\0');
-}



On Jun 24, 2008, at 1:00 AM, Amit Saxena wrote:

Hi !

I don't know whether it will work or not, but try putting some spaces on the
both sides of "=" sign in e.rsuid=?

Regards,
Amit Saxena

On Tue, Jun 24, 2008 at 2:35 AM, Karen Hoofnagle <[EMAIL PROTECTED]>
wrote:

Hi, I'm running OSX 10.5.3 and I've installed the Oracle instant client. sqlPlus works just fine and I would have considered by DBD::Oracle install
to be ok, as well.
I can touch my databases and run simple sql statements on them using DBI.

However, some code I have in production running happily on another system
will not run on the box described above.

Also, the perl I know this runs under is v5.8.8 built for
sun4-solaris-thread-multi
The one it's failing on is perl, v5.8.8 built for
darwin-thread-multi-2level

Here's the code:
It fails to compile a prepared statement choking on the very first value
variable to be passed in no matter what order the variables fall in.


$get_crsline_data = $db_handle->prepare("SELECT rsuid, icomsan, t.hubidlc
hub, poleno, ".
             "atten, building rsu_address, ".
"c.street || ' ' ||c.apt cust_address, c.city cust_city, ".
             "state, len, rcntelno, lname, fname, instdate, ".
             "rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no
||'-'||positions ID, mrf_group, t.discodate ".
          "FROM ".
          " [EMAIL PROTECTED] c ".
" inner join [EMAIL PROTECTED] t on t.cust_id = c.cust_id ".
          " inner join [EMAIL PROTECTED] p on t.tp_id = p.tp_id  ".
" inner join [EMAIL PROTECTED] i on p.idlcpos_id =i.idlcpos_id ".
          " inner join [EMAIL PROTECTED] e on i.equip_id = e.equip_id ".
" inner join [EMAIL PROTECTED] b on e.build_id = b.build_id ". " left outer join [EMAIL PROTECTED] m on e.ms_id = m.ms_id ".
          "WHERE ".
           " e.rsuid=? and ".
           " e.rsu_no =? and ".
           " t.hubidlc =? and ".
           " p.positions = ?"
      );

Here's the error I get:

"DBD::Oracle::db prepare failed: ORA-00911: invalid character DBD ERROR: error possibly near <*> indicator at char 651 in 'SELECT rsuid, icomsan, t.hubidlc hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'|| positions
ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
[EMAIL PROTECTED] t on t.cust_id = c.cust_id inner join [EMAIL PROTECTED] on t.tp_id = p.tp_id inner join [EMAIL PROTECTED] on p.idlcpos_id =i.idlcpos_id inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id inner join [EMAIL PROTECTED] on e.build_id = b.build_id left outer join [EMAIL PROTECTED] on e.ms_id = m.ms_id WHERE e.rsuid=<*>? and e.rsu_no =? and t.hubidlc =? and p.positions = ?') [for Statement "SELECT rsuid, icomsan, t.hubidlc
hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'|| positions
ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
[EMAIL PROTECTED] t on t.cust_id = c.cust_id inner join [EMAIL PROTECTED] on t.tp_id = p.tp_id inner join [EMAIL PROTECTED] on p.idlcpos_id =i.idlcpos_id inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id inner join [EMAIL PROTECTED] on e.build_id = b.build_id left outer join [EMAIL PROTECTED] on e.ms_id = m.ms_id WHERE e.rsuid=? and e.rsu_no =? and t.hubidlc =?
and  p.positions = ?"] at TeadInterface.pm line 120.
DBD::Oracle::db prepare failed: ORA-00911: invalid character (DBD ERROR: error possibly near <*> indicator at char 651 in 'SELECT rsuid, icomsan, t.hubidlc hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'|| positions
ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
[EMAIL PROTECTED] t on t.cust_id = c.cust_id inner join [EMAIL PROTECTED] on t.tp_id = p.tp_id inner join [EMAIL PROTECTED] on p.idlcpos_id =i.idlcpos_id inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id inner join [EMAIL PROTECTED] on e.build_id = b.build_id left outer join [EMAIL PROTECTED] on e.ms_id = m.ms_id WHERE e.rsuid=<*>? and e.rsu_no =? and t.hubidlc =? and p.positions = ?') [for Statement "SELECT rsuid, icomsan, t.hubidlc
hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'|| positions
ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
[EMAIL PROTECTED] t on t.cust_id = c.cust_id inner join [EMAIL PROTECTED] on t.tp_id = p.tp_id inner join [EMAIL PROTECTED] on p.idlcpos_id =i.idlcpos_id inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id inner join [EMAIL PROTECTED] on e.build_id = b.build_id left outer join [EMAIL PROTECTED] on e.ms_id = m.ms_id WHERE e.rsuid=? and e.rsu_no =? and t.hubidlc =?
and  p.positions = ?"] at TeadInterface.pm line 120.

FWIW, I ran DBI_TRACE=5 on this and the log is attached.

Thoughts very much appreciated.
Karen










Reply via email to