Pular para o conteúdo
Visualizando 3 posts - 1 até 3 (de 3 do total)
  • Autor
    Posts
  • #96914
    Anakim
    Participante

      Estrou tentando referenciar uma FK de uma PK de uma tabela de outro usuário e não estou conseguindo. Estou recebendo o seguinte erro:


      ALTER TABLE "USER1"."HISTORY" ADD CONSTRAINT "CUSTOMER_REL_HISTORY" FOREIGN KEY ("ID_CUSTOMER") REFERENCES "USERA"."CUSTOMER" ("ID_CUSTOMER")
      Relatório de erro:
      Erro de SQL: ORA-01031: insufficient privileges
      01031. 00000 - "insufficient privileges"
      *Cause: An attempt was made to change the current username or password
      without the appropriate privilege. This error also occurs if
      attempting to install a database without the necessary operating
      system privileges.
      When Trusted Oracle is configure in DBMS MAC, this error may occur
      if the user was granted the necessary privilege at a higher label
      than the current login.
      *Action: Ask the database administrator to perform the operation or grant
      the required privileges.
      For Trusted Oracle users getting this error although granted the
      the appropriate privilege at a higher label, ask the database
      administrator to regrant the privilege at the appropriate label.

      Eu sei que tenho que criar dar um privilégio, mas qual seria?

      #96915
      Emersonmartins
      Participante

        Amigo vc tem que dar privilégio de REFERENCES para esse usuário logado com o usuário porém este tbm deve ter privilégios suficientes com ADMIN OPTION.

        Segue abaixo:
        GRANT REFERENCES ON ESQUEMA.TABELA TO USUÁRIO


        Emerson Martins
        Analista de Banco de Dados
        http://emersonmartinsdba.blogspot.com/

        #96917
        Anakim
        Participante

          Valeu pela resposta era isso mesmo. Muito Obrigado.

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