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.

Similar Messages

  • 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.

  • How to move a selected row data from one grid to another grid using button click handler in flex4

    hi friends,
    i am doing flex4 mxml web application,
    i am struck in this concept please help some one.
    i am using two seperated forms and each form having one data grid.
    In first datagrid i am having 5 rows and one button(outside the data grid with lable MOVE). when i am click a row from the datagrid and click the MOVE button means that row should disable from the present datagrid and that row will go and visible in  the second datagrid.
    i dont want drag and drop method, i want this process only using button click handler.
    how to do this?
    any suggession or snippet code are welcome.
    Thanks,
    B.venkatesan.

    Hi,
    You can get an idea from foolowing code and also from the link which i am providing.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    width="613" height="502" viewSourceURL="../files/DataGridExampleCinco.mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.binding.utils.BindingUtils;
    [Bindable]
    private var allGames:ArrayCollection;
    [Bindable]
    private var selectedGames:ArrayCollection;
    private function initDGAllGames():void
    allGames = new ArrayCollection();
    allGames.addItem({name: "World of Warcraft",
    creator: "Blizzard", publisher: "Blizzard"});
    allGames.addItem({name: "Halo",
    creator: "Bungie", publisher: "Microsoft"});
    allGames.addItem({name: "Gears of War",
    creator: "Epic", publisher: "Microsoft"});
    allGames.addItem({name: "City of Heroes",
    creator: "Cryptic Studios", publisher: "NCSoft"});
    allGames.addItem({name: "Doom",
    creator: "id Software", publisher: "id Software"});
    protected function button1_clickHandler(event:MouseEvent):void
    BindingUtils.bindProperty(dgSelectedGames,"dataProvider" ,dgAllGames ,"selectedItems");
    ]]>
    </mx:Script>
    <mx:Label x="11" y="67" text="All our data"/>
    <mx:Label x="10" y="353" text="Selected Data"/>
    <mx:Form x="144" y="10" height="277">
    <mx:DataGrid id="dgAllGames" width="417" height="173"
    creationComplete="{initDGAllGames()}" dataProvider="{allGames}" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:FormItem label="Label">
    <mx:Button label="Move" click="button1_clickHandler(event)"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form x="120" y="333">
    <mx:DataGrid id="dgSelectedGames" width="417" height="110" >
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Form>
    </mx:Application>
    Link:
    http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/ae9bee8d-e2ac-43 c5-9b6d-c799d4abb2a3/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • How do i transfer all my data from one itouch to another?

    how do i transfer all my data from one itouch to another?

    Try here  >  http://support.apple.com/kb/HT2109

  • How to move a specific tablespace datafile from one directory to another

    Database: 10.2.0.1
    OS : Generic
    Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
    ** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
    Edited by: ram_orcl on 16-Aug-2010 21:21

    Dear ram_orcl,
    Please follow the procedures here;
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
    8.3.4 Renaming a Datafile in the Primary Database
    When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
    The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
       1.
          To rename the datafile in the primary database, take the tablespace offline:
          SQL> ALTER TABLESPACE tbs_4 OFFLINE;
       2.
          Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
          /disk1/oracle/oradata/payroll/tbs_x.dbf
       3.
          Rename the datafile in the primary database and bring the tablespace back online:
          SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE      2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            3>  TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
          SQL> ALTER TABLESPACE tbs_4 ONLINE;
       4.
          Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
          SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
          SEQUENCE# APP
          8 YES
          9 YES
          10 YES
          11 YES
          4 rows selected.
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
       5.
          Shut down the standby database:
          SQL> SHUTDOWN;
       6.
          Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
       7.
          Start and mount the standby database:
          SQL> STARTUP MOUNT;
       8.
          Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
          SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
       9.
          On the standby database, restart Redo Apply:
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
            2> DISCONNECT FROM SESSION;
    If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
    ORA-00283: recovery session canceled due to errors
    ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
    ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
    Ogan

  • 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

  • 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

  • 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

  • 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.

  • 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

  • How to move the pages and reports from one dashboard to another

    hi all
    can please any one tel me hw to copy the reports along with pages from one dashboard to another
    Thanks

    Hi,
    Go to Administrator->Manage Presentation Catalg->Click on Group folder under which the dashboard and reports are present
    1)Create one folder and copy the reports which are present in the dashboard pages you want(reports will be under some specific folder,open and copy one after the other to the newly created folder).Do this if you want other set of same reports for new dashboard that you are creating
    2)Click on _portal and create a new folder(new dashboard)
    3)Click on dashboad that is to be copied
    4)copy the pages one after the other into new dashboard folder
    If you are not keeping new set of reports then no need to point reports in pages,if reports are placed under new folder then go to each page and pull those reports from newly created folder.
    Regards,
    Srikanth

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to move data from one database to another one?

    I 'd like to build up a new database, some of the data would come from an old database, then I have to make two connection objects to both databases, (two statement objects...) retrieving the data from the old one and inserting them to the new one.... sounds reasonable, huh? but it could not work this way... "........it would have caused the duplicated value , blah, blah..." even though I made two tables in two databases completely different, that errors are still there. seemed I cannot clone that table.
    could you guys have any better ideas? and why couldn't I go this way?
    the database: cloudscape3.01
    two databases are all on my local PC (WinNT4.0)
    thanks

    If you are getting dupicate record errors, then look at your recordset objects and make sure they are both pointing at seperate databases, and check the one you are using to output and make sure it isn't just writing NULL, if it is then trace up the line: your input (read) recordset may be reading NULL too.

  • How to move data from one database to another oracle database

    Hi
    All,
    AIX 5.3
    Oracle 10.2.0.3
    I want to move data between one oracle database to another oracle database.
    I know two method those are
    export/import
    dblink
    is there any other way I can move data?
    Thanks,
    Vishal

    I know below methods. However, using a perticular method is based on volume and type of data.
    1. imp/exp
    2. impdp/expdp
    3. SQL COPY command
    4. Transportable tablespace mathod
    5. dblink
    6. Export to flatfile and then use SQL Loader
    7. Oracle Migration Workbench
    Cheers
    Sameer

Maybe you are looking for