Export and import table data with Java

I need a library for simple exporting and importing table data.
The data should be exported to a SQL file with insert statements.
I just want to tell the library the table name, the connection and where to store the file. The usage should be very simple.
Are there any small libraries for this? Finished calsses and methods which I can just call?

I need a library for simple exporting and importing
table data.
The data should be exported to a SQL file with insert
statements.Every database has utilities to export/import data from tables. Take a look at your database manual.

Similar Messages

  • Exporting and importing form data with out user intervention

    Hi
    A sample for this is posted on
    http://eslifeline.files.wordpress.com/2008/06/importing-and-exporting-data-from-pdf.pdf

    Hi Steffen,
    You should go to user manegment and there you should export you'll have to copy the text file it will create than paste it in the import of the other portal it should copy the users and the groups.
    hope it helps,
    Yoav

  • Export and import of data not table and data ????

    hii brothers and sister
    plz i have a a quetion about Export and import of data in oracle forms
    i have created 02 boutons one for export his trigger like this :
    eclare
    alrt number;
    v_directory varchar2(200) := 'c:\backup'; --- that if the C Drive not the Drive that the windows had installed in it.
    path varchar2(100):='back_up'
    ||to_char(sysdate,'dd_mm_yyyy-hh24_mi_ss');
    v_exp varchar2(200) := 'exp hamada/hamada2013@orcl file = '
    ||v_directory
    ||'\'
    ||path
    ||'.dmp';
    begin
    host(v_exp);
    alrt:=show_alert('MSG');
    end;
    and the bouton import is like this
    declare
    alrt number ;
    v_ixp varchar2(200) := 'imp userid=hamada/hamada2013@orcl file =c:\backup2\back.dmp full=yes';
    begin
    host(v_ixp);
    alrt:=show_alert('MSG');
    ref_list;
    end;
    i have just one table "phone"
    this code is correct he expot not only the data but also the creation of the table ....for exemple i do export and evry thing is good until now and i find the .dmp in the folder backup .. but when i deleted all data from my app and try to import this .dmp iit show me error it tell me thet the table phone is already created ....
    so plz help wanna just export the data of phone not the creation of table and data ???? or how can i import just the data from this .dmp ??

    Pl post OS and database versions.
    You will likely need to use the IGNORE flag - http://docs.oracle.com/cd/E11882_01/server.112/e22490/original_import.htm#sthref2201
    Imp utility (by default) will try and create the table first. Since the table already exists, imp reports an error. Use the IGNORE flag in your imp command to not report such errors.
    HTH
    Srini

  • How I can Export and Import tables using BRTOOL ?

    Dear All,
    Since we upgrade the oracle from 9.0.2 to 10.2.2 we not using SAPDBA any more.
    please help me if you now how to export and import tables in sapr3 using brtools?
    thanks and Best regards,
    Chrisna

    Dear Chrisna,
    first of all you should get the recent version of the BRTOOLS (currently it's BRTOOLS 7.00 (<b>26</b>)). The developers are working hard on making these tools more reliable and usable so you should not deny the improvements to yourself.
    Now to your problem:
    Try this call:
    brspace -f tbexport -o SAPR3 -t SSF_PSE_D,SSF_PSE_H,HTTPURLLOC
    You don't need to specify a tablespace; it's just a additional option to select what tables you like to export.
    You may also want to check these notes for further "enlightment"
    <a href="http://service.sap.com/sap/support/notes/976435">#976435     Support for Oracle Data Pump in BRSPACE</a>
    <a href="http://service.sap.com/sap/support/notes/713497">#713497 - New BRSPACE options for "Reorg", "Rebuild" and "Tablespace"</a>
    <a href="http://service.sap.com/sap/support/notes/647697">#647697 - BRSPACE - New tool for Oracle database administration</a>
    <a href="http://service.sap.com/sap/support/notes/646681">#646681 - Reorganizing tables with BRSPACE</a>
    <a href="http://service.sap.com/sap/support/notes/12741">#12741 - Current versions of BR*Tools and SAPDBA</a>
    <a href="http://service.sap.com/sap/support/notes/651812">#651812 - FAQ: BR*TOOLS and SAPDBA</a>
    KR Lars

  • Cmd to export and inport table data of a paticular schema

    hi,
    can anyone tell me the cmd to export and inport table data of a paticular schema

    Exp userid=system/pass owner=SCOTT rows=Y triggers=Y
    Imp userid=system/pass file=expdat.dmp fromuser=SCOTT touser=NEW commit=yes log=log.txt

  • Exporting and importing table using R3trans program between 2 clients

    Hi,
    How to export and import a table between to clients in a same system using R3trans program?
    I need to copy a table from Client 020 in a system to client 040 of the same system using R3 trans. I need to know the procedure.
    Can any one advice
    Regards,
    Suresh

    This is how you do a export and import of table entries.
    Export:
    Open Notepad and type the following,
    export
    client = 020
    file = 'clone.export.<sid>.<client no>.data'
    select * from <client_dependent_tablename1>
    select * from <client_dependent_tablename2>
    select * from <client_dependent_tablenamen>
    Save the file as export.ctl
    Run R3trans export.ctl
    and the data of these files will be stored in a file called clone.export.<sid>.data in the directory from which you have called R3trans
    Import:
    Open Notepad,
    import
    client = 040
    file = clone.export.<sid>.<client no>.data
    buffersync = yes                                               
    Save the file as import.ctl
    Run R3trans import.ctl
    Cheers!
    Bidwan
    Message was edited by:
            Bidwan Baruah

  • Exporting and Importing Virtual servers with Windows 2012 R2 Hyper V

    Hi
    We are looking for various options / best practice in exporting and importing VSs between Windows 2012 R2 servers. Live migration we tested between servers in same VLAN and it's fine, but some servers are in different VLAN and hardware firewall is there
    in between. So we exported the VS and while importing it, there is no option to export each Virtual disk to separate partitions / LUNs. Is it fine to create a new VS in the new server and just copy the VDs from the other HV host server, or exporting and importing
    is the only proper method?
    Thanks in advance
    LMS

    Hi Laljeev,
    Please allow me to state my understanding of the two methods :
    1.when you want to copy vhd you may need to shutdown the VM , further more if there is some snapshots I think it will be a  trouble .
    2.  "export" you still need to shutdown VM but it doesn't have the trouble with snapshots .
    The other way I will use is , "move"  all of the VM's data to external disk then import it into destination hyper-v server (it can decrease the off-line time of VMs).
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.
    Elton, in Windows Server 2012 R2, we do not need to show down the VM to export it via the Hyper-V Manager GUI or Powershell...
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • Howto export and import SLD data to different SLD's

    Hi All,
    I have a landcape with 4 SLD's. A central SLD within Solution Manager and 3 SLD's for resp. XI dev,qas,prd.
    The central SLD is version 7.0 and the XI versions are 2.2. (model versions are the same, CR are different -> XI SAP_CR 2.18 -> Solman SAP_CR 2.0)
    The idea is that all changes in Bussiness (including new products and software components) and Technical Systems take place in the Solution Manager. After a change we make an export and import it into XI dev, qas and so on.
    However....
    When adding, for example, an exsisting product to a technical system, export it on Solman and import it into XI dev, all entries dissapear(sapms/host/clients).
    We filled Solman with a full export of XI development and that worked fine.
    Does anybody has an idea about actions to be taken?
    Thanks,
    Sjoerd Lubbers

    Hi All,
    I have a landcape with 4 SLD's. A central SLD within Solution Manager and 3 SLD's for resp. XI dev,qas,prd.
    The central SLD is version 7.0 and the XI versions are 2.2. (model versions are the same, CR are different -> XI SAP_CR 2.18 -> Solman SAP_CR 2.0)
    The idea is that all changes in Bussiness (including new products and software components) and Technical Systems take place in the Solution Manager. After a change we make an export and import it into XI dev, qas and so on.
    However....
    When adding, for example, an exsisting product to a technical system, export it on Solman and import it into XI dev, all entries dissapear(sapms/host/clients).
    We filled Solman with a full export of XI development and that worked fine.
    Does anybody has an idea about actions to be taken?
    Thanks,
    Sjoerd Lubbers

  • Export and import tables with and without data

    I have few table which i want to take export with data and some without data, and import that in new db? Send me the command plz for this.

    exp and imp all have a flag
    ROWS import data rows (Y/N)
    but that flag apply to the whole export/import process.
    You will need do export twice,
    ROWS=Y first with list of tables that need data
    and ROWS=N with list of tables without data.

  • Exporting and Importing Large data set of approx 300,000 rows

    Hi,
    I have a table in db 1(approx 10 columns) and want to copy all the rows(approx. 300,000) from this table with a simple where clause to the same db table in db 2. Both databases are on unix.
    I am executing this from a laptop with windows XP remotely connected to my office network.
    Could someone let me know what is the best way to do this.
    Thanks

    331991 wrote:
    Thanks for the detailed instructions. I however have some limitations:
    1. Both schemas(from and to) are on the same database server. I am the schema owner for both the schemas A logical impossibility in Oracle. A schema is defined by its owner, therefor you cannot have two schemas owned by the same owner. SCHEMA1 is, by definition, owned by user SCHEMA1. And SCHEMA2 is, by definition, owned by user SCHEMA2.
    but don't have rights to create dir's on the server.Then it is of no value to create a directory object in the database. The database's directory object is nothing but an alias to refer to an actual, existing directory on the host server.
    2. I don't want to copy all data from db1 to db2. I want to copy data where id > 5000 in the id column. Also in table in db1 has 10 columns and table in db2 has 15 columns with 10 from db1 with same data types and 5 more .
    How can I export the data to my laptop from db1 and then import into db2 in this scenario?
    You don't. Create a dblink and copy the data directly from the source to the target:
    INSERT INTO TARGET_TABLE VALUES
      (SELECT COLA, COLB, COLC, NULL, NULL, NULL, SYSDATE
       FROM SOURCE_TABLE@SOURCE_LINK
       WHERE ID > 5000);
    Also I am using Oracle 10G.
    Thanks

  • Export and Import of Users with ABAP datasource to  target standalone EP.

    Hi Friends,
    My customer is having
    Source System:BS2
    ABAP+ JAVA --- usage type : BW, EP
    datasource -- ABAP
    now, they need datasource as LDAP
    so i have suggested as attached SOW
    1.Install New Instance BS3 with JAVA,EP,EP Core
    2.Patching BS3 to SP15 level
    3.Import PCD from BS2 to BS3
    4.Configure SSO between BS2 and BS3
    5.Configure Data source to LDAP
    6.Testing the Configurations
    7. Uninstall JAVA DATABASE from BS2
    Target System:
    Standalone JAVA-- only EP
    datasource -- LDAP configured
    I have completed all steps successfully from 1 to 5
    In source system, 45 users are there with ABAP datasource and ABAP roles...  Now how can i import those users with ABAP roles into target System ( Standalone  EP)
    Any Usermapping is required to configure.
    Please suggest me to workaround on this.
    Regards,
    Venkat.

    You have to do this manually. In theory you can make a specially formatted text file to create the users and assign their portal groups, but it is quicker to just add them using the useradmin tool. If you export a user from the Java useradmin tool you can see the format of the text file. I ahve written an ABAP in the past to do the text file creation, but I can't find it now

  • Export and Import in Data warehouse

    Hi,
    I have built a data warehouse project with few dimensions and a cube on a server machine, say server1. Now i have another server machine on which i want to develop this project for bulk production.
    I want to import all the developments from server1 to new server machine, say server2, To save my time. I exported data from server1 using export functionality and imported the same file to server2 using import function. My questions is.......
    Is it possible to use all the imported objects like cube, dimension, mappings, tables and sequences in the same way in server2 as i was using in server1. If yes then what are the necessary configurations, i have to made.???? because imported dimensions are not able to deploy in new server2 machine giving different errors especially invalid location and invalid table errors for mapping and dimensions.
    thanks in advance
    imran

    you can sue the MDL file on your new server but you have to do the following:
    1. Register locations.
    2. Configure the mapping to use the new locations registered.
    4. Configure Control Center locations.
    Register the location in Control center
    Deploy the mappings/Process flows
    The Invalid location error is occuring becaue the location is not configured and registered in your connection explorer.

  • Export and import UTF8 data between different databases

    Hi,
    I want to know how to do the following:
    export data from database 1 and then import the data to database 2
    I export user, without grants, with table data, without compress extents
    database 1:
    machine: SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Fire-280R
    oracle version: 8.1.7
    charset: SIMPLIFIED CHINESE_CHINA.UTF8
    database 2:
    machine: SunOS 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-2
    oracle version: 8.1.6
    charset: AMERICAN_AMERICA.UTF8
    Question:
    1. how to do it by using exp and imp command?
    2. Before exporting, what NLS_LANG should I set?
    3. Before importing, what NLS_LANG should I set?
    I can export data but got errors when importing as follow:
    Export file created by EXPORT:V08.01.07 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    IMP-00069: Could not convert to environment national character set's handle
    IMP-00000: Import terminated unsuccessfully
    Thanks a lot.
    Regards,
    Kenny

    Hi, Nat,
    Thanks for your post:
    I have tried the following:
    Case 1:
    - set environment NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8" in machine 1
    - export data from machine 1
    - ftp the export from machine 1 to machine 2 in binary mode
    - set environment NLS_LANG=AMERICAN_AMERICA.UTF8 in machine 2
    - import the data to machine 2
    Result:
    Export file created by EXPORT:V08.01.07 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    IMP-00069: Could not convert to environment national character set's handle
    IMP-00000: Import terminated unsuccessfully
    Case 2:
    - set environment NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8" in machine 1
    - export data from machine 1
    - ftp the export from machine 1 to machine 2 in binary mode
    - set environment NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8" in machine 2
    - import the data to machine 2
    Result:
    Export file created by EXPORT:V08.01.07 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    IMP-00069: Could not convert to environment national character set's handle
    IMP-00000: Import terminated unsuccessfully
    Case 3:
    - set environment NLS_LANG=AMERICAN_AMERICA.UTF8 in machine 1
    - export data from machine 1
    - ftp the export from machine 1 to machine 2 in binary mode
    - set environment NLS_LANG=AMERICAN_AMERICA.UTF8 in machine 2
    - import the data to machine 2
    Result:
    Export file created by EXPORT:V08.01.07 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    IMP-00069: Could not convert to environment national character set's handle
    IMP-00000: Import terminated unsuccessfully
    Case 4:
    - set environment NLS_LANG=AMERICAN_AMERICA.UTF8 in machine 1
    - export data from machine 1
    - ftp the export from machine 1 to machine 2 in binary mode
    - set environment NLS_LANG="SIMPLIFIED CHINESE_CHINA.UTF8" in machine 2
    - import the data to machine 2
    Result:
    Export file created by EXPORT:V08.01.07 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    IMP-00069: Could not convert to environment national character set's handle
    IMP-00000: Import terminated unsuccessfully
    database 1:
    machine: SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Sun-Fire-280R
    oracle version: 8.1.7
    charset: SIMPLIFIED CHINESE_CHINA.UTF8
    database 2:
    machine: SunOS 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-2
    oracle version: 8.1.6
    charset: AMERICAN_AMERICA.UTF8
    I cannot successfully import the exported data from database 1 to database 2. What is the correct procedure and setting in NLS_LANG in both machines?
    Can I import 8.1.7 exported data to 8.1.6 database?
    Please help.
    Regards,
    Kenny

  • How to export and Import table of another user from user system using expdp

    Hi All,
    How to export a table 'scott.emp' from system user.
    expdp system/password directory=expdp dumpfile=scott_emp.dmp ???? ?? tables=emp ??????????????????????????
    thank you
    ---------------------------------------------------------- Posting solution here to make needed users not to scroll down ------------------------------------------------------
    Finally I got it right!!!
    Task :- Export table_1 of schema_a from database db1 and Import it to schema_b of database db2 as user other than schema owner
    Solution :-
    expdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=expdp_schema_a.table_1.log
    impdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=impdp_schema_a.table_1.log remap_schema=schema_a:schema_b remap_tablespace=table_1_tablespace:schema_b_tablespace
    Thank You All
    Edited by: Ven on Mar 9, 2011 7:52 AM

    Just a example
    SQL> $expdp system/sys directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
    Export: Release 11.2.0.1.0 - Production on Tue Mar 8 10:39:57 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "SCOTT"."EMP" 8.570 KB 14 rows
    Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
    C:\APP\MAZAR\ADMIN\ACEME\DPDUMP\TESTS.DMP
    Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 10:40:01
    SQL>

  • Export and Import encrypted data

    Hi,
    I have a database table with encryped data (encrypted using DBMS_OBFUSCATION_TOOLKIT.DES3Encrypt). I am having an issue when I export this table and import it into a new schema. The encrypted data seems to have changed after import. I am unable to decrypt it from the new schema.
    Below is the character set details from export/import.
    "Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set. Server uses WE8ISO8859P1 character set (possible charset conversion)."
    "Import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set."
    Has anybody had this issue before? Does it have anything to do with the character set? If so, how do I fix it?
    Thank you!

    Hello,
    since this question is about using the export utility, you might better ask this in {forum:id=61} or {forum:id=732}.
    Regards
    Marcus

Maybe you are looking for