Just for the sake of completeness, are you logging in as 'SYSTEM' in
your perl script?
Or are you logging in as a user which might not have permission to
see the table?
-Chris
In his original post, he did show that he was logged in, at least on
sqlplus, as system. I assumed he was in DBD::Oracle as well. Perhaps
I shouldn't have?
I took a brief look at sub table_info in Oracle.pm and the base query
looks like this:
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
)
with some rules after to determine what chunks of the where clause to add to it.
I haven't traced it all the way through, but I suggest sticking a
debug warning in there to let you know what is actually getting
executed. Something like:
warn $Sql;
Right before:
my $sth = $dbh->prepare($Sql) or return undef;
$sth->execute or return undef;
$sth;
}
Then examine STDOUT to see what is actually getting executed, or at
least attempted to. I notice that if it fails prepare, it just
returns undef.
Also, if nothing gets written to STDOUT, then it's probably bailing on
one of the conditionals before it gets this far.
--
--------------------------------------------------------------------------------------------------------------
The darkest places in hell are reserved for those who maintain their
neutrality in times of moral crisis.
Dante Alighieri (1265 - 1321)
They who would give up an essential liberty for temporary security,
deserve neither liberty or security.
Benjamin Franklin
Our lives begin to end the day we become silent about things that matter.
Martin Luther King
The right of the people to be secure in their persons, houses, papers,
and effects, against unreasonable searches and seizures, shall not be
violated, and no warrants shall issue, but upon probable cause,
supported by oath or affirmation, and particularly describing the
place to be searched, and the persons or things to be seized.
Amendment IV to the Constitution of the United States
--------------------------------------------------------------------------------------------------------------