不管是自己的,还是其他用户的,只要是该用户能访问的表,都列出所有者和表名来。
最好不包括系统表,只包括用户创建的数据表。

解决方案 »

  1.   

    select owner,table_name from all_tables
    where owner not LIKE '%SYS%' ;
      

  2.   

    select table_name from all_tables
    where owner ='*****';
      

  3.   

    用:system/admin 进去,是权限最大的用户,可以看到任何表:
    select * from a.tablename
    select * from b.tablename
    select * from c.tablename
    select * from d.tablename
    ....
      

  4.   


    把dba的权限给它
    grant to dba user
      

  5.   

    grant dba to user;
    select owner,table_name from dba_tables where owner not like '%SYS%';前提是你的用户名中没有sys字样
      

  6.   

    SQL> conn test/test  --test用户是新建的一个用户 没有创建过任何表
    Connected.
    SQL> create table t1(id number); --创建一个表t1Table created.SQL> select owner,table_name from all_tables  --这里可以查询到
      2  where owner not like '%SYS%';OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    TEST                           T1SQL> conn scott/tiger  --以scott用户登录 并把scott下的表dept的查询权限赋给test用户
    Connected.
    SQL> grant select on dept to test;Grant succeeded.SQL> conn test/test
    Connected.
    SQL> select owner,table_name from all_tables --现在可以看到同样的查询有两条记录了
      2  where owner not like '%SYS%';OWNER                          TABLE_NAME
    ------------------------------ ------------------------------
    SCOTT                          DEPT
    TEST                           T1
      

  7.   

    Public Function GetTables_Info(ByVal CnStr As String) As DataTable
     Dim conn As New OleDbConnection(CnStr)
     conn.Open()
     Dim schemaTable As DataTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables_Info, New Object() {Nothing}) 
    conn.Close() 
    Return schemaTable
     End Function