Using impdp from a dump file without an active Oracle instance

346 Views Asked by At

I have an Oracle dump file (created via expdp), and I want to export it into a DDL file. I understood that for that I need to use the impdp tool with the sqlfile as a parameter. However, it seems to require a running Orcale instance (although I don't want to import it to any DB -- just convert to a DDL).

Is there any way around this?

1

There are 1 best solutions below

1
Littlefoot On

As far as I can tell, data pump won't work without a running database because both expdp and impdp expect USERID as the first parameter.

M:\>impdp help=yes

<snip>

     Format:  impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
     Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

USERID must be the first parameter on the command line.

Moreover, if you just invoke impdp without any parameters, username is the first one you're prompted for:

M:\>impdp

Import: Release 18.0.0.0.0 - Production on Tue Nov 23 11:56:07 2021
Version 18.5.0.0.0

Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved.

Username:

What to do? Use any database you have available. Don't import anything if you don't want to.