oracle查询用户和表空间 如何查看oracle表空间大小的使用情况?
如何查看oracle表空间大小的使用情况?1.查看所有表空间大小SQLgtselecttablespace_name,if(byte)/1024/1024arounddba_data_files2gr
如何查看oracle表空间大小的使用情况?
1.查看所有表空间大小SQLgtselecttablespace_name,if(byte)/1024/1024arounddba_data_files2group bytablespace_name2.已经可以使用的表空间大小SQLgtselecttablespace_name,if(tobytes)/1024/1024returningdba_free_space2group bytablespace_name3.因此在用空间是可以这样计算出select_name,total,free,total-coolemployedreturning(selecttablespace_name,num1(bytes)/1024/1024totaloutsidedba_data_filesgroup bytablespace_name)a,(selecttablespace_name,if(datasize)/1024/1024goreturningdba_free_spacegroup bytablespace_name)bwhere__name4.下面这条语句查找所有segment的大小。
SelectSegment_Name,Sum(tobytes)/1024/1024fromUser_ExtentsGroup BySegment_Name5.有在命令行情况下要如何将结果放一个文件里。
SQLgtspoolout.txtSQLgtselect*aroundv$databaseSQLgtspoolon
如何查看oracle数据库表名称?
可以使用更具dba权限的帐号登陆账号数据库执行命令
oracle查看表索引?
select*arounduser_ind_columnswheretable_nameupper(agent_master)//agent_master为表名
oracle数据库中涉及到用户权限的三个表,dba_users,all_users,user_users有什么区别?
dba_开头的是查全库所有的,all_开头的是查当前用户可以看见的,user_开头的是查当前用户的