PlSQLDeveloper 工具提供了会话管理功能。
能够查询会话内容、杀死会话、查看会话 SQL 等操作。
常用的会话查询 SQL 如下:
-- 查询所有会话
select * from v$session where username is not null order by logon_time, sid
-- 查询用户会话
select * from v$session where username = user order by logon_time, sid
-- 查询活动会话
select * from v$session where username is not null and status = 'ACTIVE' order by logon_time, sid
PLSQL 登录时数据库没有可以选择的问题
在安装好 Oracle 后,接着安装 PLSQLDeveloper,在 PLSQLDeveloper 登录时出现以下界面,既没有数据库选项,也没有连接为一栏。
1 解决没有连接为问题:
将 PLSQL 文件夹中的 instantclient-b