What is te best way to copy a table from a database to another?

Hello friends:
I have two databases: an Access database and an Oracle database. I must copy the data from al tables from the Access database to the oracle database. The tables in the both databases are equal (number of columns, type, etc).
I read an resultset from acces (select * from table1) and I insert every row in the Oracle database with an while loop (while (r.next)...). It works fine when there are a few rows, but I have a table with over 200000 rows, and when I'm copying the row number 30.000, the system goes very slow...
How can I copy tables from a database to another more quickly?
Thanks!

CASE #1
The most efficient method would be to copy all the rows from Microsoft Access and write them to a text file using Access's native interface (not JDBC), then use Oracle's SQL Loader utility (not JDBC) to insert the data.
You can insert 200,000 rows of 80 bytes each in 30 seconds or less even on a modest Oracle system using SQL Loader. The extract from Access is very dependent on the size of the CPU and the available memory.
Hint 1: Avoid explicit or implict network traffic.
Hint 2: Extract and load from local drives rather than networked or shared drives on other services
Please note that this is done for efficiency of load, but has issues related to error checking, and operational scripting.
Anything else you do or use will be slower than the method (above).
CASE #2
If you want to integrate this into a single JDBC program which will provide better operational management of the process, then you can simply connect to both databases in your Java program, then read the rows one at a time from Access, insert them using the Batch mechanism of JDBC to Oracle. You will also want to set the FetchSize in Oracle to a larger value then the default (i.e set it to 100 vs 10).
Hint #3 You may want to look into alternative JDBC drivers for accessing MS Access, rather than the JDBC-ODBC bridge which is not optimized for MS Access. You may also want to consider using the OCI8 driver from Oracle rather than the thin driver. Both provide Type 4 functionality but I have heard (not experienced) that the OCI8 driver is better for managing batch style of processing like yours
Good luck!
Joel

