常用Oracle的SQL语句

前端之家收集整理的这篇文章主要介绍了常用Oracle的SQL语句前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

select open_mode from v$database;  #查看数据库的状态模式

select count(*) from dba_users; #查看有多少dba角色的用户

select status,instance_name from v$instance; #查看实例状态,名称

select member from v$logfile;  #查看日志组成员

show parameter spfile; #查看有关参数文件

show parameter  【*a-zA-Z0-9】#类似like,模糊匹配查找有关的参数

sqlplus /@实例名 as sysdba #切换实例

ps -ef|grep smon #查看Oracle有多少实例

v$diag_info告警日志文件系统视图 select name,value from v$diag_info;

-------oracle 查看已经执行过的sql 这些是存在共享池中的 --------->
select * from v$sqlarea t order by t.LAST_ACTIVE_TIME desc
-----------查看oracle会话----------------------------》
select * from v$session t order by t.LAST_ACTIVE_TIME desc

select value from v$parameter where name like ‘proc%‘; --查看最大会话数select count(*) from v$process;--显示数据库当前的连接数select value from v$parameter where name =‘processes‘ --显示数据库最大连接数

猜你在找的Oracle相关文章