Best way to copy table from one database to any other database

I need to write an application to perform database table copy from one kind of database to another kind of database.
I just wrote a simple JDBC program which essentially does the something like below:
PreparedStatement statement = null;
ResultSet rs = null;
try
System.out.println("insertSQL:" + insertSQL.toString());      
statement = target.prepareStatement(insertSQL.toString());
System.out.println("selectSQL:" + selectSQL.toString());
rs = source.executeQuery(selectSQL.toString());
int rows = 0;
while (rs.next())
rows++;
for (int i = 1; i <= columns.size(); i++)
statement.setString(i, rs.getString(i));
statement.execute();
System.out.println("Copied " + rows + " rows.");
But problem with this one is that it takes lot of time( more than 60 mins) for 100k records transfer. Would there be any faster way to do this?
TIA...

Thanks...
I am using now batch update mechanism and set the fetchsize of resultSet cursor.
Now I need to copy a table with almost 10 million records to the target database. My program works fine but it takes more than 3 hours.
I am copying from Postgres table to MS SQL server table.
Is there any other way or more better appraoch to make this more faster?
TIA..

Similar Messages

  • To copy table from one database to another

    hai,
    I will be really pleased if someone can me tell me that how can i copy table from one database to another. I am having two databases.
    Gursimran

    You can Also do
    ++ Create a database link on the TARGET to SOURCE
    CREATE PUBLIC DATABASE LINK <<DBLNK_NAME>> CONNECT TO <<USER>> IDENTIFIED BY <<PASSOWORD>> USING '<<TNS_NAME>>';
    ++ And copy as below
    CREATE TABLE EMP AS SELECT * FROM EMP@DBLNK_NAME;

  • What are the diffrent ways to copy data from one application to another?

    Hi,
    Can you guys tell me what are the different ways to copy data from one application to another application??
    I know we can do it through script logic using DESTINATION_APP.
    Is there any other way to copy data from one application to another application?
    Please help me
    Thanks,
    Charly

    You can also call a custom DTSX package in SSIS via the datamanager.
    there are at least 5 ways of transfering data in BPC between apps.
    1. Through the front end (excel etc) via evdre/evsnds
    2. Through Script logic using *Dest App
    3. Using BPC's standard export dtsx package via DM
    4. Using SSIS using BPC's custom SSIS tasks
    5. Through Script logic using stored procs.
    i am sure people will come up with more.
    remember if you use ssis and move data into any table but the wb, you need to process the cube afterwards.

  • How can we copy table from one schema to other schema

    Hi,
    I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schema

    Hi,
    You can try something like this :-
    SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
    Connected.
    SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
    User created.
    SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
    User created.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
    Grant succeeded.
    SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
    Grant succeeded.
    SQL> CONNECT TEST_1/TEST_1@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
    Table created.
    SQL> INSERT INTO TEST_COPY VALUES ( 1 );
    1 row created.
    SQL> INSERT INTO TEST_COPY VALUES ( 2 );
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT ALL ON TEST_COPY TO TEST_2;
    Grant succeeded.
    SQL>  CONNECT TEST_2/TEST_2@SERVER
    Connected.
    SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
    Table created.
    SQL>  SELECT * FROM TEST_COPY;
      TEST_COL
             1
             2Regards,
    Sandeep

  • OSB : How can we copy  actions from one project folder to other projects?

    How can we copy actions from one project folder to other projects in OSB?
    For eg:
    I have a service call out action in Project1/proxySer1
    I want to copy this to Project2/proxySer2.
    Espicially, in our case error handling callout is common to all of our projects and we should be able to copy from one to another.
    Edited by: user10367892 on Aug 20, 2009 12:28 PM

    Thank you for the reply.
    It was my fault. I was on two different servers, while i was doing this and so didn't work. But copy /past action works as you suggested.
    Can I select multiple actions from one stage and paste to different proxy service? I have too many options to copy/paste and hence I have this question.
    Is there any other way of copying all selected actions in one stage to another, but not the complete stage itselft?

  • How do i copy stickies from one mac to the other

    how do i copy stickies from one mac to the other?
    or are they stored in a file i can just copy them over ? if so what is the file name path?
    thanks in advance

    yes, they are stored in the file /users/username/library/StickiesDatabase. just copy it over to the corresponding location on the new computer.

  • I have a new iMac and i created two libraries on iTunes. how do i copy songs from one library to the other?

    I have a new imac. I created two libraries, one for me, one for my kids. how do I copy songs from one library to the other library?

    Not easy unless you're just content with adding some files to the other as new files but lose playlists for those files, and playcount, and ratings, etc.  If you're okay with that, you can drag the media folder from one library to the other. If you use default settings and want to duplicate the media, just drag it. If you want to add the media but leave it where it is currently located, hold down the option key while dragging to the library window.
    Otherwise:
    PowerTunes - http://www.fatcatsoftware.com/powertunes/ (commercial software)
    syncOtunes - http://homepage.mac.com/oligrob/syncOtunes/syncOtunes.html

  • How to copy data from one planning area to other planning area

    Hi ,
    I need to copy data from one planning area to other planning area, the MPOS for two planning areas are differant and  here my scenario is one planning area having extra key figures.
    First i need to release forecast data to CIP planning area and then,  i load the data from infocube  to MPS planning area and copy the data from CIP planning area. here both MPS and CIP planning areas having different MPOS .
    Please help me in this. Please give me the stepls i need to follow.
    Thanks in advance.
    Regards,
    Chandu

    Hi,
    You can use the transaction /sapapo/tscopy.
    In this you can configure your source plng area and destination plng area. You also have an option to map your KF. There is no problem if the MPOS are different as long as you are able to map the characteristics between the 2 MPOS.
    Alternatively, you can create an Infocube which shares common ground between the 2 planning areas and extract data from CIP plng area into the infocube and then copy teh data from infocube to MPS plng area using the the transaction /sapapo/tscube.
    Hope this helps.
    Thanks
    Mani Suresh

  • Is there a way to copy attributes from one composition to another?

    I'm using After Effects 7.0
    I'd like to copy the same Zoom attributes from one composition to 30 photographs.
    In Final Cut, you can copy attributes from one clip to another. Or from one still photo to another.
    Is there a way to do that in AE 7?
    Thanx
    Mike

    EDIT: I see you edited your question, so I am editing my reply.
    To copy the scale of a layer, open the main twirl of that layer and you'll see the Transform properties group. Open the twirl for that, and you'll see Anchor Point, Position, Scale, etc. Click on "Scale" and copy it (Edit > Copy, or Control+C on Windows/Command+C on Mac). Then select the other layers and just paste (Edit > Paste, or Control+C on Win/Command+V on Mac).
    Such a broad question
    Anytime you add a new item you imported to the timeline or composition panels, it becomes a new layer.
    Anytime you duplicate an existing layer (Edit > Duplicate), you get a new layer.
    Anytime you split a layer (Edit > Split) you get a new layer.
    Anytime you copy a whole layer (target the name in the timeline panel) and paste it, you get a new layer.
    You also create layers when you use the Shape tools, text tools, or create a new solid layer, etc.
    This list could go on and on, so instead, I invite you to read the After Effects Help section on Creating layers specifically, and the whole chapter on Layers and properties, in general. If anything isn't clear for you, then let us know.

  • Copy the contents of table from one production system to other

    Hi Experts,
    I need to copy the contents of tables T880, T9ACW, T9AGZ from one sap system to other.
    Which is the most effective method other than transporting the contents?
    Could we write a program or RFC or something for this?
    Please let me know your comments.
    Points will be given to all the helpful answers.
    Thank you,
    Nobin.

    Hi Nobin,
    for T880 you cna use LSMW.
    Which system are you using as i could not find the tables T9ACW, T9AGZ.
    for these you can use RFC as the bets option as Idoc need to be having some Idocs defined and some Configurations need to be done to define lot many criterias for data transfers.
    ALE to requires lot many criteris to be configured
    BDC needs a Transaction associated for tranbsfer of data.
    LSMW can do transfer of limited application and master data and NOT ALL Data.
    so appropriate one seems to be RFC or BAPIs.
    Hope this solves or clarifies what you have been looking for.
    encourage others to answer you queries by suitably rewarding them
    Thanks
    Venugopal

  • IPOD 4GB can i copy music from one IPOD to the other

    I have tried doing this but it comes up with your not authorised .

    You can't copy directly from one iPod to another, the songs have to be transferred to iTunes first and your second iPod is updated from there. The transfer of purchased content from the iPod to authorised computers was introduced with iTunes 7. A paragraph on it has been added to this article: Transfer iTunes Store purchases using iPod
    The transfer of content from other sources such as songs imported from CD is designed by default to be one way from iTunes to iPod. However there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. Have a look at the web pages and documentation, this is just a small selection of what's available, they are generally quite straightforward. You can also read reviews of some of them here: Wired News - Rescue Your Stranded Tunes
    TuneJack Windows Only
    iPod2PC Windows Only
    iGadget Windows Only
    iDump Windows Only
    iRepo Windows Only
    iPodRip Mac & Windows
    YamiPod Mac and Windows Versions
    Music Rescue Mac & Windows
    iPodCopy Mac and Windows Versions
    There is also a manual method of accessing the iPod's hard drive and copying songs back to iTunes on Windows or a Mac. The procedure is a bit involved and won't recover playlists but if you're interested it's available at this link: Two-way Street: Moving Music Off the iPod

  • Copy values from one Parent node to other Parent Node

    Hi all,
    I have a 2 Parent node each having 3 child nodes. I want to copy the values of all the attributes of all the child nodes of one Parent Node to corresponding other node.
    Both the Parent Nodes as well as their Child Nodes have different name but their attributes have same name.For ex:
    Parent Node -A
    Child Nodes - a, b,c
    Child Node "a" has attributes "x" and "y"
    Parent Node -B
    Child Nodes - d,e,f
    Child Node "d" has attributes "x" and "y" .
    Now I want to copy the values od attributes "x" and "y" from one Parent Node to other Parent node.
    Please help me out.
    Helpful answers will be rewarded.
    Thanxs in advance...

    Hi Jin,
    To use copy service API, u need to satisfy 2 condition for the attributes of source node and target node:
    1. The name of the attribute should be same (including the case of the name)- Abc is different from ABC
    2. Type of the attribute should also be the same.
    copy elements works for copying values from Model node to context and does not work vice-versa. To enable the copying of context node to model node, use copycorresponding API.
    Eg:
    int contextNodeSize = wdContext().node<contextNodeName>().size();
    for(int i = 0; i < contextNodeSize; i++)
         <modelNodeName> modelObject = new <modelNodeName>();
         <contextNodeName>Element contextObject = wdContext().node<contextNodeName>().get<contextNodeName>ElementAt(i);
         WDCopyService.copyCorresponding(contextObject, modelObject);
    This will copy the values from Context Node to Model Node.
    Hope this helps you.
    Regards,
    Poojith MV

  • Copy table from one database to another database

    Hi,
    I am new to SQL and I have a question on copying a table.
    QUE: copy one table with huge data(around 60millions of rows) from one database to another database(have to create a new table) in the same server. 

    Hi ,
    By mistake ,I understood you want to copy on different server .
    I have rectify above.On same server we can copy Table in many way ;
    As I mentioned Above you can use ;
    select * into [Destination Database].[dbo].[NewTableName] from [SourceDatabase].[dbo].[Category]
    Second;
    select * into [Destination Database].[dbo].[NewTableName] from [SourceDatabase].[dbo].[Category] Where 1=2
    Insert into [Destination Database].[dbo].[NewTableName]
    select * from [SourceDatabase].[dbo].[Category]
    Thanks

  • What is the best way to get PATHS from one Photoshop psd file to another?

    Hi! New on the site, and I signed up specifically to ask the best way to import one .psd file into another, including the paths on the paths palette.
    Almost all of my Photoshop drawings make heavy use of vector paths, which I then stroke using using PS natural-media brushes and the "stroke paths" function (usually with "simulate pressure" checked.) Also, my .psd files tend to be, um, HUGE... and I typically break up a whole drawing into separate PS files and then assemble all of them into one final finished graphic.
    I have no trouble moving raster stuff from file to file. Just put all the layers I want to transfer into a group and drag the group to the other .psd. Works fine, including layer masks. But I have not found a good way to get vector paths from the Paths palette of one .psd to another. Of course I can select paths and copy them to the Win clipboard, switch to the other .psd, and paste them back in. The drawback to that method is that I lose the correct size relation between the results of previously done "stroke paths" operations (on raster layers) and the paths that generated them. Sometimes the copied-in paths are way too large, sometimes way too small, never Just Right.
    As I'm sure most of you know, if you resize an entire Photoshop document from within PS, any paths it contains are correctly resized along with everything else. That's no longer true after grouped raster layers are dragged over to another document but paths are copied and pasted in. The size connection is lost. (Location placement, too.)
    I WANT those paths! After I bring a piece of a drawing into the full final drawing, what looked good when I was working on it separately often doesn't look right any longer and I want to re-stroke those paths using different brush diameter, opacity, etc., or maybe even a completely different brush.
    I've tried bring outside .psd files in as smart objects with the Place command but either that doesn't work or I'm not doing it right. Using Place, the paths in the Placed document don't come in at all.
    I'll be very grateful for any hints or strategies any of you knowledgeable folks can give me. Thanks very much!
    Jim
    Note, PS CS3 extended on Win 7 pro.

    Denny
    1. Connect the two macs - firewire, ethernet, sneakernet as suits you - and copy the iPhoto Library Folder from Old Machine to New Machine. Drag it from Home/Pictures to the same location on the new machine.
    2. Because all the files 'belong' to the account on the old machine, you have to update the file permissions: hence Download BatchMod from
    http://macchampion.com/arbysoft/
    And apply it to the iPhoto Library Folder using the settings found here:
    http://homepage.mac.com/toad.hall/.Pictures/Forum/BatChmod.png
    (Credit to Old Toad for this one).
    Note: This must be run on the new machine after copying the files over.
    3. Then launch iPhoto on the new machine.
    Regards
    TD

  • How to copy table from one sheet to another making formulas relative to current sheet

    I'm truly sorry if this has been answered within this forum but I've been reading these posts for the last hour and nothing. Ok so here's my issue:
    I'm trying to do a budget spreadsheet. My ss contains sheets with each one representing a month. So sheet 1 is called January, 2 February etc.
    I have two table in each sheet, one with a list of expenses and the other is a subtable with that references the first table for special expenses. The second table is identical in functionality in each sheet so I do a copy from January into February. However, when I copy into Feburary, all my formulas still point to 'January::' and I have to go and remove the 'January::' from each cell.
    Is there any way to copy the second table and make it relative to the sheet that it's in? It seems simple and maybe I'm doing something fundamentally wrong but I can't find the answer anywhere.

    I made a simple version of what I think you are describing:
    I gave each table a name "Tabl" and "SubTable"
    SubTable cell A1 is assigned as follows:
    A1=Table :: A1
    Then I duplicated the January Sheet by highlighting the sheet and typing the key command <COMMAND>+d (or selceting the menu item "Edit > Duplicate"):
    Then I change the name of the new shee from "January -1" to "February"
    The relative reference should already exist.
    You can confim this by changing the contants of the informaiton in cell A1 of Table in the "February sheet

Maybe you are looking for

  • Selling pricing superceed scale price in sales order creation

    Hi all, I have a scenario as below. Material A has maintain 3 pricing condition as below. 1. Selling price (PR00) material A : normal selling price(PR00) = $2.00. 2. Free goods material A : free goods -> 12 + 2 (exclusive free items) 3. Scale pricing

  • Losing internet on WRT54GS, and only unplug/replug works.

    My router keeps going out, and the only thing that gets me back on is to unplug, replug, then I'm good but only for about 20 minutes.  Ideas?

  • Why Does Siri Sound fast/robotic?

    I notice that with iOS7 that Siri sounds different on TV ad's and videos online, but after I updated mind does sound different but robotic, works fine and only after I bought a used iPhone 4s from a work friend and setup for my Mom to use as an iPOD

  • Keeping information after a person leaves

    I have a PERSON table which is our list of people in the college. It's my main list and all other databases relate to it's ID column. I am creating a list of grants and want to relate it to the PEOPLE table and have done so (see two table description

  • Importing photos from an external hard drive to Photos app as albums

    it is driving me nut. I have spent hours searching for an answer, but they are all about iphoto or aperture, which I dont have on my newly bought (April 2015) macbook pro. I have 5GB photos on an external drive; they are in different folders named af