Pular para o conteúdo
Visualizando 4 posts - 1 até 4 (de 4 do total)
  • Autor
    Posts
  • #89523
    paulolot
    Participante

      Estou com o seguinte problema:
      – Preciso transferir os dados de um usuário para outro
      – Detalhe:
      * O usuário que receberá os dados tem dados a mais, eles deverão ser mantidos.

      Fiz testes com o expdp e o impdp.

      1) create or replace directory EXPBACKUP as ‘T:BACKUP’;
      2) grant read, write on directory EXPBACKUP to user_old;
      3) grant read, write on directory EXPBACKUP to user_new;

      4) expdp user_old/crit@acesso directory=expbackup tables=AGENDA DumpFile=backupAGENDA.dmp LogFile=backup.log

      5) impdp system/manager@acesso_industrial directory=expbackup dumpfile=backupAGENDA.dmp remap_schema=user_old:user_new TABLE_EXISTS_ACTION=APPEND

      Ele me apresenta o seguinte erro:
      ORA-31696: unable to export/import TABLE_DATA:”USER_ARAPECAS2″.”AGENDA” using client specified AUTOMATIC method
      Job “SYSTEM”.”SYS_IMPORT_FULL_01″ completed with 1 error(s) at 11:23:55

      #89524
      souza
      Participante

        Opa Paulo beleza.

        Como tenho mais experiência em exp convencial vou colocar o que eu acho que pode te ajudar .

        Faça o export da tabela que você precisa

        exp user/senha@banco file=nome.dmp log=nome.log tables=schema.table1,schema.table2 buffer=500000 feedback=10000

        Para importar para outro usuário faça

        imp user/senha@banco file=nome.dmp log=imp.log fromuser=schema_de_onde_sao_tuas_tables touser=schema_para_onde_vao_tuas_tables tables=table1,table2 ignore=y buffer=500000 feedback=100000

        Importante: A opção ignore=y faz com que os dados que já existem no local permanecam e importa os que não tiverem…

        Espero ter ajudado

        Souza

        #89525
        ramasine
        Participante

          Paulo, como estás usando o datapump, tens a opção do APPEND MODE…
          Agora, quais os tipos de colunas existentes nestas tabelas, LONG, RAW, etc?

          No metalink, vi tb que há alguns problemas relacionados com isso tb:

          Subject: DataPump Import Fails For LONG Datatype With ORA-31696
          Doc ID: 305819.1 Type: PROBLEM
          Modified Date : 20-MAY-2009 Status: PUBLISHED

          In this Document
          Symptoms
          Cause
          Solution
          References


          Applies to:
          Oracle Server – Enterprise Edition – Version: 10.1.0.2 to 10.2.0.4
          This problem can occur on any platform.

          Symptoms
          DataPump import fails with error ORA-31696 while loading data into pre-existing table, if there is a LONG column in that table.

          ORA-31696: unable to export/import TABLE_DATA:”TC”.”TAB_EVENT_LOG” using client specified AUTOMATIC method

          Cause
          The following restrictions exist regarding data load into pre-existing table:

          • cannot use external table mode if there is a LONG column
          • cannot use direct path load mode if an enabled constraint other than table check constraint is present on pre-existing table

          Due to these restrictions, the procedure KUPD$DATA_INT.SELECT_MODE returns ‘load_nopossible’, and DataPump import fails with the error message.

          Solution

          The workaround for this issue is to import both metadata and data at once, if the table has a LONG column and an enabled constraint.

          Another option is to use the original export/import (exp/imp) to transfer the table from source to target.

          Valeu!!

          #89533
          souza
          Participante

            Ja pensou em usar em vez de:

            TABLE_EXISTS_ACTION=APPEND

            TABLE_EXISTS_ACTION=TRUNCATE – Isso trunca teus dados da table destino e carrega novamente

          Visualizando 4 posts - 1 até 4 (de 4 do total)
          • Você deve fazer login para responder a este tópico.