Search code examples
sqloraclesqlplusora-00942

As System in Sqlplus, how do I query another user's table?


According to select name from system_privilege_map System has been granted:

SELECT ANY TABLE

...and lots of other * ANY TABLES.

Plainly running

select * from the_table;
select * from the_table;

...nets the given response:

ERROR at line 1: ORA-00942: table or view does not exist

I can log in as that user and run the same command just fine.

I'm running under the assumption I should be able to run queries (select in this case) agaisnt a general user's DB table. Is my assumption correct, and if so, how do I do it?


Solution

  • If the_table is owned by user "some_user" then:

    select * from some_user.the_table;