How to disabled all constraints when importing data (urgent)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    How to disabled all constraints when importing data (urgent)

    Hi:

    I am not sure whether somebody can sort it out for me.

    I am doing data transfer from one oracle database to another. Both of
    them has the same structure (like same tables etc).the only thing i
    need to do is data transfering.

    i designed a vb program to do this, What i am worrying is when I run
    this program it might fire some constrants. Anybody can give me some
    ideas on how to avoid these constraints when data import?? I have to
    disable all the constrainsts first or i can do it in another way?

    Millions thanks in advance!
    Paul
  • Guido Konsolke

    #2
    Re: How to disabled all constraints when importing data (urgent)

    "Paul" <jiacheng_work@ yahoo.comwrote in
    news:f294310c.0 309080223.62b22 c2a@posting.goo gle.com...
    Hi:
    >
    I am not sure whether somebody can sort it out for me.
    >
    I am doing data transfer from one oracle database to another. Both
    of
    them has the same structure (like same tables etc).the only thing i
    need to do is data transfering.
    >
    i designed a vb program to do this, What i am worrying is when I run
    this program it might fire some constrants. Anybody can give me some
    ideas on how to avoid these constraints when data import?? I have to
    disable all the constrainsts first or i can do it in another way?
    >
    Millions thanks in advance!
    Paul
    Hi Paul,

    are you really sure using VB is the right thing
    for this task? It smells like imp / exp would be
    the better way. Anyway: you can defer the column
    constraints with the 'set constraints all deferred'
    statement before starting the data insert. Then the
    constraints will come into play at commit time.
    If the constraints aren't deferable, you have to use
    some pl/sql to loop through user_constraint s to get
    the names and issue dynamic sql statements which disable
    those constraints.

    hth,
    Guido


    Comment

    • Frans H.

      #3
      Re: How to disabled all constraints when importing data (urgent)

      "Guido Konsolke" <Guido.Konsolke @triaton.comwro te in message news:<106301863 7.40577@news.th yssen.com>...
      "Paul" <jiacheng_work@ yahoo.comwrote in
      news:f294310c.0 309080223.62b22 c2a@posting.goo gle.com...
      Hi:

      I am not sure whether somebody can sort it out for me.

      I am doing data transfer from one oracle database to another. Both
      of
      them has the same structure (like same tables etc).the only thing i
      need to do is data transfering.

      i designed a vb program to do this, What i am worrying is when I run
      this program it might fire some constrants. Anybody can give me some
      ideas on how to avoid these constraints when data import?? I have to
      disable all the constrainsts first or i can do it in another way?

      Millions thanks in advance!
      Paul
      >
      Hi Paul,
      >
      are you really sure using VB is the right thing
      for this task? It smells like imp / exp would be
      the better way. Anyway: you can defer the column
      constraints with the 'set constraints all deferred'
      statement before starting the data insert. Then the
      constraints will come into play at commit time.
      If the constraints aren't deferable, you have to use
      some pl/sql to loop through user_constraint s to get
      the names and issue dynamic sql statements which disable
      those constraints.
      >
      hth,
      Guido
      Paul,
      also check the table USER_CONS_COLUM NS

      Frans H.

      Comment

      Working...