ORACLE DATABASE REPLICATION -- ANY APPROACH @ THANKS FOR YOUR HELP

HI ALL,
I am new to Oracle as a developer.Please help me if you find sometime regarding the following requirement .
we are replicating the database (TARGET Database 9.2) with the source database(10G) .
My Idea was to create dblinks for Source DB in Target and use some cursors to populate the data required for destination tables
(Here i have to update the destination table when the records are updated in source DB and insert the records in Destination DB when no record is found in destination).
For this requirement , i am planning to use ORACLE MERGE CONCEPTS.As my destination database is 9.2 and merge with 9.2 is not powerful as per my requirement .
EG :
1)I do not need WHEN MATCHED CLAUSE SOMETIMES )
2)ALSO I NEED MERGE IN TO MULTIPLE DESTINATION TABLES
I came across the following code in one of your posting .If this really works with 10g version .I think i am in the correct path (I can write stored programs in source Database (It is 10g))
IF NOT THIS ....ANY OTHER APPROACH...
drop table external_tbl;
drop table dim1;
drop table dim2;
drop table fact_tbl;
create table external_tbl ( dim1_cd char(1), dim2_cd char(1), qty number );
insert into external_tbl values ( 'A', 'B', 1 );
insert into external_tbl values ( 'B', 'C', 2 );
insert into external_tbl values ( 'A', 'D', 3 );
create table dim1 ( dim1_cd char(1) primary key, dim1_description varchar2(20) );
insert into dim1 values ( 'A', 'At the Earth''s Core');
insert into dim1 values ( 'B', 'Barsoom');
create table dim2 ( dim2_cd char(1) primary key, dim2_description varchar2(20) );
insert into dim2 values ( 'B', 'Buck Rogers');
insert into dim2 values ( 'C', 'Carter, John');
create table fact_tbl ( dim1_cd char(1) references dim1, dim2_cd char(1) references dim2, qty
number )
MERGE ALL
USING(SELECT dim1_cd, dim2_cd, current_qty
FROM external_tbl) b
INTO fact_tbl a
ON ( b.dim1_cd = a.dim1_cd
AND b.dim2_cd = a.dim2_cd)
WHEN NOT MATCHED THEN
INSERT
(dim1_cd, dim2_cd, current_qty)
VALUES
(b.dim1_cd, b.dim2_cd, b.qty)
WHEN MATCHED THEN
UPDATE current_qty
SET qty = b.qty
INTO dim1 d1
ON (b.dim1_cd = d1.dim1_cd)
WHEN NOT MATCHED THEN -- insert a dummy record
INSERT INTO dim1 ( dim1_cd, dim1_description )
VALUES (b.dim1_cd, 'unknown' )
INTO dim2 d2
ON (b.dim1_cd = d2.dim2_cd)
WHEN NOT MATCHED THEN -- insert a dummy record
INSERT INTO dim2 ( dim2_cd, dim2_description )
VALUES (b.dim2_cd, 'unknown' )
and the results to be:
select * from dim2;
D DIM2_DESCRIPTION
B Buck Rogers
C Carter, John
D unknown -- added during the MERGE to maintain ref integrity
select * from fact_tbl;
D D QTY
A B 1
B C 2
-----THANKS FOR READING MY QUESTION

