ORA 28267: invalid namespace value executing sql on table in different db
658396Sep 5 2008 — edited Dec 21 2008I have a procedure in a package, in which I need to execute a select statement on a different db, for which I created a db link. Executing this in my IDE (sqldeveloper) works fine and returns expected value. But when I invoke this package via jdbc, it fails with the above sql exception. Looking at the error documentation/help was not useful so far.
The statement looks like this:
srcSqlstmt := 'select count(*) from ' || srctabname || '@' || srcDBName || ' where ' || columnname || ' is not null';
where srcDBName is a database link that I created, to another database which contains srctabName.
Appreciate any tips on resolving this. Thanks !