Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 19th, 2004, 09:47 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Thumbs up How to develope a database-replication program?

How to develope a database-replication program basing database-log?I will switch one database(oracle)'s table to another database(oracle)..En,it like import action..Or somebody can give me a light for figure me out this dark world? Just like a tutorial?!THX very much!
__________________
Being a Code Headman !

Reply With Quote
  #2  
Old April 20th, 2004, 03:02 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 51 m 39 sec
Reputation Power: 279
Do you want to bring a table from one Db to another? Just export and import it.
Or do you want to keep an updated copy of the original table in the second db? In this case set up a dblink and create a materialized view with "refresh fast on commit".

Reply With Quote
  #3  
Old April 20th, 2004, 04:59 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Thumbs up

Quote:
Originally Posted by pabloj
Do you want to bring a table from one Db to another? Just export and import it.
Or do you want to keep an updated copy of the original table in the second db? In this case set up a dblink and create a materialized view with "refresh fast on commit".

Hi,Pabloj!THX for your useful help..But u can give me help about how to notify the change happened in original db?I think i should replication the databases acooding the change happened condition..

Reply With Quote
  #4  
Old April 20th, 2004, 05:19 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 51 m 39 sec
Reputation Power: 279
Replicating a whole db is one thing, but if you need to update only a table, then
Quote:
set up a dblink and create a materialized view with "refresh fast on commit"

Reply With Quote
  #5  
Old April 20th, 2004, 10:21 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Thumbs up

Quote:
Originally Posted by pabloj
Replicating a whole db is one thing, but if you need to update only a table, then

Well,my meaning is how to get content change from a table?I will watch only a table..Can u suggest me to use trigger to get the notify when the row content had been changed by somebody?

Reply With Quote
  #6  
Old April 20th, 2004, 10:24 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
By the way,can u tell me how to read the information in the transaction log in oracle?..THX again!..Any help is great to me!

Reply With Quote
  #7  
Old April 21st, 2004, 12:30 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
We should develope a db replication program with a common language like "java"..I will do it,and make it run in anywhere..hehe!...Anyone can join me?If u want,u can contract me:
mail:developer@mail.nytdcq.net
msn:great_liudan@hotmail.com

Reply With Quote
  #8  
Old April 21st, 2004, 02:42 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 51 m 39 sec
Reputation Power: 279
cleverpig, I got the fact that you need to
Quote:
watch only a table
but the fact is that I told you how to do it two times
Quote:
set up a dblink and create a materialized view with "refresh fast on commit"
. Please don't be dumb and look on Oracle's technet or Google for that!!

Reply With Quote
  #9  
Old April 21st, 2004, 04:15 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
THX!I'm a db beginner...Can u help me by telling me how to create a materialized view with "refresh fast on commit"?..I haven't hear it ago.

Reply With Quote
  #10  
Old April 21st, 2004, 05:44 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 51 m 39 sec
Reputation Power: 279
Quote:
Please don't be dumb and look on Oracle's technet or Google for that!!

Believe me, it's not difficult, just open your favourite browser and type "www.google.com", then in the search box type "create materialized view oracle" and submit query, the first result listed is:
Quote:
Materialized Views in Oracle - [ Translate this page ]
... April 18, 2003 Materialized Views in Oracle By Ajay ... A materialized view is a database
object that contains the ... remotely, or are used to create summary tables ...
http://www.databasejournal.com/feat...cle.php/2192071 - 38k - 19 apr 2004 -

Not that difficult ...

Reply With Quote
  #11  
Old April 21st, 2004, 08:06 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Thumbs up

Quote:
Originally Posted by pabloj
Believe me, it's not difficult, just open your favourite browser and type "www.google.com", then in the search box type "create materialized view oracle" and submit query, the first result listed is:

Not that difficult ...

THX for your help..I have looked it on google. .And i found its specials:
A materialized view is a database object that contains the results of a query. They are local copies of data located remotely, or are used to create summary tables based on aggregations of a table's data. Materialized views, which store data based on remote tables are also, know as snapshots.

A materialized view can query tables, views, and other materialized views. Collectively these are called master tables (a replication term) or detail tables (a data warehouse term).

For replication purposes, materialized views allow you to maintain copies of remote data on your local node. These copies are read-only. If you want to update the local copies, you have to use the Advanced Replication feature. You can select data from a materialized view as you would from a table or view.

And now i have a problem to ask u:materialized view can monitor the tables in remote db,but it can't tell us which row has been changed by someone and when this row has been changed..I wanna find a way to do it...Trigger is a way to realize it,but each table will be setup a Trigger which monitors its changing..So i have a idea it is not easy that monitor the database's transaction log to find its change,and view where had been changed...
U have helped me and give me advice some many times..I think i will give u a metal for your Selflessness..hehe!Plz do it again!I like this forum and discuss!

Reply With Quote
  #12  
Old April 22nd, 2004, 07:54 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 51 m 39 sec
Reputation Power: 279
Start here -> http://otn.oracle.com/pub/articles/nanda_fga_pt3.html (or use the trigger trick)

Reply With Quote
  #13  
Old April 22nd, 2004, 08:36 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
It's a nice thread to me!THX for your help!..I have read it and known FGA(Fine-Grained Auditing) method which it runs on the Oracle10i.And then if we use the oracle version is less than 10(like oracle 9i or oracle 8i),we can't capture the select action from user.It's not important to my mine that i only note where had been changed.I think i should use it with oracle..Haha!!It's great thing..

Reply With Quote
  #14  
Old April 22nd, 2004, 08:42 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
And i found this link talked about FGA & some SQL script realized FGA:http://www.securityfocus.com/infocus/1714

Reply With Quote
  #15  
Old April 22nd, 2004, 09:30 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Thumbs up

Hi!pabloj!I have a idea for repliaction db.Can u give me some suggestion?
Maybe it is complicated..Haha!But i hope u can read it entirely!