VIEW MATERIALIZADA PARTICIONADA

VIEW MATERIALIZADA PARTICIONADA POR LETRA (range)

-- PRIMEIRO CRIA A TABELA DE LOG NA PRODUÇÃO
-- CREATE MATERIALIZED VIEW LOG ON PROD.NOMES
/
-- NA BASE REPLICADA NO MEU CASO RELATORIO
CREATE MATERIALIZED VIEW REL.NOMES
PARTITION BY RANGE (DES_PRIMEIRO_NOME)
( 
 PARTITION DES_PRIMEIRO_NOME_A VALUES LESS THAN ('B%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_05, 
 PARTITION DES_PRIMEIRO_NOME_BC VALUES LESS THAN ('D%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_05, 
 PARTITION DES_PRIMEIRO_NOME_D VALUES LESS THAN ('E%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_05, 
 PARTITION DES_PRIMEIRO_NOME_E VALUES LESS THAN ('F%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_05, 
 PARTITION DES_PRIMEIRO_NOME_FG VALUES LESS THAN ('H%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_06, 
 PARTITION DES_PRIMEIRO_NOME_HI VALUES LESS THAN ('J%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_06, 
 PARTITION DES_PRIMEIRO_NOME_J VALUES LESS THAN ('K%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_06, 
 PARTITION DES_PRIMEIRO_NOME_KL_MARI VALUES LESS THAN ('MARI%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_06, 
 PARTITION DES_PRIMEIRO_NOME_MARIA VALUES LESS THAN ('MARIB%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01, 
 PARTITION DES_PRIMEIRO_NOME_M VALUES LESS THAN ('N%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01, 
 PARTITION DES_PRIMEIRO_NOME_NOPQ VALUES LESS THAN ('R%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01, 
 PARTITION DES_PRIMEIRO_NOME_R VALUES LESS THAN ('S%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01, 
 PARTITION DES_PRIMEIRO_NOME_ST VALUES LESS THAN ('U%')
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01, 
 PARTITION DES_PRIMEIRO_NOME_UVWXYZ VALUES LESS THAN (MAXVALUE)
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBA_DT_01
)
BUILD IMMEDIATE REFRESH FAST ENABLE QUERY REWRITE AS SELECT * FROM NOMES@PROD
/

QUERY PARA VERIFICAR AS VIEWS MATERIALIZADAS POR TEMPO DE REFRESH

set serveroutput on size 1000000
 set lines 200
 set pages 30
 set feedback on
 set head on
 set echo on
column last_refresh_type format a40
 column owner format a7
 column mview_name format a40
 select owner, mview_name, last_refresh_type, to_char(last_refresh_date, 'dd/mm/yy hh24:mi') refresh
 from dba_mviews
 where
 last_refresh_date < sysdate - (30 * (((1/24)/60)))
 /

VIEW MATERIALIZADA PARTICIONADA POR DATA (range)

--GRANT GLOBAL QUERY REWRITE TO DBAREL
 CREATE MATERIALIZED VIEW DBAREL.CONSULTA_REALIZADA_DETALHE PARALLEL
 PARTITION BY RANGE ("DAT_CONSULTA") 
 (PARTITION "DBAJAVA_DATA_DCA_200708" VALUES LESS THAN (TO_DATE(' 2007-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS','NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200709" VALUES LESS THAN (TO_DATE(' 2007-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200710" VALUES LESS THAN (TO_DATE(' 2007-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200711" VALUES LESS THAN (TO_DATE(' 2007-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200712" VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200801" VALUES LESS THAN (TO_DATE(' 2008-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200802" VALUES LESS THAN (TO_DATE(' 2008-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200803" VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200804" VALUES LESS THAN (TO_DATE(' 2008-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200805" VALUES LESS THAN (TO_DATE(' 2008-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200806" VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200807" VALUES LESS THAN (TO_DATE(' 2008-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200808" VALUES LESS THAN (TO_DATE(' 2008-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200809" VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200810" VALUES LESS THAN (TO_DATE(' 2008-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200811" VALUES LESS THAN (TO_DATE(' 2008-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200812" VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200901" VALUES LESS THAN (TO_DATE(' 2009-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200902" VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200903" VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200904" VALUES LESS THAN (TO_DATE(' 2009-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200905" VALUES LESS THAN (TO_DATE(' 2009-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200906" VALUES LESS THAN (TO_DATE(' 2009-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200907" VALUES LESS THAN (TO_DATE(' 2009-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200908" VALUES LESS THAN (TO_DATE(' 2009-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200909" VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200910" VALUES LESS THAN (TO_DATE(' 2009-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200911" VALUES LESS THAN (TO_DATE(' 2009-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" , 
 PARTITION "DBAJAVA_DATA_DCA_200912" VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) TABLESPACE "TBS_DBAREL_DT_05" )
 BUILD IMMEDIATE 
 REFRESH FAST 
 ENABLE QUERY REWRITE 
 AS SELECT * FROM DBAJAVA.CONSULTA_REALIZADA_DETALHE@DBAAP
 /

 --

OUTRA VIEW MATERIALIZADA PARTICIONADA POR DATA (range)

CREATE MATERIALIZED VIEW DBAREL.H_CONTRA_ORDEM PARALLEL
PARTITION BY RANGE (DAT_OCORRENCIA)
( 
 PARTITION DBABR_DATA_CTO_Q1_2001 VALUES LESS THAN (TO_DATE(' 2001-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2001 VALUES LESS THAN (TO_DATE(' 2001-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2001 VALUES LESS THAN (TO_DATE(' 2001-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2001 VALUES LESS THAN (TO_DATE(' 2002-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2002 VALUES LESS THAN (TO_DATE(' 2002-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2002 VALUES LESS THAN (TO_DATE(' 2002-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2002 VALUES LESS THAN (TO_DATE(' 2002-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2002 VALUES LESS THAN (TO_DATE(' 2003-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2003 VALUES LESS THAN (TO_DATE(' 2003-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2003 VALUES LESS THAN (TO_DATE(' 2003-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2003 VALUES LESS THAN (TO_DATE(' 2003-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2003 VALUES LESS THAN (TO_DATE(' 2004-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2004 VALUES LESS THAN (TO_DATE(' 2004-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2004 VALUES LESS THAN (TO_DATE(' 2004-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2004 VALUES LESS THAN (TO_DATE(' 2004-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2004 VALUES LESS THAN (TO_DATE(' 2005-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2005 VALUES LESS THAN (TO_DATE(' 2005-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2005 VALUES LESS THAN (TO_DATE(' 2005-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2005 VALUES LESS THAN (TO_DATE(' 2005-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2005 VALUES LESS THAN (TO_DATE(' 2006-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2006 VALUES LESS THAN (TO_DATE(' 2006-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2006 VALUES LESS THAN (TO_DATE(' 2006-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2006 VALUES LESS THAN (TO_DATE(' 2006-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2006 VALUES LESS THAN (TO_DATE(' 2007-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2007 VALUES LESS THAN (TO_DATE(' 2007-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2007 VALUES LESS THAN (TO_DATE(' 2007-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2007 VALUES LESS THAN (TO_DATE(' 2007-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2007 VALUES LESS THAN (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2008 VALUES LESS THAN (TO_DATE(' 2008-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2008 VALUES LESS THAN (TO_DATE(' 2008-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2008 VALUES LESS THAN (TO_DATE(' 2008-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2008 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q1_2009 VALUES LESS THAN (TO_DATE(' 2009-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q2_2009 VALUES LESS THAN (TO_DATE(' 2009-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q3_2009 VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07, 
 PARTITION DBABR_DATA_CTO_Q4_2009 VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
 LOGGING
 NOCOMPRESS
 TABLESPACE TBS_DBAREL_DT_07
)
 BUILD IMMEDIATE REFRESH FAST ENABLE QUERY REWRITE 
 AS SELECT * FROM H_CONTRA_ORDEM@DBAAP
 /

Sobre Alexandre Pires

ORACLE OCS Goldengate Specialist, OCE RAC 10g R2, OCP 12C, 11g, 10g , 9i e 8i - Mais de 25 anos de experiência na área de TI. Participei de projetos na G&P alocado na TOK STOK, EDINFOR alocado na TV CIDADE "NET", 3CON Alocado no PÃO DE AÇUCAR, DISCOVER alocado na VIVO, BANCO IBI e TIVIT, SPC BRASIL, UOLDIVEO alocado no CARREFOUR e atualmente na ORACLE ACS atendendo os seguintes projetos: VIVO, CLARO, TIM, CIELO, CAIXA SEGUROS, MAPFRE, PORTO SEGURO, SULAMERICA, BRADESCO SEGUROS, BANCO BRADESCO, BASA, SANTANDER, CNJ, TSE, ELETROPAULO, EDP, SKY, NATURA, ODEBRESHT, NISSEI, SICREDI, CELEPAR, TAM, TIVIT, IBM, SMILES, CELEPAR, SERPRO,OKI,BANCO PAN, etc
Esse post foi publicado em PARTICIONAMENTO, VIEW MATERIALIZADA e marcado . Guardar link permanente.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s