No question at this time
DBA Top 10
1 A. Kavsek 8400
2 B. Vroman 5900
3 M. Cadot 5400
4 P. Wisse 4800
5 T. Boles 3700
6 J. Schnackenberg 2100
7 . Lauri 1500
8 R. Pattyn 700
9 T. P 600
9 J. PĂ©ran 600
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48407
Total active users1518
Act. users last 24h0
Act. users last hour0
Registered user hits last week228
Registered user hits last month1049
Go up

need to import last 2 days updated records
Next thread: query is picking a bad execution plan
Prev thread: JDBC Thin Client

Message Score Author Date
Dear Experts, Is it possible to import last 2 d...... Jill Salalila Nov 21, 2018, 05:00
If you have no update datetime in your tables, n...... Michel Cadot Nov 21, 2018, 07:43
Hi, In addition to what Michel posted, you can ...... Lauri Nov 21, 2018, 09:30
Hello Jill, in addition to Michel's and Lauri's...... Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts Bruno Vroman Nov 21, 2018, 16:10
This might be a interesting experiment to try. As...... Score: 300 PtsScore: 300 PtsScore: 300 PtsScore: 300 PtsScore: 300 Pts Tim Boles Nov 26, 2018, 21:52

Follow up by mail Click here


Subject: need to import last 2 days updated records
Author: Jill Salalila, Philippines
Date: Nov 21, 2018, 05:00, 270 days ago
Os info: rhel 6.5
Oracle info: 11.2.0.4
Message: Dear Experts,

Is it possible to import last 2 days updated records by using datapump ?

For example

On NOV 18th some records were updated.
On NOV 19th some records were updated.

Is it possible to import only affected rows by using datapump ?

Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: need to import last 2 days updated records
Author: Michel Cadot, France
Date: Nov 21, 2018, 07:43, 270 days ago
Message:
If you have no update datetime in your tables, no.

Regards
Michel
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re-need to import last 2 days updated records
Author: Lauri, Netherlands
Date: Nov 21, 2018, 09:30, 270 days ago
Message: Hi,

In addition to what Michel posted, you can use the query parameter to build this filter. See:
https://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#SUTIL925
QUERY option

Kind Regards
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: need to import last 2 days updated records
Author: Bruno Vroman, Belgium
Date: Nov 21, 2018, 16:10, 270 days ago
Score:   Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts
Message: Hello Jill,

in addition to Michel's and Lauri's replies:
and the situation might be more complex than forseen.

Since 2 days some rows might have been modified, but also added (easy case?) or even removed (hmmmm!) so you probably have to take the 3 possibilities (update/insert/delete) into account...

Depending on your requirements you might have to build a complex system (keeping historical data...);

Best regards,

Bruno Vroman.
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: need to import last 2 days updated records
Author: Tim Boles, United States
Date: Nov 26, 2018, 21:52, 265 days ago
Score:   Score: 300 PtsScore: 300 PtsScore: 300 PtsScore: 300 PtsScore: 300 Pts
Message: This might be a interesting experiment to try. As indicated by others the simple direct answer is "no" without the proper pre-setup or specific needs meet. And your request is not totally clear.

You are asking "Is it possible to import last 2 days updated records by using datapump?"

With that question I don't know if you currently have a datapump export file and want to import the rows into a seperate table or into the original table or exactly what you want to do.

So let me give you a scenario and a possible method (untested and just a thought experiment at this time).

If you have a very limited use database and you have flashback enabled and enough UNDO that covers the last several days then you could use data pump to EXPORT a version of the table at a give data time stamp.

dumpfile=expdp.dmp
flashback_time="to_timestamp('18-11-2018 00:00:01', 'DD-MM-YYYY HH24:MI:SS')"
tables=EMP

You could then import that table into your database using the REMAP_TABLE parameter to some new table.

dumpfile=expdp.dmp
REMAP_TABLE=EMP:OLDEMP

You can then create some type of "MINUS" select statement that would show you things that are different in the current table and the previous table.

New or changed rows
select ....... from emp
minus
select ........ from oldemp;

Delete rows and the original rows that changed
select ...... from oldemp
minus
select ...... from emp

You still can not pin point which ones are specifically INSERTED versus CHANGED nor which ones in the second list are "DELETED or have CHANGED"

Even if you do not have flashback enabled you can do something similar if you are a test system and can restore the database from a previous backup ( pre Nov 18) and roll it forward to Nov 18. You can then do the export on that system directly without flashback.

Regards
Tim
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here