Best method for transferring data from one database to another?

There is an 8i database I have to deal with on a regular basis. Besides being completely outdated and unsupported, in my opinion the database has not been well-maintained--for a table with 25 million records, should ‘select count(*) from table;’ take 5 minutes to run? I don’t really know, but that seems long to me. Many complex queries (most including only tables with less than a million records) take a ridiculously long time to run, to the point that I can’t even run some of them.
I am not the DBA; I don't have the authority to fiddle with the database (nor would I feel comfortable doing that), and the powers that be will not put effort into improving functionality of this database due to an alleged plan to update/replace it within the next year. However, in the mean time, I still have to get data out of this database on a regular basis.
I have XE 10g installed on my local machine, and I have set up a database link in it to the 8i database. I have found that I can pull in basic data (simple queries) from the 8i database into tables in my XE database (e.g. create table tbl1 as select data from tbl1@8idb) and then query those tables to get the information I need much, much faster (including creation of the tables). While this option does not allow me to create queries/reports that other people can run, it makes work I’m doing only for myself much faster.
What I’m wondering is, what is the best way to bring the information I need over to my database? I usually don’t need entire tables, and I can probably identify a number of key tables (or parts of tables) I need. What I’ve been doing up until now is writing CREATE TABLE statements on the fly, but then I end up forgetting what all I’ve done, and each time I want up-to-date data, I have to drop the tables and re-create them. It seems to me that there should be an easier way to do this than to copy and paste from a text document into SQL*Plus.
Does anyone have any suggestions for me on how best to do this?

Sorry, I guess I posted this in the wrong forum. I re-posted in the database-general forum.

