Autor: admin

Mover tabelas e índices para outra tablespace

Índices select ‘alter index ‘|| owner ||’.’||segment_name||’ rebuild tablespace USERS;’from dba_segmentswhere 0=0and owner = ‘xxxx’and tablespace_name<>’USERS’and segment_type=’INDEX’; Tabelas select ‘alter table ‘||owner ||’.’||segment_name||’ move tablespace USERS;’from dba_segmentswhere owner=’xxxxx’and tablespace_name<>’USERS’and segment_type=’TABLE’;...

trace

SELECT sqltext.TEXT,req.session_id,req.status,req.command,req.cpu_time,req.total_elapsed_time,start_time,right(convert(varchar,dateadd(ms, datediff(ms, start_time, getdate()), ‘1900-01-01’),121), 12) as ‘batch_duration1’,wait_timeFROM sys.dm_exec_requests reqCROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext...