col username for a23 col machine for a30 col status for a10 col event for a36 set term off alter session set nls_date_format='dd/mm/yyyy hh24:mi:Ss'; set term on set feedback on set head on select username, BLOCKING_SESSION, --machine, sql_id,/*SQL_HASH_VALUE*/ logon_time, event, SECONDS_IN_WAIT as WAIT, LAST_CALL_ET AS DURACAO from gv$session where sid not in (SELECT SID FROM gV$SESSION WHERE audsid = userenv('SESSIONID')) and username not in (' ','SYS','SYSMAN','DBSNMP') and event not in ('SQL*Net message from client','Streams AQ: waiting for messages in the queue','Streams AQ: waiting for time management or cleanup tasks') and status = 'ACTIVE' order by logon_time asc;
create index SAF.IDENT_DOCTO_FISCAL_99 on SAF.DWT_ITENS_MERC
(min_size)/1024/1024/1024 gb_min_size, (max_size)/1024/1024/1024 gb_max_size from v$memory_dynamic_components ;
col status for a10
col event for a36 set term off alter session set nls_date_format='dd/mm/yyyy hh24:mi:Ss'; set term on set feedback on set head on select username, BLOCKING_SESSION, --machine, sql_id,/*SQL_HASH_VALUE*/ logon_time, event, SECONDS_IN_WAIT as WAIT, LAST_CALL_ET AS DURACAO from gv$session where sid not in (SELECT SID FROM gV$SESSION WHERE audsid = userenv('SESSIONID')) and username not in (' ','SYS','SYSMAN','DBSNMP') and event not in ('SQL*Net message from client','Streams AQ: waiting for messages in the queue','Streams AQ: waiting for time management or cleanup tasks') and status = 'ACTIVE' order by logon_time asc;
CREATE INDEX "SAF"."IX_DWT_ITENS_MERC_01" ON "SAF"."DWT_ITENS_MERC"
("DAT_EMBARQUE", "COD_ESTAB", "COD_EMPRESA") tablespace msaf_index ; create index SAF.IDENT_DOCTO_FISCAL_99 on SAF.DWT_ITENS_MERC (IDENT_DOCTO_FISCAL,IDENT_CFO) tablespace msaf_index ; EXECUTE DBMS_STATS.GATHER_TABLE_STATS('SAF','DWT_ITENS_MERC',cascade=>true, degree=>8, method_opt=>'FOR ALL COLUMNS SIZE AUTO');