Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Thursday May 20, 2004
10:02 AM

DBD::Oracle woes

[ #18855 ]
For some reason I couldn't remember if the tables() method returned just tables, or views as well. So, I installed the latest and greatest DBI and DBD::Oracle modules on my Winders box, connected to our mighty schema containing 4 tables and 2 views, and tried to get a list of tables. The result?

DBD::Oracle::db tables failed: ORA-02395: exceeded call limit on IO usage (DBD E
RROR: OCIStmtExecute) [for Statement "SELECT *
  FROM
(
  SELECT /*+ RULE*/
       NULL         TABLE_CAT
     , t.OWNER      TABLE_SCHEM
     , t.TABLE_NAME TABLE_NAME
     , decode(t.OWNER
          , 'SYS'    , 'SYSTEM '
          , 'SYSTEM' , 'SYSTEM '
          , '' ) || t.TABLE_TYPE TABLE_TYPE
     , c.COMMENTS   REMARKS
  FROM ALL_TAB_COMMENTS c
     , ALL_CATALOG      t
WHERE c.OWNER      (+) = t.OWNER
   AND c.TABLE_NAME (+) = t.TABLE_NAME
   AND c.TABLE_TYPE (+) = t.TABLE_TYPE
)
ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME
"] at tablestest.pl line 8.
DBD::Oracle::db tables failed: ORA-02395: exceeded call limit on IO usage (DBD E
RROR: OCIStmtExecute) [for Statement "SELECT *
  FROM
(
  SELECT /*+ RULE*/
       NULL         TABLE_CAT
     , t.OWNER      TABLE_SCHEM
     , t.TABLE_NAME TABLE_NAME
     , decode(t.OWNER
          , 'SYS'    , 'SYSTEM '
          , 'SYSTEM' , 'SYSTEM '
          , '' ) || t.TABLE_TYPE TABLE_TYPE
     , c.COMMENTS   REMARKS
  FROM ALL_TAB_COMMENTS c
     , ALL_CATALOG      t
WHERE c.OWNER      (+) = t.OWNER
   AND c.TABLE_NAME (+) = t.TABLE_NAME
   AND c.TABLE_TYPE (+) = t.TABLE_TYPE
)
ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME
"] at tablestest.pl line 8.

I'm not impressed.

Update: I guess this method has been deprecated in favor of the table_info() method since the last time I looked. Why it doesn't just default to "SELECT object_name FROM user_objects WHERE object_type IN ('TABLE', 'VIEW')" if no arguments are provided is beyond me. I just want an array of table names for chrissakes!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.