Similar Messages

  • What is the best way to transfer home videos from one mac to another?

    What is the best way to transfer home videos from one mac to another?

    hustonsmom wrote:
    the commercial is deceiving to me. i am not the most techy person and i thought that you could share full song playlist which to me meant the songs also. that is all, it wasnt anything you had said but i am really thankful you enlightened me because i would still be racking my brain trying to figure out how to do it.
    You can share songs, but if there is DRM protection on the song, it will not play on the other device unless you also transfer the rights to the other device. You are getting into the problem of music piracy.

  • What is the best way to move my itunes from one computer to another and retain all files?

    what is the best way to move my itunes from one comupter to another?

    I assume you mean the media and playlists, not the iTunes application.
    http://support.apple.com/kb/HT4527

  • How to Move or Copy the Tables from One Database to Another Database ?

    HI,
          Can any one help me on this, How i can move or copy the tables from one database to another database in SQL server 2005 by using SQL query. Hope can anyone provide me the useful and valuable response.
    Thanks
    Gopi

    Hello,
    Maybe these links help you out
    http://www.microsoft.com/downloads/en/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
    http://www.suite101.com/content/how-to-copy-a-sql-database-a193532
    Also, you can just detach the database make a copy and move it to the new server.

  • Simple: How to copy a Table from one Database to another?

    I already know how to do it by creating an identical table and then inserting the Data.
    Like so:
    SET IDENTITY_INSERT dByDtMinusC5 ON
    INSERT INTO [DB1]..T1 ([Id], [HbyD] , [K] )
    SELECT [Id], [[HbyD]]] ,[K] FROM [DB2]..T2
    As you can see I need to have T1 in order to copy T2 into DB1. Is there any way that I could auto create T1 and copy T2?
    There are so many forums in sql server Category, I hope I posted in the right one :0 . We need tag system for forums.   

    Hi Bhupinder,
    According to your description, you want to copy a table with Primary keys from one database to another database.
    As per my understanding, I think the best method is use Transfer SQL Server Objects Task in SQL Server Integration Services. The Transfer SQL Server Objects task transfers one or more types of objects in a SQL Server database between instances of SQL Server.
    Server roles, roles, and users from the specified database can be copied, as well as the permissions for the transferred objects. Indexes, Triggers, Full-text indexes, Primary keys, Foreign keys can also be copied.
    To use the Transfer SQL Server Objects Task, we should create a SQL Server Integration Services Project in SQL Server Data Tools, then drag a Transfer SQL Server Objects Task to Control Flow pane. Specify SourceConnection, SourceDatabase, DestinationConnection
    and DestinationDatabase for the Connection, select the table in the ObjectsToCopy category, then change CopyPrimaryKeys to True and the other corresponding properties in the task.
    References:
    Transfer SQL Server Objects Task
    Transfer SQL Server Objects Task in SSIS 2008 R2 With Example
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • In PL-SQL copy a table from one database to another

    I am currently working on a VB app where I need a way to archive tables from the running database to an archive database. I was hoping to do this with a stored procedure. Thanks for any suggestions in advance.

    AFAIAA there is no equivalent of the SQL*Plus copy command, but it is realtively simple to build such a thing in PL/SQL using DBMS_SQL or EXECUTE IMMEDIATE to issue the necesssary INSERT INTO table@archive_db select * from table;It's simple to create the table in the archive db , you just test for it's exist using %SQLFOUND.
    If you want it fancier, eg. changing the tablename dynamically that's also easy.
    rgds, APC

  • What's the best way to move a project from one HD to another?

    I have a movie I've been working on for 2 years.  The entire project is on an external hard drive.  I recently got a new macbook pro and would like to take the project off of the external hard drive and move it to my macbook pro hard drive (my external is starting to act a little goofy and I want to rescue my project until I can get a new one). 
    There is tons of media for my project.  I've read that using media manager is an option.  I tried this but am having difficulty locating all of the media to reconnect once I do, but all the media should be in the same place, so I can't figure out why I can't find a lot of it to reconnect. 
    Anyone have any ideas or suggestions?  None of the media is offline when I open the project from my external HD.  If you know a better method than media manager, please share.  I've never had to execute this kind of proceedure before so it's new to me.  Thank you.

         The files will be eating up all your disc space and affecting performance. Setting the Scratch disc only comes into affect if you are capturing files from video sources via video cards or firewire/thunderbolt connections. The scratch disc records the video as data. The scratch disk needs to be robust enough to capture at a high data rate to capture uncompressed video in HighDef or Standard Def. This usually requires a RAID drive. If you never capture uncompressed video via a video card (AJA Kona/Blackmagic/Avid Mojo), you can set your root drive as the scratch disc. The problem there is it will hog up disc space. That is why most editors use an external drive to be the scratch disc.

  • What is the best way to transfer 1200 songs from one SGIII to another SGIII?

    I have over 1200 songs on my Samsung Galaxy III and want to transfer them all in one block to my husband's SG III.  I have Backup Assistant Plus with most of the music uploaded there.  I asked at our local Verizon store but no one there knew how to use this phone!  Can anyone help me?

    hustonsmom wrote:
    the commercial is deceiving to me. i am not the most techy person and i thought that you could share full song playlist which to me meant the songs also. that is all, it wasnt anything you had said but i am really thankful you enlightened me because i would still be racking my brain trying to figure out how to do it.
    You can share songs, but if there is DRM protection on the song, it will not play on the other device unless you also transfer the rights to the other device. You are getting into the problem of music piracy.

  • Copying a table from one databse to another

    Hi,
    I used the following code to copy a table from one database to another.
    set copycommit 1
    set arraysize 1000
    copy from username/passwd@tnsname -
    create <tablename> -
    using -
    select * from <tablename>
    But I get the following error:
    set copycommit 1
    ERROR at line 1:
    ORA-00922: missing or invalid option
    Could you please let me know how this can be done.
    Thanks,
    Narasimhan

    Thanks for your suggestions.I created a database link.I had no problems.
    Then when i issue the command
    copy from uname/password@db
    create <tablename>
    using
    select * from <tablename>
    <Here db is database link to source database identified by uname and password>.
    I still get the error
    copy from uname/password@db
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    Does it mean that the command is wrong?Or I'm doing something different.
    Thanks!

  • What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported".

    What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported". What does that mean? I am trying to drag libraries (with metadata) to external HD...wondering what the best way to do that is?

    Kirby Krieger wrote:
    Hi Shane.  Not much in the way of thoughts - - but fwiw:
    How is the drive attached?
    Can you open large files on the drive with other programs?
    Are you running any drive compression or acceleration programs (some drives arrive with these installed)?
    Can you reformat the drive and try again?
    Hi Kirby,
    I attached the UltraMax Plus with a USB cable. The UltraMax powers the cable so power is not an issue. I can open other files. Also, there is 500GB of files on the drive so I cannot re-format it. Although, I noted I could import the entire Aperture Library. However, I do not want to create a duplicate on my machine because that would be defeating the purpose of the external drive.
    Thanks,
    Shane

  • I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    Ya know what I'm on a brand new MBP just about 24 hours old and you know whats been working amazingly for me. I have a 27inch iMac as well and i've just connected it to my network and been dragging files and apps across the network onto my new MBP. Its really working fast and its flawless. You could always do that option, Just go into sharing options and turn them on for both Macs. Then just click and drag. Of course they have to both be on the same network for this to be possible.
    Look at my network.
    Shared is what your looking at.  I click on there see all my computers files and then drag the ones i want form its folder to my MBP folders.  Hope that helps if your looking for a very simple way on a wireless network.

  • What is the best way to copy a DVD i made from iMovie?  It was HD720 and I don't want to lose any quality in the copies.

    What is the best way to copy a DVD I made from iMovie?  It was HD720 and I don't want to lose any quality in the copies.  I need to distribute it to about 20 people. It's 42 minutes long.

    You will need to save it as a video to the camera roll.
    Import it into windows as you would a photo.
    Then purchase DVD authoring software, and create a DVD.

  • What is the best way to copy 700 local folders full of email to a new computer?

    I am moving my wife from and old computer (Thunderbird, Win XP) to a new one (Thunderbird Win 7). She has about 700 local folders with thousands of email messages in them. What is the best way to copy them to the new computer?

    The easiest way is just copy the whole profile.
    Help menu > troubleshooting information
    Close Thunderbird
    In windows explorer select all and copy.
    paste everything onto a thumb or other read/write portable media (not CD or DVD)
    on the new Machine repeat the troubleshooting and close steps to get the current profile folder
    This time paste everything from the portable media into the profile replacing what is there
    Open Thunderbird, your done mail contacts add-ons everything

  • What is the best way to create Aperture book from Pages '09 document?

    What is the best way to create Aperture book from Pages '09 document?

    There is no way to import pages documents to Aperture and convert them to an Aperture book. Aperture books can only be created by manually adding images and text to the pages of a book, and using the layout of the predefined templates.
    The best you could do, would be to print your pages document to pdf and import the resulting pdf file into Aperture as a new project. This will create one image for each page. Then select the page images all at once and  create a new book. Select a theme with fullsize page images, like "picture Book", and then add the images of the pages to the empty pages of the book.
    But probably would you get a much better quality and layout, when you recreate your pages document in Aperture, by starting with an empty book and copying and pasting the text from your Pages document. But don't paste the photos from the document - try to use the originals of those photos.

  • Got new macbook pro. What is the best way to transfer my itunes from my old pc to my new mac? I want to be able to plug my iphones and ipad in to new mac and have redo anything

    Got new macbook pro. What is the best way to transfer my itunes from my old pc to my new mac? I want to be able to plug my iphones and ipad in to new mac and have redo anything

    See Here... This should transfer everything...
    Move iTunes Library from PC to MAC
    http://www.macworld.com/article/146958/2010/03/move_itunes_windows_mac.html

