Chinaunix首页 | 论坛 | 博客
  • 博客访问: 82849
  • 博文数量: 23
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-22 11:13
文章分类
文章存档

2011年(1)

2009年(22)

我的朋友

分类: Oracle

2009-07-03 09:44:33

oracle查询包含某个字段的表:

select table_name from user_tab_cols where column_name = 'xxx'

oracle查询所有用户表:
select * from user_all_tables

oracle查询所有函数和储存过程:

select * from user_source

oracle查询所有用户:

select * from all_users


select * from dba_users

oralce查看当前用户连接:

select * from v$Session

oracle查看当前用户权限:

select * from session_privs

oracle查看表空间使用情况:

select a.file_id "FileNo",a.tablespace_name
"Tablespace_name",
a.bytes "Bytes",a.bytes-sum(nvl(b.bytes,0)) "Used",
sum(nvl(b.bytes,0)) "Free",
sum(nvl(b.bytes,0))/a.bytes*100 "%free"
from dba_data_files a, dba_free_space b
where a.file_id=b.file_id(+)
group by a.tablespace_name ,
a.file_id,a.bytes order by a.tablespace_name;
 


阅读(4077) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~