Question about Dumps in Oracle (REMAP_SCHEMA)

dumporacle

To export a dumpfile, I can:

EXPDP system/Password@TNS 
DUMPFILE=FileName.dmp 
Schemas=TheSchemaIWantToDump 
DIRECTORY=dumpdir

So, let's say I want to restore this DMP file, but with a different name (I'm a SQL Server Dba, and I'm still learning some Oracle). I would do this:

1)create a new user

2)GRANT CONNECT to this user

3)

IMPDP System/Password@TNS 
dumpfile=ThefileName.dmp 
REMAP_SCHEMA=OldUser:NewUser 
directory=dumpdir

My question is about REMAP_SCHEMA.When I'm restoring schemas inside my own server, I know the OldUser , so I can fill it, and then :NewUser.

But if I'm sending this dump file to our client. Should I mention this OldSchema? They don't know the schema's name I'm using before the dump. Because on SQL Server I can RESTORE DATABASE , then name with the name a want FROM DISK….

How can I restore a schema with a different name?

Thanks.

Best Answer

Even if not told, OldUser can be easily found as:

IMPDP System/Password@TNS 
dumpfile=ThefileName.dmp 
directory=dumpdir
sqlfile=ThefileName.sql
include=user

This does not import anything, just creates ThefileName.sql under dumpdir with the SQL statements used for creating OldUser, including the username as well of course. Using that information, they will know what to specify in REMAP_SCHEMA=OldUser:NewUser.