Hi ,
Thanks for the reply....
How can i convert 9i merge to 10g merge (update set column_name = column_name i did not get this )....
Also , My requirement is to update only the updated columns in the source table not the entire row ..I tried like this (but not sure whether it is correct or not)
Compare source to destination and update if not equal
MERGE
INTO red_cust tgt
USING (
SELECT --red_cust_id_seq .nextval  as CUST_ID ,
red_cust_nos(i) as CUST_NO,
red_cust_names(i) as CUST_NAME,
red_cust_inactive_dates(i) as INACTIVE_DATE ,
red_cust_insert_users(i) as INSERT_USER ,
red_cust_insert_dates(i) as INSERT_DATE ,
red_cust_update_users(i) as UPDATE_USER ,
red_cust_update_dates(i) as UPDATE_DATE
FROM master_table
) src
ON ( src.cust_no= tgt.cust_no )
WHEN NOT MATCHED
THEN
INSERT (tgt.CUST_ID ,
tgt.CUST_NO,
tgt.CUST_NAME,
tgt.TAX_EXEMPT_INDIC,
tgt.INACTIVE_DATE,
tgt.INSERT_USER,
tgt.INSERT_DATE
VALUES (src.cust_id
src.cust_no ,
src.CUST_NAME,
src.TAX_EXEMPT_INDIC,
src.INACTIVE_DATE,
src.INSERT_USER,
src.INSERT_DATE
WHEN MATCHED
THEN
UPDATE
set
tgt.cust_name =src.cust_name where tgt.cust_name !=src.cust_name ;
/*Is this correct approach : what i mean by this is :compare src customer_name and target customer name when they are not equal assign it to the destination source name*/
I repeated above for the other columns
tgt.TAX_EXEMPT_INDIC,
tgt.INACTIVE_DATE,
tgt.INSERT_USER,
tgt.INSERT_DATE
After i tried this , i got the computability error again ..as i am merging from 10g to 9i .........(ERROR: Optional where clause in merge is not available in DESTINATION i.e 9i)
If my approach above is correct , is there any alternative for where clause in merge in 9i
I am struck here...Please guide me through the correct path.....
I appreciate your help

Similar Messages

  • TS3899 Getting a "background picture of angry birds" in back of my e mail messages...any ideas how to get rid of this?  Thanks for your help

    All of a sudden I am getting a background picture of angry birds in my e mail.  I can view the mail but it is annoying.
    I have cleard the history an still it appears.   Any ideas on how to get rid of this garbage?  Thanks for your help.

    Bettina:
    Do you see the color in Designer, or only Acrobat. If it's only in Acrobat, try changing the menu item Forms >> Highlight Fields. This toggles entry field highlights on and off.
    Mark
    You can shut off or change the highlight with this
    app.runtimeHighlightColor = color.red;
    if (app.runtimeHighlight)
    app.runtimeHighlight = false;

  • My new iphone was stolen today. I'm trying to track it via icloud but it shows the average ratio that the phone is disconnected. Are there any other way to track the phone. Thanks for your help.

    my new iphone was stolen today. I'm trying to track it via icloud but it shows the average ratio that the phone is disconnected. Are there any other way to track the phone. Thanks for your help.

    If the phone is turned off, doesn't have an internet connection, or has been restored preventing "Find my iPhone" from being able to work, there is no other way to track it.

  • Server Problem, thanks for your help

    Hi there,
    We have 2 informix database instabce running on same machine. Call devdb and systestdb. The structure are same. The question is, when I run application on systestdb, it works. But if i run same app on devdb, seems nothing happen. I do believe the configuration is oK, and environment has been correctly set up [I copy the working one and only change the DB name to devdb]. And also I notice when I run the app on devdb, seems nothing being write to ULOG file. [only server start message been wrote, and I check the server is up.] That is what confuse me, if there is message, you may be able to find out what cause problem, but if there is no message, what can I do.
    And another question is, when I run wlisten, why the message not write to that file point out by UBBCONFIG, but it will generate a new one under current directory?
    Any idea? I am newer in Tuxedo, thanks for your help.

    Up, nobody can help?
    :-(

  • Two separate iPhones got merged into one iTunes account. How to separate them. We are sharing all of each other's contacts at this time. Thanks for your help.

    Two separate iPhones got merged into one iTunes account. How can I separate them in iTunes???????. We are sharing all of each other's contacts at this time. Thanks for your help.

    The reason you are receiving each other's text messages is because you are both using the same Apple ID for iMessage.  To prevent this you need to use different IDs.  (Note: you can still share the same ID for iTunes.)  On one of the phones, go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with a separate ID.
    To migrate your 3GS to a new iCloud account, start by saving any photo stream photos that you want to keep on the phone to your camera roll.  To do this, open the my photo stream album, tap Edit, tap the photos, tap Share, tap Save to Camera Roll.  Next, if you have any notes that you are syncing with iCloud that you want to keep, you'll need to email these to yourself so they can be recreated after moving to the new account.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, choose Keep On My iPhone.  Next, sign back in with a different Apple ID to create the new account, turn iCloud data syncing preferences and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Finally, if you have merged data in the two accounts that you want to separate you will have to go to icloud.com from your computer, sign into each iCloud account separately and manually delete the data you don't want from each account.

  • Can you share photos between machines that use the same wifi network? Thanks for your help.

    Can you share photos on i-photo between machines that use the same network or even between different accounts on the same machine? I know you can share music on i-tunes but can you do the same on i-photo? Thanks for your help.

    Yes.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    You can figure out using it with another machine from that too

  • Somehow my application icon in the dock has disappeared and I have no idea where it went or how to get it back. I am not all that computer knowledgeable. Thanks for your help.

    Somehow my application icon in the dock has disappeared. I have no idea where it went but it contains all my applications that i use. How do I get the application icon to return  to the dock. Thanks for your help. I am not computer literate by any means. Thanks

    Goto your application folder, find your app then drag/drop it back to the dock.

  • I have no longer got the contacts symbol.  when for instance I want to send a mail....thanks for your help been

    Hello,
    I had to re-initialized my iTouch (ios5.0.1) and since then I have no longer got the contacts symbol. However my contacts are still there when I want to send a email for instance, but I can't add any like before when this app was in.
    Thanks for your help
    Bruno

    Sorry, but I don't know of any other way.  Perhaps you can leave feedback to Apple on this.
    http://www.apple.com/feedback/ipodtouch.html
    B-rock

  • HT201304 I have forgotten my "restrictions code" passcode. How can I get a new passcode? Thanks for your help. Paul

    I have forgotten my "restrictions code" passcode. How can I get a new passcode? Thanks for your help. Paul

    If You Are Locked Out Or Have Forgotten Your Passcode
    iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    iOS- Understanding passcodes
    A Complete Guide to Recover Your iDevice if You Forget Your Passcode
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    Try restoring the iOS device if backing up and erasing all content and settings doesn't resolve the issue. Using iTunes to restore iOS devices is part of standard isolation troubleshooting. Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition.
    Before restoring your iOS device, Apple recommends that you either sync with iTunes to transfer any purchases you have made, or back up new data (data acquired after your last sync). If you have movie rentals on the device, see iTunes Store movie rental usage rights in the United States before restoring.
    Follow these steps to restore your device:
         1. Verify that you are using the latest version of iTunes before attempting to update.
         2. Connect your device to your computer.
         3. Select your iPhone, iPad, or iPod touch when it appears in iTunes under Devices.
         4. Select the Summary tab.
         5. Select the Restore option.
         6. When prompted to back up your settings before restoring, select the Back Up
             option (see in the image below). If you have just backed up the device, it is not
             necessary to create another.
         7. Select the Restore option when iTunes prompts you (as long as you've backed up,
             you should not have to worry about restoring your iOS device).
         8. When the restore process has completed, the device restarts and displays the Apple
             logo while starting up:
               After a restore, the iOS device displays the "Connect to iTunes" screen. For updating
              to iOS 5 or later, follow the steps in the iOS Setup Assistant. For earlier versions of
              iOS, keep your device connected until the "Connect to iTunes" screen goes away or
              you see "iPhone is activated."
         9. The final step is to restore your device from a previous backup.
    If you can not restore your device then you will need to go to recovery mode.
    Placing your device into recovery mode:
    Follow these steps to place your iOS device into recovery mode. If your iOS device is already in recovery mode, you can proceed immediately to step 6.
         1. Disconnect the USB cable from the iPhone, iPad, or iPod touch, but leave the other end
             of the cable connected to your computer's USB port.
         2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the
             red slider appears, then slide the slider. Wait for the device to turn off.
              If you cannot turn off the device using the slider, press and hold the Sleep/Wake
              and Home buttons at the same time. When the device turns off, release the Sleep/Wake
              and Home buttons.
         3. While pressing and holding the Home button, reconnect the USB cable to the device.
             The device should turn on. Note: If you see the screen pictured below, let the device
             charge for at least ten minutes to ensure that the battery has some charge, and then
             start with step 2 again.
         4. Continue holding the Home button until you see the "Connect to iTunes" screen.
             When this screen appears you can release the Home button.
         5. If necessary, open iTunes. You should see the following "recovery mode" alert:
         6. Use iTunes to restore the device.
    If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    Additional Information:
    Note: When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. See this article for more information.

  • What is the best way to turn line art into a 3D image in Illustrator? Thanks for your help.

    What is the best way to turn line art into a 3D image in Illustrator? Thanks for your help.

    What version of Illustrator? What do you mean by "Line Art"? What do you mean by "3d image"? Post images showing your starting artwork and an example of what you are trying to achieve.
    If you have Illustrator 12 or higher you can extrude or lathe a simple group or path using Effects > 3D > [Pick one]. You must start with vector data, not a placed raster image. You are very limited in what you can do, and you cannot model multiple objects within one 3D world. Each object you extrude/revolve/rotate is its own world, with its own perspective and camera. You can also make any art into a Symbol, then map that symbol onto any 3D surface you create. The results are, at best, acceptable, and often total garbage.

  • Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.

    Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.
    when you copy n paste into a new table, all the cell sizes are changed.
    is there a way to put in a new table from your templates into an existing file, different to the standard very basic ones in insert table.
    I look forward to your answers.  Your help is very much appreciated.
    Also how do you search for question answers already written in this support area please.

    Hi Jason,
    In Numbers 3, you can select a whole table by clicking once in the table to make it active, then click once on the "bull's eye" at the top left.
    Now copy and paste. All formatting (and any cell content) is pasted intact. In Numbers 2.3 (Numbers '09) it is a little different for selecting a whole table. But I won't go into that unless you are using Numbers '09. Please reply.
    I don't like the look of the tables in Insert Table. I keep custom tables in My Templates. I have set Numbers > Preferences > General > For New Documents > Use template: (name of my favourite custom template)
    That opens when I launch Numbers, or ask for a new document (command n). Note that if you follow this preference setting, then Menu > File > New From Template Chooser (for another template) requires you to hold down the option key in that menu.
    Regards,
    Ian.
    Message was edited by: Yellowbox. All formatting (and any cell content) is pasted intact.

  • I need to delete files from my iMac hard drive, but not from my other devices (that are sync. to iCloud). How do I do this?? My Mac is a 24-inch Mid 2007 running on Mountain Lion. Thanks for your help.

    I have recently recieved messages indicating that my start up disc is almost full. Consequently I need to remove some files from my hard drive. I've backed up my hard drive onto a NAS system & onto an external harddrive. The problem now, is that whenever I try to delete a file, a message comes up saying that if I remove this file from my hard disc it will remove it from all my other devices that are syn. to it. How do I remove a file (movies) from my iMac but not from other devices.
    Thanks for your help
    Robert

    You're right - this question has nothing to do with iSync!
    You're best bet would be to buy yourself an external Firewire or USB 2.0 hard-disk. There's no way you'll get 150gb onto an 80gb drive - certainly not in an instantly accessible way.
    Your new Mac would've had the Migration Assistant appear during the initial OS install. This allows you to connect your new and old Mac together via a Firewire cable and automatically transfer your important files from old Mac to new.
    Once you've all the files off your old Mac, re-format it and re-install the OS that came with it. If you boot up the Mac from the OS install DVD, there is an option to re-format the HD and install the OS.
    See this Apple support page:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1103.html

  • In mail, my attachments, both photos and documents appear in the body of the message.  How can I get my attachments to appear as a separate attachment and not as part of the message.  Thanks for your help, Karen.

    In mail, my attachments, both photos and documents, appear in the body of the message.  How can I get my attachments to appear as a separate attachment and not as part of the main message????  Thanks for your help, Karen.

    softwater wrote:
    ...and costs $14.99
    Yep! And if you absolutely need (or think you need) that functionality, it is worth every penny.
    As Don already pointed out, exactly what the recipient sees will depend on how they've set up their machine and what unnecessary 3rd party apps they might've installed to display attachments the way they want.
    In theory, that is true. In practice, Attachment Tamer will cause more of your messages to show up as plain-jane icons on the other end. The problem is, after all, people running Outlook 2003 and 2007. These people likely aren't doing many system modifications.
    If I were you, I'd use the free solutions provided above, save my money and let my recipients decide how they will handle their mail.
    I completely agree.

  • How do I capture tape-based media to my external hard drive?  There is only one firewire 800 port on the back of my I mac.  The manual says to import tape footage directly into fcpx, but then I lose my external hard drive.   thanks for your help.

    In FCP X How do I capture tape-based media (hdv clips)- which I want to import-to my external hard drive?  There is only one firewire 800 port on the back of my I mac.  The FCPX manual says to import tape footage directly into final cut, which works, but then I lose  my external hard drive    Do I  have to import it into an event, then copy it over to an external hard drive?  On Larry Jordan's tutorial, he has 3 external hard drives that show up on his monitor WHILE he imports his tape based media.  How is that done?  I can only get either the camera to appear OR my external hard drive.   thanks for your help.

    Thanks for your response, but that doesn't solve the problem.  Yes, the LaCie hard drive has 2 firewire ports-
    I have always done what you suggest (works fine in FCP7), but in FCPX when I do that the camcorder icon
    does not appear.  It only shows up when I DIRECTLY import the footage via firewire.  ????

  • Hi, I have an iPhone 1 that is blocked (because of wrong passwords) and isn't recognized by iTunes. How do I fix this? Thanks for your help!

    Hi, I have an iPhone 1 that is blocked (because of wrong passwords) and isn't recognized by iTunes. How do I fix this? Thanks for your help!
    By the way I'm using a MacMini and all operating systems are up to date including iTunes.

    First try a Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least Ten seconds... (But can take Longer)... until the Apple logo appears. Release the Buttons
    If no joy... Try a Restore...
    1: Connect the device to Your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    Restoring  >  http://support.apple.com/kb/HT1414
    3: If the device doesn't appear in iTunes, try using the Steps in this article to force the device into Recovery Mode.
    Make sure you have the Latest Version of iTunes (v11.1.5) Installed on your computer
    iTunes free download from www.itunes.com/download

Maybe you are looking for

  • What is the newest OS X compatible with my older imac

    hello and thanks for reading this is my first MAC I have imac a1225 with a intel 2.8ghz Core 2 Duo cpu and 4gig of ram running OS X 10.6.8 and was wondering what is newest mac osx version that this computer is capable of running? thanks in advance fo

  • My employer acquired a Compaq Presario C500 Notebook

    My employer acquired a Compaq Presario C500 Notebook, PN: RQ337UA that is out of warranty.  The hard drive has been damaged beyond repair and was not returned with the laptop.  I need to purchase a hard drive & OS. How can I find out what drivers i n

  • How to change the color of JTextField

    how can i change the color of JTextField

  • Program halts on build path, path/file not created.

    I have a small vi that reads from a file on the root drive.  If the file is not there, it creates it.  First off, the vi is halting at build path icon.  This icon is flashing for some reason, but no warning is given.  It's as if there is a break poin

  • Developer 6i Patch 17 for Windows; WHEN???

    When will this Patch be released? We are at a critical stage of development and all our other environments (HP-UX, Linux) can be patched to 17 (which is the terminal patch). We need to know ASAP what the timeframe is for this