Oracle命令--查询语句
2013-05-31 17:10
399 查看
当前存在哪些表空间
Select * from v$tablespace;
表空间有多大
Select tablespace_name,sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
表空间还剩多少空闲空间
Select tablespace_name,sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;
查询imuse01用户所使用的缺省表空间
select default_tablespace from dba_users where username=’imuse01’;
查询imuse01用户所使用的临时表空间
select temporary_tablespace from dba_users where username=’imuse01’;
查询当前用户所拥有的角色
select * from session_roles;
查看违反唯一索引的表及列:
如果插入数据时系统提示:unique constraint (IMUSE01.SYS_C004960) violated.则说明在为IMUSE01用户插入数据时违反了唯一索引SYS_C004960。
查看违反唯一索引的表:
select table_name from user_indexes where index_name=’ SYS_C004960’;
查看违反唯一索引的列:
select column_name from user_ind_columns where index_name=’ SYS_C004960’;
查看编译无效的存储过程:
select object_name from user_objects where status=’INVALID’ and object_type=’ PROCEDURE’;
查看当前运行的实例名:
select instance_name from v$instance;
Select * from v$tablespace;
表空间有多大
Select tablespace_name,sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
表空间还剩多少空闲空间
Select tablespace_name,sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;
查询imuse01用户所使用的缺省表空间
select default_tablespace from dba_users where username=’imuse01’;
查询imuse01用户所使用的临时表空间
select temporary_tablespace from dba_users where username=’imuse01’;
查询当前用户所拥有的角色
select * from session_roles;
查看违反唯一索引的表及列:
如果插入数据时系统提示:unique constraint (IMUSE01.SYS_C004960) violated.则说明在为IMUSE01用户插入数据时违反了唯一索引SYS_C004960。
查看违反唯一索引的表:
select table_name from user_indexes where index_name=’ SYS_C004960’;
查看违反唯一索引的列:
select column_name from user_ind_columns where index_name=’ SYS_C004960’;
查看编译无效的存储过程:
select object_name from user_objects where status=’INVALID’ and object_type=’ PROCEDURE’;
查看当前运行的实例名:
select instance_name from v$instance;
相关文章推荐
- oracle查询语句大全 oracle 基本命令大全
- Oracle命令--查询语句
- Oracle管理常用查询等命令语句
- Oracle中查询当前数据库中的所有表空间和对应的数据文件语句命令
- oracle查询语句大全 oracle 基本命令大全
- oracle查询语句大全(oracle 基本命令大全一)
- oracle 基本命令及常用的查询语句
- oracle下常用查询更新命令(身份证号判断男女,更新语句多表查询)
- oracle查询语句大全(oracle 基本命令大全一)
- Oracle中查询当前数据库中的所有表空间和对应的数据文件语句命令
- oracle查询语句大全 oracle 基本命令大全
- oracle查询语句大全(oracle 基本命令大全一)
- oracle查询语句大全 oracle 基本命令大全
- oracle查询语句大全(oracle 基本命令大全一)
- Oracle sqlplus语句编辑命令
- oracle SQL语句练习MERGE、模糊查询、排序、
- 16种oracle查询语句
- ORACLE常用的查询语句
- mysql 常用命令,连接数据库,查看建表语句,批量导入数据,批量更新数据,连接查询
- 怎样看oracle查询语句执行计划?