DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: rollback data from the tables

  1. #1
    Join Date
    Jan 2010
    Posts
    20

    rollback data from the tables

    Hi I am loading data from csv files to oracle table using sql loader. and i am loading it one by one. is there a way to roll back the data already loaded from one csv if there is a data error.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Rollback is only possible inside a transaction.
    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.

  3. #3
    Join Date
    Jan 2010
    Posts
    20
    sorry i did not understand.. can u please explain.
    I used ERRORS=0 as command line paramter for sql loader so that not data is loaded when a data error has occured. I am automating the script so that it loads from the begining the next time. I am not sure of how to avoid duplicate records being inserted. pls advice

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Use a staging table, truncate it before loading. Once you get it right move the data from staging to final-destination table.

    The "transaction" concept is at the foundation of rdbms technology, it wouldn't hurt to read a little about it.
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width