sql①case when的使用
case when
SELECT CASE
WHEN DUAL.DUMMY IS NOT NULL THENSELECT '1' FROM DUAL), '3')
sql②杀进程
SELECT OBJECT_NAME, MACHINE, S.SID, S.SERIAL#
FROM GV$LOCKED_OBJECT L, DBA_OBJECTS O, GV$SESSION S
WHERE L.OBJECT_ID = O.OBJECT_ID
AND L.SESSION_ID = S.SID;
ALTER system kill session '41,15074';
③
-- 查询属性
SELECT NAME, VALUE FROM GV$PARAMETER WHERE NAME LIKE '%limit%';
SHOW PARAMETER RESOURCE_LIMIT;
-- 显示停止的绘画进程
SELECT SID, SERIAL#, PADDR, USERNAME, STATUS
FROM V$SESSION
WHERE STATUS = 'SNIPED';
-- 设置空闲时间超时时间
ALTER PROFILE DEFAULT LIMIT IDLE_TIME 30;
-- 查询user的profile文件
select username,profile from DBA_USERS;
-- 查询profile属性
select profile, resource_name, limit from dba_profiles where profile='APP_USER' and resource_name ='IDLE_TIME';