PL/SQL (MOSC)

MOSC Banner

EXECUTE IMMEDIATE, MLOG$ and ORA-00903: invalid table name

edited Jan 5, 2015 12:11PM in PL/SQL (MOSC) 2 commentsAnswered ✓

Hi All,

I need to look into number of MV Log tables so I created a stored procedure as follows:

create or replace procedure plined_mloginfo(mlogname in varchar2)
as
  mrowcounts integer;
  mtabsize integer;
begin
  execute immediate 'select count(*) from :a' into  mrowcounts using mlogname;
  execute immediate 'select bytes/1024/1024  from :b' into  mtabsize using mlogname;
  dbms_output.put('Table : '||mlogname);
  dbms_output.put('Row counts: '||mrowcounts);
  dbms_output.put_line('Size: '||mtabsize);
end;





Now when trying to execute it, I'm getting ORA-00903.

exec plined_mloginfo('"MLOG$_ABC"');

BEGIN plined_mloginfo('"MLOG$_ABC"'); END;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center