Comentários e links para soluções encontradas no dia-a-dia. Ambientes diversos: Oracle, Netware, Microsoft, Linux ...

Wednesday, March 03, 2010

Import Oracle - Error SYS.DBMS_REPCAT_MIG.PRE_IMPORT

Export executado com a opção FULL=Y, exporta também os objetos dos usuários SYS, SYSTEM e demais. Quando na importação usa-se o usuário SYSTEM, este tem como Synonym alguns itens que conflitam com o objeto original ... gerando os erros a seguir:

imp system@manager file=export.dmp ignore=y grants=n indexes=n log=imp.log full=n fromuser=prod touser=lab tables=(tb_he,tb_de) constraints=n compile=n
Import: Release 9.2.0.8.0 - Production on Wed Mar 3 10:08:49 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Password:
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - ProductionWith the Partitioning, OLAP and Oracle Data Mining optionsJServer Release 9.2.0.8.0 - Production
Export file created by EXPORT:V09.02.00 via direct pathimport done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character setIMP-00046: using FILESIZE value from export file of 8585740288IMP-00017: following statement failed with ORACLE error 6550: "BEGIN SYS.DBMS_REPCAT_MIG.PRE_IMPORT; END;"IMP-00003: ORACLE error 6550 encounteredORA-06550: line 1, column 8:PLS-00201: identifier 'SYS.DBMS_REPCAT_MIG' must be declaredORA-06550: line 1, column 8:PL/SQL: Statement ignoredIMP-00000: Import terminated unsuccessfully

Solução após 1 semana de sofrimento: importar usando SYS as SYSDBA

imp 'sys@tns as sysdba' ignore=y .....

Boa Sorte