Home » RDBMS Server » Server Utilities » Copy tables procedure
Copy tables procedure [message #71136] Thu, 12 September 2002 23:22 Go to next message
Barry Dogger
Messages: 4
Registered: September 2002
Junior Member
I am running a datawarehouse database and a production database. Furthermore, I have a table called XXWB_TABLES that contains the tablenames from the producton database that I wish to copy to the dwhs db.

I am trying to create a procedure that does the following:

1. For every tablename stored in XXWB_TABLES, check if the table exists in the dwhs db. If not, create it.
This step I already completed.

2. Next, for every table in XXWB_TABLES, compare the table in the production db with the table in the dwhs db and make an exact replica of the producton database
(in other words, delete all entries in dwhs that are no longer in the production, update all changed records and insert all new records).

I can not get the second part to work. Any help would be appreciated.

Thnx in advance.

Barry Dogger
Re: Copy tables procedure [message #71138 is a reply to message #71136] Fri, 13 September 2002 03:22 Go to previous messageGo to next message
K.K. Raj kumar
Messages: 33
Registered: July 2002
Member
Use Snapshots or Materialized Views for this purpose.
Re: Copy tables procedure [message #71148 is a reply to message #71136] Mon, 16 September 2002 00:38 Go to previous message
Barry Dogger
Messages: 4
Registered: September 2002
Junior Member
Thanks for the tip. I have no clue what a materialized view is, but I'll look it up. I never worked with snapsots either, so I'll look into that as well.
Previous Topic: Re: ORA-12560: TNS:Protocol adaptor error while running SVRMGRL
Next Topic: Re: Oracle problem
Goto Forum:
  


Current Time: Sat May 04 07:43:05 CDT 2024