Welcome 微信登录

首页 / 数据库 / MySQL / Oracle 查询表归属于哪个用户

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;更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Linux下通过mysqldump备份MySQL数据库成sql文件Oracle 跟踪文件和文件转储相关资讯      Oracle查询  Oracle查询用户 
  • MySQL、SQL Server、Oracle数据库  (08/16/2015 10:43:52)
  • Oracle分段查询  (02/08/2015 11:29:11)
  • Oracle 查询锁之间的依赖关系  (09/11/2014 06:21:54)
  • Oracle查询数据库对象所属用户  (03/25/2015 21:03:12)
  • Oracle 子查询因子化 浅谈(with的  (01/13/2015 18:46:53)
  • Oracle常用系统查询  (07/18/2014 16:03:01)
本文评论 查看全部评论 (0)
表情: 姓名: 字数

版权所有©石家庄振强科技有限公司2024 冀ICP备08103738号-5 网站地图