migrating tables from Oracle to SQL Server

  • when i migrate tables from oracle to sql server using import/export wizard , i choose option delete rows in destion table in wizard but at the end it showing u can't truncate table it is referenced by other table.but i am 100% sure that i disabled all the foreign keys? Can you please help me its urgent??????????????????

    pls asap!!!!

  • You can save the DTS package and review the workflow to detect the truncate problem.

    SNM

    Try Free Microsoft SQL Server Data Collector & Performance Monitor.

    http://www.analyticsperformance.com[/url]

    @nalyticsperformance - Microsoft SQL Server & Windows Server Free Data Collector

  • Y struggle with simple things?

    Let us keep the things as simple as they are!

    You include the Parent tables in the data-flow and even in control-flow, include if not exists...

    Quite Simple, na?:-)

  • Praveen kumar-223738 (12/2/2009)


    Y struggle with simple things?

    Let us keep the things as simple as they are!

    If you feel it is simple explain it clearly, so that the OP can understand better.

    You include the Parent tables in the data-flow and even in control-flow, include if not exists...

    To include inparent tables in control-flow and data-flow, the OP is not using SSIS package, he is using Import/export wizard. :w00t:

    Quite Simple, na?:-)

    Yes quite simple to overlook the actual post. :-):-)


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Keep the things as simple as they are!

    yes,

    I overlooked the original post. agreed. but, I stick to my guns ,as algorithm does not need to be changed.

    Include parent tables in the "workflow" (note, work-flow can be designed in DTS even.)

    insert the data into parent tables by including the clause , if not exists

    (the above step will ensure the data to be synched on the destination side as well)

    (

    I believe, parent table does not change frequently.and, even it gets changed, you can manipulate them by

    where createddatetime > ?

    or

    updateddatetime > ?

    )

    and

    "on successful completion" of the above task, execute the current task!

    you need not change the single line of statement (or mapping) in your original DTS.:-D

    I hope the post originator understands the workflow and respond for the post.

  • The OP was having problem in Import / Export wizard.... not DTS or SSIS Package.. 😉


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • praveen_delight 24284 (11/7/2009)


    ... u can't truncate table it is referenced by other table.but i am 100% sure that i disabled all the foreign keys?

    This is a referential integrity issue and in this realm I tend to take the RDBMS side e.g. you did not disabled all FKs - check again.

    If you are not prepared to believe neither me nor RDBMS go and try to manually truncate those tables one at-a-time in the same order you are processing them - the truth always finds a way to make itself evident 😉

    By the way ... :blink: didn't get the purpose of the poll 😀

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply