oracle数据库用户在哪个表里,oracle数据库的用户在什么表中
来源:整理 编辑:黑码技术 2024-04-13 14:39:27
本文目录一览
1,oracle数据库的用户在什么表中
select username,default_tablespace from dba_users;在dba_users表中你是要查看数据库中的表信息的,还是要查看某个用户下某张表的内容?数据库中的表信息,可以在静态性能视图中查看:dba_tables/all_tables/user_tables 其中dba_需要有dba权限,all_除了自己当前用户的表信息,还可以查到别的用户的但是有权限查看的表信息,user_只包含当前用户的信息如果你是需要查看某用户下某张表内容,如果是当前用户,直接select 要看的字段 from 表名;如果是别的用户下的表,你首先要让相应用户赋权(grant select on table_1 to user_1;),然后你才可以查看 select * from user_2.table_1 ;
2,Oracle 查询登陆用户名属于哪个表空间
需要有dba的权限1、查看用户使用的缺省表空间名称你一定知道你登陆的用户名是吧,以sysdba登陆。sqlplus / as sysdbaselect username,default_tablespace from dba_users;2、查看表空间总大小,及其已使用大小select a.tablespace_name,a.bytes/1024/1024 "Sum MB",(a.bytes-b.bytes)/1024/1024 "used MB",b.bytes/1024/1024 "free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"from(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b
3,oracle怎么查看用户属于哪个表空间
1、数据字典中用户表:dba_users;通过数据字典查看有多少个用户:select username from dba_users。2、数据字典中表空间表: dba_tablespaces;查看有几个表空间:select tablespace_name from dba_tablespaces。3、oracle 查看用户所在的表空间:select username,default_tablespace from dba_users order by username;如图所示;4、完成效果图。select username,default_tablespace from dba_users order by username需要有dba的权限1、查看用户使用的缺省表空间名称你一定知道你登陆的用户名是吧,以sysdba登陆。sqlplus / as sysdbaselect username,default_tablespace from dba_users;2、查看表空间总大小,及其已使用大小select a.tablespace_name,a.bytes/1024/1024 "Sum MB",(a.bytes-b.bytes)/1024/1024 "used MB",b.bytes/1024/1024 "free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"from(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a,(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) bwhere a.tablespace_name=b.tablespace_nameorder by ((a.bytes-b.bytes)/a.bytes) desc;需要有dba的权限1、查看用户使用的缺省表空间名称 你一定知道你登陆的用户名是吧, 以sysdba登陆。?捌湟咽褂么笮 select a.tablespace_name,a.bytes/1024/1024 "sum mb",(a.bytes-b.bytes)/1024/1024 "used mb",b.bytes/1024/1024 "free mb", round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used" from (select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name) a, (select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name) b where a.tablespace_name=b.tablespace_name order by ((a.bytes-b.bytes)/a.bytes) desc;
文章TAG:
oracle oracle数据库 数据 数据库 oracle数据库用户在哪个表里