oracle 查询表空间
测试用户连接
C:\Users\ZP>sqlplus /nolog
conn hbcxuser/hbcxpass
--查看所有表空间
select * from user_tablespaces
--查看数据库里面所有用户,前提是你是有dba权限的帐号,如sys,system
select username from dba_users;
--查看你能管理的所有用户!
select * from all_users
--查看当前用户信息
select * from user_users;
--查看表所属的变空间
select table_name 表名 ,tablespace_name 所使用表空间 from user_tables;
--给已存在的用户指定一个表空间
alter user username default tablespace userspace;
--创建用户的时候指定表空间
create user username identified by userpassword default tablespace userspace;
--查看当前用户所在表空间
select username,default_tablespace from user_users;
--查看用户所拥有的角色
select * from user_role_privs;
DBA:该角色具有数据库所有的权限。
CONNECT:该角色具有连接数据库的权限,和create session的权限一样。
RESOURCE:该角色是应用程序开发角色。
角色其实就是一类权限的分组,所以给用户分配角色其实也是在给用户分配权限。在oracle中有三个比较常用的角色。对于一般不是很严格的系统可以授予开发用户CONNECT、RESOURCE角色权限即可!!!
————————————————
oracle 查询表空间的更多相关文章
- Oracle查询表空间使用率很慢
Oracle查询表空间使用率很慢 问题描述 执行查询表空间的语句,需要接近2min的时间才能执行完成. 以前也在其他客户的生产库遇到过一样的情况,当时是由于回收站的内容过多引起的. 不过这次的情况却不 ...
- Oracle查询表空间使用情况
--查询表空间使用情况 SELECT UPPER(F.TABLESPACE_NAME) "表空间名", D.TOT_GROOTTE_MB "表空间大小(M)", ...
- oracle查询表空间的空间占用情况
,) percent_used from (select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespac ...
- 回收站引发ORACLE查询表空间使用缓慢
一个哥们问我 ,他们查询 表空间使用率 跑了一个多小时,这个太坑爹了,让我 帮忙优化一下. SQL语句如下 select * from ( select ts.tablespace_name,ts.c ...
- oracle查询表空间的位置
SELECT * FROM Dba_Data_Files ddf WHERE ddf.tablespace_name = 'TablespaceName'; 以上SQL代码可以查询出表空间的所在路径和 ...
- Oracle 查询表空间使用情况
select * from (Select a.tablespace_name, to_char(a.bytes / 1024 / 1024, '99,999.999 ...
- Oracle查询表空间使用情况的一个sql
select t1.tablespace_name,curr_b/1024/1024/1024,max_b/1024/1024/1024,curr_b/max_b from(select table ...
- oracle 表空间、用户名 相关语句
一.oracle查询表空间文件所在路径 select * from dba_data_files t where t.tablespace_name='FLW' 二.计算出表空间各相关数据 SELE ...
- Oracle 统计表空间和对象历史增长量
最近7天内 每天(某个)表空间的增长量 col TS_NAME for a15 SELECT a.snap_id, a.rtime, c.tablespace_name ts_name, round( ...
随机推荐
- oracle(9) 序列和约束
序列 SEQUENCE 也是数据库对象之一,作用:根据指定的规则生成一些列数字. 序列通常是为某张表的主键提供值使用. 主键:通常每张表都会有主键字段,该字段的值要求非空且唯一, 使用该字段来确定表中 ...
- maven镜像仓库
国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用. ====================国内OSChina提供的镜像,非常不错=========== ...
- 施魔法(DP)
链接:https://ac.nowcoder.com/acm/contest/3003/H来源:牛客网 题目描述 牛可乐有 n 个元素( 编号 1..n ),第 i 个元素的能量值为 ai. 牛可乐 ...
- Neo4j安装配置(mac)
Neo4j安装配置(mac) 1.下载APP 注意:无需配置变量 下载地址:https://neo4j.com/download/ 2.安装程序并启动 3.创建数据库(local) 选择版本 4.启动 ...
- PAT Advanced 1066 Root of AVL Tree (25) [平衡⼆叉树(AVL树)]
题目 An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child ...
- 使用labelImg制作自己的数据集(VOC2007格式)用于Faster-RCNN训练
https://blog.csdn.net/u011956147/article/details/53239325 https://blog.csdn.net/u011574296/article/d ...
- torch基础学习
目录 Pytorch Leture 05: Linear Rregression in the Pytorch Way Logistic Regression 逻辑回归 - 二分类 Lecture07 ...
- TX2Ubuntu16.04远程登录
1.在PC机与TX2都要同步时钟: sudo apt-get install chrony sudo ntpdate ntp.ubuntu.com 如果ntpdate有错误检查是否安装ntpdate ...
- [Python]h5py/__init__.py:36:
个人博客地址:https://www.bearoom.xyz/2019/08/24/python-devolop-env-hdf5-problem/ 安装tensorflow之后,在导入tensorf ...
- 设x,y是概率空间(Ω,F,P)上的拟可积随机变量,证明:X=Y a.e 当且仅当 xdp = ydp 对每个A∈F成立。Q: X=Y almost surely iff ∀A∈G∫AXdP=∫AYdP
E{XE{Y|C}}=E{YE{X|C}} 现在有没有适合大学生用的搜题软件呢? https://www.zhihu.com/question/51935291/answer/514312093 ...