Maybe you are looking for

  • Can I use my time capsule for solely for back up purposes with time machine?

    Welcome, yoreilly(Sign out) New Your Stuff History Browse Search for:Search Apple Support Communities > Wireless > Time Capsule  Start a New Discussion in Time Capsule Subject: 

  • How to change default container in Hive

    Hi, Can any one provide me procedure to update default container name in Hive. i try to modify the  C:\apps\dist\hadoop-2.4.0.2.1.10.0-2290\etc\hadoop\core-site.xml but the new values are not getting reflected. Is their any Hive command to update def

  • Master Page Gallery contents renders in old Sharepoint 2007 style after upgrade

    I have a site collection that is still rendering the Master Page Gallery items in the Sharepoint 2007 style instead of the Sharepoint 2013 style, and I can't pinpoint where this is coming from.  I'm sure it's from a resource that was customized some

  • ECC 6.0 AP vs SRM Invoice processing

    My client has implemented SRM on it's own instance and is in the process of implementing ECC 6.3 on it's own instance.  The question being debated is where to house SRM's Invoice Processing.  My recommendation is to keep all financial process in the

  • About servlet parameter {0}

    I have servlet. protected static final String loginForm =      "<HTML><HEAD><TITLE>WebPOP3</TITLE></HEAD>" + "<FORM ACTION=\"servlet/Webpop3\" METHOD=\"POST\">" + "Host: <INPUT NAME=\"host\"><BR>" + "User: <INPUT NAME=\"user\"><BR>" + "Password: <INP