Home » RDBMS Server » Server Administration » CDC issue (Oracle 10g)
CDC issue [message #358431] Tue, 11 November 2008 05:02 Go to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I have implemented CDC and made the view perfectly.... and its working. its just a view with lot of thins.... is there any way to directly update a table with the new value?

thanx.
Re: CDC issue [message #358578 is a reply to message #358431] Tue, 11 November 2008 21:48 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I am rewriting the problem....
I have configured Change Data Capture and it works fine. I just want ...it will automatically update a destination schema's table. For example...

I have a table in source "TEST"
I populated a view of changed data namely TEST_VIEW.

Now is it possible to apply those changes to another table like TEST in another schema?
Re: CDC issue [message #358692 is a reply to message #358578] Wed, 12 November 2008 03:16 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Yes, it is possible. Most likely with update statements with correlated subqueries.

One example from that page:

The next example shows the following syntactic constructs of the UPDATE statement:

    * Both forms of the update_set_clause together in a 
      single statement
    * A correlated subquery
    * A where_clause to limit the updated rows

UPDATE employees a 
    SET department_id = 
        (SELECT department_id 
            FROM departments 
            WHERE location_id = '2100'), 
        (salary, commission_pct) = 
        (SELECT 1.1*AVG(salary), 1.5*AVG(commission_pct) 
          FROM employees b 
          WHERE a.department_id = b.department_id) 
    WHERE department_id IN 
        (SELECT department_id 
          FROM departments
          WHERE location_id = 2900 
              OR location_id = 2700); 




Re: CDC issue [message #358719 is a reply to message #358431] Wed, 12 November 2008 05:17 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I dont understand ...what you meant.
Re: CDC issue [message #358739 is a reply to message #358719] Wed, 12 November 2008 06:04 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
You don't know what an update statement is?
Re: CDC issue [message #358896 is a reply to message #358739] Wed, 12 November 2008 21:20 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
But...i am confused whether you know CDC or not?
Re: CDC issue [message #358977 is a reply to message #358896] Thu, 13 November 2008 02:24 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
I know that you can use it to set up subscriber views in target systems, like explained here.

As far as I know, (I could be wrong there since I haven't used it much) it is then up to you do actually do something with those views. Like using them in correlated subqueries to update some other tables in the target system.
Previous Topic: ORACLE UPGRADE
Next Topic: help!ORA-00600: internal error code, arguments: [kcratr1_lostwrt],
Goto Forum:
  


Current Time: Fri Jul 05 11:42:43 CDT 2024