oracle常用查询汇集

查询字符编码
select userenv('language') from dual;

查看被锁定的对象:

select *

  from v$locked_object l,dba_objects o ,v$session s

  where l.object_id = o.object_id and l.session_id=s.sid;

查询共享游标的sql语句:
  select sql_id ,sql_text,executions from v$sqlarea where sql_text like '';
数据库闪回
alter table nt2_agent enable row movement;
FLASHBACK TABLE nt2_agent TO TIMESTAMP TIMESTAMP'2010-12-21 09:00:00'

你可能感兴趣的:(oracle常用查询汇集)