Pedro

Olhando rapidamente, falta a "barra" (/) após a criação de cada trigger.
CREATE TRIGGER ...
...
BEGIN
...
END;
/


Nota: o commit no final não é necessário.

[ ]

André


Em 1 de setembro de 2011 14:35, Pedro Henrique Rogge Breis <
[email protected]> escreveu:

> **
>
>
> Segue o script:
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_DADOS_COD_IMPORTACAO
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_DADOS_COD_IMPORTACAO"
>
> before insert on dados_importacao
> for each row
> begin
> select seq_dados_cod_importacao.nextval into :new.cod_importacao from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_HISTACAO_NUM_SEQ_ACAO
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_HISTACAO_NUM_SEQ_ACAO"
> before insert on historico_acao
> for each row
> begin
> select seq_histacao_num_seq_acao.nextval into :new.num_seq_acao from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_HISTARQ_NUM_SEQ_ARQ
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_HISTARQ_NUM_SEQ_ARQ"
> before insert on historico_arquivo
> for each row
> begin
> select seq_histarq_num_seq_arq.nextval into :new.num_seq_arq from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_LAYOUTCOL_COD_LAYOUT_COL
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_LAYOUTCOL_COD_LAYOUT_COL"
> before insert on layout_colunas
> for each row
> begin
> select seq_layoutcol_cod_layout_col.nextval into :new.cod_layout_col from
> dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_LYT_NUM_SEQ_TIPO_LYT
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_LYT_NUM_SEQ_TIPO_LYT"
> before insert on layout
> for each row
> begin
> select seq_layout_num_seq_tipo_lyt.nextval into :new.num_seq_tipo_layout
> from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_METRICA_COD_METRICA
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_METRICA_COD_METRICA"
> before insert on metrica
> for each row
> begin
> select seq_metrica_cod_metrica.nextval into :new.cod_metrica from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_PENDEQP_NUM_SEQ_PEND
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_PENDEQP_NUM_SEQ_PEND"
> before insert on pendencia_equipamento
> for each row
> begin
> select seq_pendeqp_num_seq_pend.nextval into :new.num_seq_pend from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_TPACAO_NUM_SEQ_TIPO_ACAO
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_TPACAO_NUM_SEQ_TIPO_ACAO"
> before insert on tipo_acao
> for each row
> begin
> select seq_tpacao_num_seq_tipo_acao.nextval into :new.num_seq_tipo_acao
> from dual;
> end;
>
> --------------------------------------------------------
> -- DDL for Trigger GERA_TPMETR_NUM_SEQ_TIPO_METR
> --------------------------------------------------------
>
> CREATE OR REPLACE TRIGGER "GERA_TPMETR_NUM_SEQ_TIPO_METR"
> before insert on tipo_metrica
> for each row
> begin
> select seq_tpmetr_num_seq_tipo_metr.nextval into :new.num_seq_tipo_metrica
> from dual;
> end;
>
> commit;
>
> Atenciosamente,
>
> [cid:[email protected]]
>
>
> Pedro Breis
> DPEI/DVTI - Equipe de Desenvolvimento - Quality Assurance
> Instituto de Tecnologia para o Desenvolvimento - LACTEC
> [email protected]<mailto:[email protected]>
> http://www.lactec.org.br<http://www.lactec.org.br/>
>
> TEL: 55+ (041) 3361-6065 CEL: 55+ (041) 8847-2924
>
> This message, including any attachments, is confidential and may contain
> privileged or exempt from disclosure. It is intended only for the person to
> whom it is addressed unless expressly authorized otherwise by the sender. If
> you are not an authorized recipient, please notify the sender immediately
> and permanently destroy all copies of this message and attachments. Any use,
> replication or dissemination of this message or any part thereof is
> prohibited.
>
> De: [email protected] [mailto:[email protected]] Em
> nome de Milton Bastos Henriquis Junior
> Enviada em: quinta-feira, 1 de setembro de 2011 14:33
>
> Para: [email protected]
> Assunto: [oracle_br] RES: Compilação de triggers
>
>
> Deixa eu ver se entendi...
>
> Vc tem um script que gera triggers. Ao rodar esse script, a execução não
> termina nunca.
>
> Portanto não é a execução da trigger que está "travando", e sim a execução
> do script.
> Não seria melhor então vc passar o código do script ao invés do código da
> trigger?
>
> --
> Milton Bastos
> http://miltonbastos.com
>
> De: [email protected]<mailto:oracle_br%40yahoogrupos.com.br>
> [mailto:[email protected]<mailto:oracle_br%40yahoogrupos.com.br>]
> Em nome de Pedro Henrique Rogge Breis
>
> Enviada em: quinta-feira, 1 de setembro de 2011 14:12
> Para: [email protected]<mailto:oracle_br%40yahoogrupos.com.br>
>
> Assunto: [oracle_br] Compilação de triggers
>
> Boa tarde pessoal,
>
> Estou com um problema com umas triggers aqui. Tenho um script que gera
> algumas triggers e, ao rodar esse script, o Oracle trava como se estivesse
> em loop infinito.
>
> Alguém já passou por isso?????
>
> O Oracle é o 9i rodando em ambiente Windows Server 2003.
>
> Exemplo das triggers:
>
> create or replace trigger gera_dados_cod_importacao
> before insert on dados_importacao
> for each row
> begin
> select seq_dados_cod_importacao.nextval into :new.cod_importacao from dual;
> end;
>
> Atenciosamente,
>
> [cid:[email protected]<mailto:
> image001.gif%4001CC68B0.0CFEF4F0><mailto:image001.gif%4001CC68B0.0CFEF4F0
> >]
>
>
> Pedro Breis
> DPEI/DVTI - Equipe de Desenvolvimento - Quality Assurance
> Instituto de Tecnologia para o Desenvolvimento - LACTEC
> [email protected]<mailto:pedro.breis%40lactec.org.br><mailto:
> pedro.breis%40lactec.org.br><mailto:[email protected]<mailto:
> pedro.breis%40lactec.org.br><mailto:pedro.breis%40lactec.org.br>>
> http://www.lactec.org.br<http://www.lactec.org.br/>
>
> TEL: 55+ (041) 3361-6065 CEL: 55+ (041) 8847-2924
>
> This message, including any attachments, is confidential and may contain
> privileged or exempt from disclosure. It is intended only for the person to
> whom it is addressed unless expressly authorized otherwise by the sender. If
> you are not an authorized recipient, please notify the sender immediately
> and permanently destroy all copies of this message and attachments. Any use,
> replication or dissemination of this message or any part thereof is
> prohibited.
>
> [As partes desta mensagem que não continham texto foram removidas]
>
> Clique aqui<https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==> para
> reportar este e-mail como SPAM.
>
> This message has been scanned for malware by Websense. www.websense.com<
> http://www.websense.com>
>
>
> [As partes desta mensagem que não continham texto foram removidas]
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>  
>


[As partes desta mensagem que não continham texto foram removidas]



------------------------------------

--------------------------------------------------------------------------------------------------------------------------
>Atenção! As mensagens do grupo ORACLE_BR são de acesso público e de inteira 
>responsabilidade de seus remetentes.
Acesse: http://www.mail-archive.com/[email protected]/ 
--------------------------------------------------------------------------------------------------------------------------
>Apostilas » Dicas e Exemplos » Função » Mundo Oracle » Package » Procedure » 
>Scripts » Tutoriais - O GRUPO ORACLE_BR TEM SEU PROPRIO ESPAÇO! VISITE: 
>http://www.oraclebr.com.br/  
------------------------------------------------------------------------------------------------------------------------
 Links do Yahoo! Grupos

<*> Para visitar o site do seu grupo na web, acesse:
    http://br.groups.yahoo.com/group/oracle_br/

<*> Para sair deste grupo, envie um e-mail para:
    [email protected]

<*> O uso que você faz do Yahoo! Grupos está sujeito aos:
    http://br.yahoo.com/info/utos.html


Responder a