Júlio, Voce está certo, mas continuando seu laboratório, quando crias a visão como exposto, realmente gera o erro 2019:
SQL> create view a (a,b) as select a,b from te...@imaginario; create view a (a,b) as select a,b from te...@imaginario * ERRO na linha 1: ORA-02019: connection description for remote database not found Mas no caso do import, é acrescido a cláusula FORCE, o que maqueia o erro pra ti. Veja: SQL> create force view a (a,b) as select a,b from te...@imaginario; Advertência: View criada com erros de compilação. SQL> select object_name, object_type, status 2 from all_objects where object_name = 'A'; OBJECT_NAME OBJECT_TYPE STATUS ---------------------------------------- ------------------- ------- A VIEW INVALID Que é o caso que descreves. Teste ai. 2009/1/30 Júlio César Corrêa <juliotubi...@yahoo.com.br> > Como db_link invalido?Não existente? > Se fosse inexistente deveria gerar este erro: > > Microsoft Windows XP [versão 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > C:\Documents and Settings\jcorrea>sqlplus /nolog > > SQL*Plus: Release 10.2.0.1.0 - Production on Sex Jan 30 17:35:27 2009 > > Copyright (c) 1982, 2005, Oracle. All rights reserved. > > idle> conn c...@dsnv > Informe a senha: > Conectado. > c...@dsnv> create or replace view vw_bla > 2 as select * from user_tab...@db_link_inexistente; > ORA-0000 - commit nao se loga > as select * from user_tab...@db_link_inexistente > * > ERRO na linha 2: > ORA-02019: connection description for remote database not found > > > c...@dsnv> > > > 2009/1/30 Thiago Delfim <tdel...@gmail.com> > > > Julio, o problema só ocorre nos casos em que eu uso um db_link inválido. > Só > > acho estranho retornar que a view foi criada com erro, mas ela não é > > criada. > > SQL> create view bla as > > 2 select * from user_tables; > > > > View created > > > > SQL> select * from dba_objects where object_name = 'BLA'; > > > > OWNER OBJECT_NAME > > SUBOBJECT_NAME > OBJECT_ID > > DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP > > STATUS TEMPORARY GENERATED SECONDARY > > ------------------------------ > > > > > -------------------------------------------------------------------------------- > > ------------------------------ ---------- -------------- > ------------------ > > ----------- ------------- ------------------- ------- --------- --------- > > --------- > > REMOTE BLA > > > 26060 > > VIEW 30/1/2009 1 30/1/2009 17: > > 2009-01-30:17:10:49 VALID N N N > > > > SQL> create view blabla as > > 2 select * from bla...@dbl_blabla; > > > > Warning: View created with compilation errors > > > > SQL> select * from dba_objects where object_name = 'BLABLA'; > > > > OWNER OBJECT_NAME > > SUBOBJECT_NAME > OBJECT_ID > > DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP > > STATUS TEMPORARY GENERATED SECONDARY > > ------------------------------ > > > > > -------------------------------------------------------------------------------- > > ------------------------------ ---------- -------------- > ------------------ > > ----------- ------------- ------------------- ------- --------- --------- > > --------- > > > > SQL> > > > > > > > > 2009/1/30 Júlio César Corrêa <juliotubi...@yahoo.com.br> > > > > > Estranho Thiago.Você está colocando o nome da view em upper?Look d's: > > > > > > Microsoft Windows XP [versão 5.1.2600] > > > (C) Copyright 1985-2001 Microsoft Corp. > > > > > > C:\Console2>sqlplus /nolog > > > > > > SQL*Plus: Release 10.2.0.1.0 - Production on Sex Jan 30 16:21:35 2009 > > > > > > Copyright (c) 1982, 2005, Oracle. All rights reserved. > > > > > > idle> conn c...@hmlg > > > Informe a senha: > > > Conectado. > > > c...@cmt> desc cmt.vw_order; > > > Nome Nulo? Tipo > > > ----------------------------------------------------- -------- > > > ------------------------------------ > > > PRV_ID NOT NULL > > NUMBER(10) > > > ROM_TRANID NOT NULL > > NUMBER(10) > > > ROM_SEQNBR NOT NULL > NUMBER(3) > > > ROM_DATE NOT NULL DATE > > > ROM_REMOTEORDERID > > NUMBER(10) > > > ROM_REMOTEORDERDATE DATE > > > ROM_STATUS NOT NULL CHAR(1) > > > ROM_RECSTAT CHAR(1) > > > ISS_ID > NUMBER(4) > > > CD_ID > NUMBER(2) > > > CRD_SNR > > NUMBER(10) > > > ROD_AMOUNT > > > NUMBER(10,2) > > > ISS_DESCLONG > > > VARCHAR2(50) > > > APP_DESCLONG > > > VARCHAR2(50) > > > > > > c...@cmt> ed > > > Gravou file afiedt.buf > > > > > > 1 select owner,object_name,object_type,status > > > 2 from all_objects > > > 3* where object_name ='vw_order' > > > c...@cmt> / > > > > > > nÒo hß linhas selecionadas > > > > > > c...@cmt> ed > > > Gravou file afiedt.buf > > > > > > 1 select owner,object_name,object_type,status > > > 2 from all_objects > > > 3* where object_name ='VW_ORDER' --upper case > > > c...@cmt> / > > > > > > OWNER OBJECT_NAME > OBJECT_TYPE > > > STATUS > > > ------------------------------ ------------------------------ > > > ------------------- ------- > > > PUBLIC VW_ORDER SYNONYM > > > VALID > > > CMT VW_ORDER VIEW > > > VALID > > > > > > c...@cmt> > > > > > > > > > And look it: > > > C:\>sqlplus /nolog > > > > > > SQL*Plus: Release 10.2.0.1.0 - Production on Sex Jan 30 16:17:24 2009 > > > > > > Copyright (c) 1982, 2005, Oracle. All rights reserved. > > > > > > idle> conn c...@dsnv > > > Informe a senha: > > > Conectado. > > > c...@dsnv> create or replace view bla > > > 2 as select * from users where rownum = 1; > > > > > > View criada. > > > > > > c...@dsnv> select object_name,object_type,status > > > 2 from all_objects > > > 3 where object_name ='BLA'; > > > > > > OBJECT_NAME OBJECT_TYPE STATUS > > > ------------------------------ ------------------- ------- > > > BLA VIEW VALID > > > > > > c...@dsnv> > > > > > > > > > > > > > > > > > > > > > > > > 2009/1/30 Thiago Delfim <tdel...@gmail.com> > > > > > > > Julio, veja isso: > > > > SQL> create view blabla as > > > > 2 select * from bla...@dbl_blabla; > > > > > > > > Warning: View created with compilation errors > > > > > > > > SQL> select * from dba_objects where object_name = 'BLABLA'; > > > > > > > > OWNER OBJECT_NAME > > > > SUBOBJECT_NAME > > > OBJECT_ID > > > > DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP > > > > STATUS TEMPORARY GENERATED SECONDARY > > > > ------------------------------ > > > > > > > > > > > > > > -------------------------------------------------------------------------------- > > > > ------------------------------ ---------- -------------- > > > ------------------ > > > > ----------- ------------- ------------------- ------- --------- > > --------- > > > > --------- > > > > > > > > SQL> > > > > > > > > Ele fala que criou com erro de compilação, mas não cria nada mesmo. > > > > > > > > > > > > > > > > 2009/1/30 Júlio César Corrêa <juliotubi...@yahoo.com.br> > > > > > > > > > Você verificou qual owner está criando estas views? > > > > > Se warning( advice,suggestion,não error),é View created with > > > compilation > > > > > errors",90% de chance de estas views estarem em algum schema. > > > > > > > > > > select * from all_objects -- ou dba_objects > > > > > where owner ='your owner' > > > > > and object_type ='VIEW' > > > > > and status = 'INVALID' > > > > > > > > > > > > > > > 2009/1/30 Thiago Delfim <tdel...@gmail.com> > > > > > > > > > > > Pessoal, > > > > > > Recentemente eu fiz um import em um Oracle 10g e todas as views e > > > > > > procedures > > > > > > que usavam DB_LINK foram criadas, porém ficaram inválidas porque > os > > > > > > DB_LINKS > > > > > > não estavam acessíveis. > > > > > > > > > > > > Hoje fiz o mesmo import em um Oracle 9i e essas mesmas views e > > > > procedures > > > > > > não foram criadas. Quando eu tento criar direto no SQL Plus, > > aparece > > > a > > > > > > mensagem "Warning: View created with compilation errors", mas a > > VIEW > > > > não > > > > > é > > > > > > criada. > > > > > > > > > > > > Alguém já passou por algo parecido? Eu preciso que o objeto seja > > > > criado, > > > > > > mesmo que fique inválido. > > > > > > > > > > > > Obrigado, > > > > > > > > > > > > -- > > > > > > Thiago Delfim > > > > > > Oracle & SQL Server Database Administrator > > > > > > Oracle 9i Database Certified Professional > > > > > > tdel...@gmail.com <tdelfim%40gmail.com> (MSN) > > > > > > Campinas/SP > > > > > > (19) 8204-2681 / 9111-1439 > > > > > > > > > > > > [As partes desta mensagem que não continham texto foram > removidas] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Júlio César Corrêa > > > > > IS Technologist - Oracle DBA > > > > > http://jccorrea.blogspot.com > > > > > > > > > > "To stay competitive in the tech industry, never stop > > > > > learning. Always be on the lookout for better ways of > > > > > doing things and new technologies. Our industry does > > > > > not reward people who let themselves stagnate" > > > > > John Hall, Senior Vice President, Oracle University > > > > > > > > > > > > > > > [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/oracle_br@yahoogrupos.com.br/ > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------------------------------------------------------------------- > > > > > >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 > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Thiago Delfim > > > > Oracle & SQL Server Database Administrator > > > > Oracle 9i Database Certified Professional > > > > tdel...@gmail.com (MSN) > > > > Campinas/SP > > > > (19) 8204-2681 / 9111-1439 > > > > > > > > > > > > [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/oracle_br@yahoogrupos.com.br/ > > > > > > > > > > > > > > -------------------------------------------------------------------------------------------------------------------------- > > > > >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 > > > > > > > > > > > > > > > > > > > > > -- > > > Júlio César Corrêa > > > IS Technologist - Oracle DBA > > > http://jccorrea.blogspot.com > > > > > > "To stay competitive in the tech industry, never stop > > > learning. Always be on the lookout for better ways of > > > doing things and new technologies. Our industry does > > > not reward people who let themselves stagnate" > > > John Hall, Senior Vice President, Oracle University > > > > > > > > > [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/oracle_br@yahoogrupos.com.br/ > > > > > > > > > -------------------------------------------------------------------------------------------------------------------------- > > > >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 > > > > > > > > > > > > > > > -- > > Thiago Delfim > > Oracle & SQL Server Database Administrator > > Oracle 9i Database Certified Professional > > tdel...@gmail.com (MSN) > > Campinas/SP > > (19) 8204-2681 / 9111-1439 > > > > > > [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/oracle_br@yahoogrupos.com.br/ > > > > > -------------------------------------------------------------------------------------------------------------------------- > > >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 > > > > > > > > > -- > Júlio César Corrêa > IS Technologist - Oracle DBA > http://jccorrea.blogspot.com > > "To stay competitive in the tech industry, never stop > learning. Always be on the lookout for better ways of > doing things and new technologies. Our industry does > not reward people who let themselves stagnate" > John Hall, Senior Vice President, Oracle University > > > [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/oracle_br@yahoogrupos.com.br/ > > -------------------------------------------------------------------------------------------------------------------------- > >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 > > > [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/oracle_br@yahoogrupos.com.br/ -------------------------------------------------------------------------------------------------------------------------- >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: oracle_br-unsubscr...@yahoogrupos.com.br <*> O uso que você faz do Yahoo! Grupos está sujeito aos: http://br.yahoo.com/info/utos.html