首页 > 其他 > 详细

查询大于1000行的表

时间:2017-02-15 22:06:59      阅读:134      评论:0      收藏:0      [点我收藏+]

1、 登录数据库服务器
2、 查看当前数据的实例
$ps -ef|grep smon
oracle 8747 1 0 14:38 ? 00:00:00 ora_smon_spsj ==spsj
则当前库的实例是spsj

sqlplus "/as sysdba"
3、 确认使用的schema,即登录数据库的用户名
SQL> select username from dba_users where account_status=‘OPEN‘;
4、 查询每个实例下用户的表的数据量
$export ORACLE_SID=spsj
$sqlplus / as sysdba
SQL>set linesize 200 pagesize 5000
SQL>select table_name,num_rows from dba_tables where owner in(‘用户1‘, ‘用户2‘) and num_rows>1000;

如:
select table_name,num_rows from dba_tables where owner in(‘SPSJ‘) and num_rows>1000;

查询大于1000行的表

原文:http://www.cnblogs.com/sprinng/p/6403542.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!