Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

basic question on querying oracle tables in SAP ERP

Hi,

I have some basic question. This question is related to SAP ERP and Oracle Database. 

I can query the "dba_users" table....

***********

SQL> select username from dba_users where rownum < 2;

USERNAME

------------------------------

SYS

SQL>

******

But when I get all the tables, dba_users table is not found......

SQL> select tablespace_name, table_name from all_tables where table_name='dba_users';

no rows selected

SQL>

I am not sure why "all_tables" didn't return the "dba_users" table, though the "dba_users" table exists?

If you've any idea regarding this, can you please let us know.

Thanks,

Mahesh

Tags:
Former Member
replied

Hi Mahesh,

it's a little bit tricky to deal with v$-views.

V$SYSSTAT  is a public synonym for the view V_$SYSSTAT from user SYS.
But you don't find V$SYSSTAT in dba_views but in dba_synoynms.


Try this

select * from dba_synonyms where synonym_name = 'V$SYSSTAT';

OWNER           SYNONYM_NAME         TABLE_OWNER        TABLE_NAME       
--------------- -------------------- ------------------ --------------
PUBLIC          V$SYSSTAT            SYS                V_$SYSSTAT

And don't worry about the column Name 'TABLE_NAME' it's still a view.


Have a look at the Oracle documentation  About Dynamic Performance Views


regards
Kay

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question