Oracle查询实用命令

1、设置每行的长度:

SET LIN[ESIZE] 200;

2、设置分页数量:

SET PAGES[IZE] 50;

3、查看表空间相关信息: 

 select file_id, tablespace_name, file_name from dba_data_files;

4、查看系统中所有的表:

select owner, table_name, tablespace_name from dba_tables

5、查看所有用户的表:

select owner, table_name, tablespace_name from all_tables

6、查看当前用户下的所有的表:

select table_name, tablespace_name from user_tables

7、查看数据库的最多连接数:

show parameter processes    #最大连接数

8、查看当前连接数:

select * from V$SESSION where username is not null

9、查看不同用户的连接数:

select username,count(username) from V$SESSION where username is not null group by username

10、

原文地址:https://www.cnblogs.com/tq03/p/4110212.html