-- Create the user
create user lesdba
identified by les_321
default tablespace USERS
temporary tablespace TEMP
profile DEFAULT
password expire;
-- Grant/Revoke role privileges
grant connect to lesdba;
grant dba to lesdba;
grant resource to lesdba;
-- Grant/Revoke system privileges
grant administer any sql tuning set to lesdba;
grant administer database trigger to lesdba;
grant administer sql management object to lesdba;
grant administer sql tuning set to lesdba;
grant create view to lesdba;
grant unlimited tablespace to lesdba;
----------------------- 查询是否锁表
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode,
machine
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
alter system kill session'61,1020'; --SID SERIAL#