select owner,table_name from all_tables where owner not LIKE '%SYS%' ;
select table_name from all_tables where owner ='*****';
用:system/admin 进去,是权限最大的用户,可以看到任何表: select * from a.tablename select * from b.tablename select * from c.tablename select * from d.tablename ....
把dba的权限给它 grant to dba user
grant dba to user; select owner,table_name from dba_tables where owner not like '%SYS%';前提是你的用户名中没有sys字样
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
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
where owner not LIKE '%SYS%' ;
where owner ='*****';
select * from a.tablename
select * from b.tablename
select * from c.tablename
select * from d.tablename
....
把dba的权限给它
grant to dba user
select owner,table_name from dba_tables where owner not like '%SYS%';前提是你的用户名中没有sys字样
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
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