rudydelhaye
5/24/2019 - 11:23 AM

ORCL - Vues matérialisées

select OWNER, MVIEW_NAME from all_mviews;
select OWNER, MVIEW_NAME from all_mviews where MVIEW_NAME like '%Nom_MV%';
set long 200000 pages 0 lines 131 doc off
select dbms_metadata.get_ddl('MATERIALIZED_VIEW','my_mv_name','my_owner') "DDL MVIEW" from dual;
set lines 200
col owner format a20
col DB_LINK format a20
col USERNAME format a20
col HOST format a20
col CREATED format a20
select * from dba_db_links;
set lines 200
col username format a20
col wait_class format a30
col OSUSER format a20
col EVENT format a20
select a.username, a.osuser, a.sid, a.serial#, b.spid, a.seconds_in_wait, 
       a.event, a.state, a.wait_class
from v$session a, v$process b
where a.paddr = b.addr
and a.seconds_in_wait > 500 and a.username is not null;

set lines 200
col username format a20
col wait_class format a30
col OSUSER format a20
col EVENT format a30
select distinct a.username, a.osuser, a.sid, a.serial#, b.spid, a.seconds_in_wait, 
       a.event, a.state, a.wait_class
from v$session a, v$process b
where a.username like 'ADMIN_MV' AND a.SID=1070 AND a.paddr = b.addr
and a.seconds_in_wait > 50;
alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
select sysdate + 30/(60*24) from dual;