Similar Messages

  • BADI for transfering data from one modal to another modal within single appset

    Hallo Experts,
    My Business Requirement is Transfer of data from one modal to another in same environment and did this taking reference from below document.(How to custom badi for replicating destination app)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346?QuickLink=index&…
    Document contains TR for implementing BADI, but this document supports bpc version 7.0 and we are using is bpc 10.0.
    So i make all compatible changes in BADI implementation and activate it. Now i am testing using transaction UJKT using following script.
    and the result is records successfully written back to application MIS, but when i check data is not moved to target application MIS.
    I am facing stuck situation in my project work. Please Suggest. Hope for positive reply.
    Script:
    *XDIM_MEMBERSET WM_ACCOUNT = WM_041,
    *XDIM_MEMBERSET WM_UOM_02 = UOM_004
    *XDIM_MEMBERSET WM_UD_2 = WM_07
    *XDIM_MEMBERSET WD_EXT_MAT_GRP =CHALK-PH-I,CHALK-PH-II,CHAVN-PH-I,CHAVN-PH-II,NASHIK-WM,RAJASTHAN-WM,TAMILNADU-WM
    *XDIM_MEMBERSET CATEGORY= Plan
    *XDIM_MEMBERSET AUDITTRAIL=Input
    *XDIM_MEMBERSET P_ENTITY = SIL
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *START_BADI DAPP
       DESTINATION_APP ="MIS"
       RENAME_DIM ="WD_EXT_MAT_GRP= PRODUCT"
       ADD_DIM ="PLANT=NO_PLANT","MIS_ACCOUNTS=CAIN0058040008","COST_CENTER=NO_COST_CENTER","FLOW=Opening","UOM=AMT","CUSTOMER_SALES_2=NO_CUSTOMER","CATEGORY=Plan","AUDITTRAIL=Input"             
       DEBUG = ON
       WRITE = OFF
       QUERY = ON
    *END_BADI
    Please find attached result.
    Regards,
    Dipesh Mudras.

    Hello,
    Here is the manual to copy data between apps (it works with BPC NW75):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?quicklink=index&overridelayout=true
    It works me, but now I need to modify the Script Logic to make that a "property" from the origin dimension has to be copied to the destination dimension as "id", like follow:
    //*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    //*XDIM_MEMBERSET TIME = %TIME_SET%
    //*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
    //*XDIM_MEMBERSET RPTCURRENCY =  %RPTCURRENCY_SET%
    *START_BADI FiltroPD
         WRITE = OFF
         APPL = $APPLICATION$
         ADD_DIM = "ORIGEN = APPVENTAS"
         ADD_DIM ="O_COSTE = no_input"
         ADD_DIM="CECO = no_input"
         RENAME_DIM="P_ACCT = RATIOS.P_ACCT "
    *END_BADI

  • Transfer data from one database to another without identities but keep the relation b/w PK and Foreign key

    Hi,
    I need to transfer data from one database to another database (both are identical databases). 
    1. Not transferring identity columns (primary keys). the destination table might have the same key.
    2. keep the PK's and FK's relation b/w parent and child table
    3. I have 4 levels 
    Example: tableA (col1 int identity(1,1) , col2, col3)
    tableB (col1 int identity(1,1) ,
    col2 , col3) -- col2 has the foreign key relation with tableA.col1
    tableC (col1 int identity(1,1) ,
    col2, col3) -- col2  has the foreign key relation with tableB.col1
    tableD (col1 int identity(1,1) , col2, col3) -- col2  has the foreign key relation with tableC.col1
    please advise me.
    Thanks in advance

    Try the below:
    /********************************SAMPLE TARGET***************************************************************/
    Use MSDNSamples
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'R1'
    Insert into TableA(name) Select 'R2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Childname1',1
    /********************************SAMPLE TARGET***************************************************************/
    /********************************SAMPLE SOURCE***************************************************************/
    Use Sample
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'C1'
    Insert into TableA(name) Select 'C2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Kidname1',1
    /********************************SAMPLE SOURCE***************************************************************/
    USe MSDNSamples
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    --Migration table
    Create table Mg_TableA(LevelValueId int, NewValueId int)
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    MERGE INTO TableA
    USING sample.dbo.TableA AS tv
    ON 1 = 0
    WHEN NOT MATCHED THEN
    INSERT(name) Values(tv.name)
    Output tv.levelValueId ,inserted.LevelValueid INTO
    Mg_TableA;
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    Insert into TableB (name,LevelValueID)
    Select A.name,B.NewValueId From sample.dbo.TableB A
    Inner join Mg_TableA B on A.LevelValueID = B.LevelValueId
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    /********************************TEST THE VALUES***************************************************************/
    Select * From TableA
    Select * From Mg_TableA
    Select * From TableB
    /********************************TEST THE VALUES***************************************************************/
    Drop table TableB,Tablea,Mg_TableA
    Use Sample
    Drop Table TableB,Tablea

  • Different ways to Transfer data from one database to another database

    Hi all,
    What are the ways to transfer data from one database to another database. With the following options, i Can transfer data as far as i know. Please
    correct me if i am wrong or tell me if there is any other options are available.
    1) Create database link/connection string and using this string and COPY command, we can transfer data.
    2) By using Export and Import utilities.
    I told first one to my interviewer, he told, its strange, by using, COPY command also can we transfer data ? As far as i know, we can transfer data. Am i right ?
    Thanks in advance,
    Pal

    transfer data from one database to another database.You mean store the data of one to another?
    1) Create database link/connection string and using this string and COPY command, we can transfer data.every SELECT on a DB-link is transfering data. And you can have all kind of transfers and store on the e.g CTAS of materialized views or.... the SQL*PLUS COPY :
    The COPY command is not being enhanced to handle datatypes or features introduced with, or after Oracle8i. The COPY command is likely to be made obsolete in a future release.
    But there are many others. Check for ORACLE Streams, and the "COPY" your interviewer was mentioning is about the operating file system COPY right? That's transportable tablespaces.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tspaces013.htm#ADMIN11403
    -- andy

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?

    Hi All,
    I am new to TestStand. Still in the process of learning it.
    What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
    Thanks in advance,
    LaVIEWan
    Solved!
    Go to Solution.

    Hi,
    Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
    Regards
    Ray Farmer

  • Transfer of Data from one Database to Another

    Respected Guys
    Is there any way to transfer few fields from different tables located on a Database Server used by SAP to an other database used by an another application. The other database also have same fields and and Tables structure.
    Both databases are located on different servers and are oracle9i.
    Is there any way to transfer real time data from one database to another. If not then any way by which we can preiodically can transfer the data.
    Thnx

    Hi
    U can use a <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/9c/d736b880c34f76b507bac7751a0474/frameset.htm">DBCON (Database Connection) tool</a>.
    Here you should call another database and write SQL native code in order to transfer/read the data.
    Max

  • How to copy the data from one database to another database without DB link

    Good Day,
    I want to copy the data from one database to another database with out DB link but the structure is same in both.
    Thanks
    Nihar

    You could use SQL*Plus' COPY command
    http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
    Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM

  • Table Data From One DataBase to another

    Dear Fellows,
    There are two DataBases running in my NT Server. I want to pull data of a table from other database. Does any body know how can I do it if I dont want to export and then import.
    Thanks in advance
    Danish

    Please find the help for SQL*PLUS command COPY.
    It will be useful when you want to copy datas from one database from another database without using import & export.

  • Transfer data from one database to another

    Hello,
    We have an application which uses an Oracle 9i server database. On this server we have two databases ( one for test and one for production ).
    From time to time it's required to transfer data from production database to test database.
    The steps followed by the ones which made the transfer are:
    a) drop the user schema ( the one which contains all data)
    b) recreate the user
    c) import the data ( using import utility )
    d) compile invalid object ( what this will mean I don't know)
    It's not possible to delete only the content of the tables and then import data from a dump file? In this way the steps c) and d) will no longer be required. If this is possible can you tell me if is there a command which will delete all data from all table ( almost 2000 tables)?
    Thank you fro your help!

    I think ..following a,b,c,d is the best way to maintain consistency. you are just thinking about the data in the tables, but what about the changes in views,procedures,functions etc....
    compile invalid object ( what this will mean I don't know)create a file xxx.sql with following code and execute it from sql*plus
    set echo off
    set head off
    set feedback off
    set timing off
    spool compile_invalid_obj.sql
    select 'ALTER '||DECODE(OBJECT_TYPE,'PACKAGE BODY','PACKAGE',OBJECT_TYPE)||' '||OBJECT_NAME||' '||DECODE(OBJECT_TYPE,'PACKAGE','COMPILE PACKAGE;','PACKAGE BODY','COMPILE PACKAGE;','COMPILE;')
    from user_objects
    where status = 'INVALID';
    spool off
    set feedback on
    set echo on
    set timing on
    @compile_invalid_obj.sql
    HTH
    --Chaitanya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help transferring data from one account to another

    I bought my computer in August 2008 and had previously had an iBook. When transferring my data from my old computer to the new one, I guess I did it wrong so instead of it transferring all to the same place it created two accounts.
    Is there way to transfer my music/pics etc to my main account?
    Also, my iphone is backed up the other account because thats where all my music is, is there a way to also keep all this data once I am using only the main account?

    When you use Migraine Assistant, it transfers the account of the older machine to the newer because the users name is involved in everything, like iTunes playlists etc.,
    Since to run Migraine Assistant you need to have gone through setup on the Mac and created the main Admin account, when you Migrate, you transfer the other account so you wind up with two accounts on the new machine.
    All you have to do is log into the Admin account of the first user you created, then change the acount status of the Migrained account to Admin and reboot, check it out well, then delete the first Admin account at your own leaisure. However it's best to leave two accounts on the machine, just in case your locked out for some reason.
    If you rather transfer your files from one account to another use the Shared Drop Box
    If you have three accounts on the machine (original admin and two migrained migrateda accounts), you'll just have to monkey around and clean up the mess.

  • How to copy documents for InfoProvider data from one cube to another cube

    Hello Everyone,
    We are using standard document feature to store document/comment about the data shown in the report/planning query. Relevant characteristics have the property 'characteristics is document attrib' turned on/selected for this purpose.
    Looks like the documents created gets tagged to a particular InfoProvider along with characteristic value assignment.
    Is there a way to move or copy documents from one InfoProvider to another InfoProvider.
    As per the design requirement, we need to move data from a real time InfoProvider (transaction cube) to a basic reporting cube. The data in the first/source cube stays for a period of approx 3 months before moved to other cube. We want the documents associated with InfoProvider data also to be moved, so that users can continue to see the document/comments what they  had created earlier.  
    I looked at the Documents tab in DataWarehouse workbench. No options seem to be available to copy or move documents.
    Any help will be highly appreciated and points will be rewarded accordingly!
    Best regards,
    Sanjeeb

    Hi
    Have you got any answer to this? I would also be interested in a copy function but more from one query ID to another.
    Kind regards,
    Daniel Müller

  • Fatal error while transferring data from one bb to another

    I was trying to transfer data from one bb to a different bb using the bb desktop manager tool.  It collected all the data from the first bb fine and then while transferring data to the new one it said a fatal error occured to try again.  That bb will not even turn on now.  No white screen or anything.  Its like there is no operating system.  I don't know what to do.  I tried to connect it and just update the software but that isnt working either.  Says it is not responding during initialization! I think I killed it.... any ideas what to do???

    You can try to reload the OS in one of the following ways
    http://www.blackberry.com/btsc/KB03485
    http://blackberryfaq.net/index.php/How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • What is the best way to move data from one array to another

    I'm going to be moving data from one array to a larger array on the same RAID but different controller. (I have some extra extra drives I'm also going to be installing Retrospect so I can't just restore from a backup.)
    The RAID has 450GB of production files, fonts etc.
    What is the best way to move the data over?
    I saw that someone had suggested using ditto. Would that be better than MacMV?
    I also own Bru LE so I could use that.
    Any advice would be appreciated.
    Thanks,
    Paul

    Ditto is a great option -- probably the best.
    ditto -rsrc src_folder /Volumes/targetvolume/targetfolder

  • What is best method to retrieve data from two databases

    I'm writing a report that needs data from two sql databases. Not the same brand. Grouping and sorting fields come from both databases, so I can't just read one and retrieve data from the other. It seems to me I have to extract data from each data base using crystal reports, merge the two files using crystal reports and feed the merged file into crystal reports. I've not found a simpler or better method in the Crystal Reports documentation. Is there documentation about doing this process on the web site or with crystal reports documentation? My method seems cumbersome so I'm wondering if there is a better method.

    Jeffrey,
    A cheap and effective solution, for a periodic transfer would be using XML.
    If you have the DDL for all of the objects in the database, you can just duplicate it on whatever RDBMS engine you want, and then, extract the data, table per table into XML files from the target server, and then load the files into the target server.
    Otherwise, if you are going to do this in an ongoing basis, then, use SAP Replication Server. The best asynchronous, real time, heterogeous replication solution in the industry, exploited with a great deal of success by many critical mission financial applications with global topologies and sub second latency.
    My two cents.
    I hope they help.
    Regards,
    Jean-Pierre

Maybe you are looking for

  • A Control in a panel sometimes cannot show

    In my panel, there are some tables using Zplane to arrange, there is another control, a ring control in the panel, when loading and display panel, sometimes the ring control can be displayed, sometimes it can not be displayed, but I can see an imprin

  • Xfce runs some apps twice at startup

    Usually Xfce runs conky and keepassx twice during the startup. I tried cleaning ~/.cache/sessions while unlogged, but it didn't work. These apps figure only once in xfce4-sessions-settings and these are my settings.

  • The future of Flash and Actionscript 3.0, need your advise

    Hello friends, currently I'm learning Actionscript 3.0, but have been reading a lot about Adobe disscontinuing Flash in the near future in support of HTML 5. Now, what I want to know is this: should I continue my education in AS3.0, or am I wasting m

  • Preview Sharing Question

    I use Aperture for stills and FCP X for video.  When I want to add a still to a project in FCP X I use the photo browser.  It appears that only the master is available.  I have Preview Preferences set to share "Always" and the size set to match close

  • Purchase invoice plan and PS

    Hi all, PS allows to manage sales invoice plan using milestone. Is there any object I can use to manage in the same way a purchase invoice plan directly in PS? Thanks a lot.