Impdp overwrite source data

I'm pretty new in Oracle and I need some help. I wanna dump some tables from STAT user to ALLSTAT.

STAT got imp_full_database privelege, ALLSTAT got exp_full_database one, no dba privileges.

I'm testing impdp on my localhost, so NETWORK LINK was created like this:

CREATE DATABASE LINK transport CONNECT TO STAT IDENTIFIED BY STATPASS USING '127.0.0.1:1521/XE';

Than i try in cmd:

impdp ALLSTAT/ALLSTATPASS@XE NETWORK_LINK=transport TABLES=STAT.LOGS CONTENT=ALL TABLE_EXISTS_ACTION=REPLACE;

I got no error messages, but after this script, i got empty LOGS table on STAT user.

In my opinion, during impdp, it trying to import data into table not ALLSTAT.LOGS but STAT.LOGS which are exported.

I can see, edit, drop STAT.* tables even if i logged as ALLSTAT user.

Could you tell me, which way should i go to get ALLSTAT own table LOGS with data from STAT.LOGS?

P.S. Sorry for my English :(

Upvotes: 1

Views: 9637

Answers (2)

Flavio Spedaletti
Flavio Spedaletti

Reputation: 398

impdp command with TABLE_EXISTS_ACTION=REPLACE works for me.

Upvotes: 0

Founded a solution.

impdp ALLSTAT/ALLSTATPASS@XE NETWORK_LINK=transport TABLES=STAT.LOGS CONTENT=ALL TABLE_EXISTS_ACTION=REPLACE REMAP_SCHEMA=STAT:ALLSTAT;

REMAP_SCHEMA=STAT:ALLSTAT is required,

thx to @davegreen100

Upvotes: 2

Related Questions