Orcale根据约束名查询表
select a.constraint_name, a.table_name, b.constraint_name
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and a.r_constraint_name = b.constraint_name
and a.constraint_name = 'FK_XXXXXXX'
Orcale锁表处理
1、查看数据库锁
2、找到锁
3、解除锁
SELECT SESSION_ID FROM V$LOCKED_OBJECT,USER_OBJECTS WHERE V$LOCKED_OBJECT.OBJECT_ID = USER_OBJECTS.OBJECT_ID;
SELECT SERIAL# FROM V$SESSION WHERE SID='136';
ALTER SYSTEM KILL SESSION '136,11847'; ---(48为SESSION_ID的值, 2476为SERIAL#的值)
记录修改完要先 “发布” 发布完之后要点击提交 “提交” 否则会导致锁表。