Link to home
Start Free TrialLog in
Avatar of Jblue R
Jblue R

asked on

DataPump question. Oracle 12c-- one or two processes?

I need to refresh a schema using a source and target schemas in the same database.  

Using a parameter file. I know there is one process that requires both an export and an import in separate processes, but cannot remember if that is when you are using only one database, or using two databases with a  db link.  In this case, I am using just one database for both the source and target.  Do I need an export process then an import process, or can data pump get it done with the one import as shown?

I bring metadata only due to restrictions I have to place, and I generally just generate inserts after the import completes.

Thank you..
# impdp parfile = K:\dpump\impdp_ch1_to_sch2.par

userid = USER@db1
schemas = sch1
remap_schema=sch1:sch2
content = metadata_only
directory = db1_dump_dir

exclude = grant

any and all pointers and suggestions are appreciated..
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jblue R
Jblue R

ASKER

Thank you for your reply...;.

without the self referencing link would I need to two separate processes?
It depends on how you define "process".  Without a link you need two steps: one to export, one to import.

Datapump has PL/SQL APIs so you could create a single pl/sql block or stored procedure that performs both steps.  So that is more or less a single "process" that performs multiple steps.

If you use the command line binaries, then it is two "processes".
Avatar of Jblue R

ASKER

Thank you for your response!!

The self link got it done, and got it done in a hurry.. Fastest refresh in my known universe.. Deeply appreciated..
Without using the self referencing database link, you can do it without creating an export file.  You would use a named pipe.  As it seems you are working with Windows, I'll point you to a Microsoft article.  I've never done it in Windows.  It is certainly really easy to do in a UNIX environment.

Then the expdp and impdp processes use the named pipe as the file they are working on.  One writes to it while one is reading from it.  Basically looks like a buffer.