Re: list table names in a export dump file (9i)

  • From: Roger Xu <wellmetus@xxxxxxxxx>
  • To: David Fitzjarrell <oratune@xxxxxxxxx>
  • Date: Tue, 1 Dec 2009 16:47:43 -0600

Yes, that gets what I want.

imp / file=/tmp/foo.dmp full=y show=y 2>&1 |
grep "CREATE TABLE" | awk '{print $3}' | sed 's/\"//g'
So there is no "table_exists_action=truncate" or smiliar option like what
10g data pump has?
On Tue, Dec 1, 2009 at 4:26 PM, David Fitzjarrell <oratune@xxxxxxxxx> wrote:

>  The error text is pretty clear: you've not specified how the import is to
> proceed and that is necessary even if all you do is show the commands imp
> will execute.  If you modify your command slightly to
>
> $ imp / file=/tmp/foo.dmp full=y show=y
>
> you'll get what you want, I believe.
>
>
>  ------------------------------
> *From:* Roger Xu <wellmetus@xxxxxxxxx>
> *To:* oracle-l@xxxxxxxxxxxxx
> *Sent:* Tue, December 1, 2009 5:17:04 PM
> *Subject:* list table names in a export dump file (9i)
>
> Hi List,
>
> A cron job in the production database runs the following to export a list
> of tables every day.
>
> exp user/password file=/export/foo.dmp parfile=/oracle/interface/tablelist
>
> I am supposed to ftp foo.dmp and import it in the training database but the
> table list is dynamic, meaning each day we have different sets of tables.
>
> How do I use the imp with show=y just to list the schema.tablenames in the
> export file?
>
> The idea is to truncate each table then use imp with ignore=y to import
> into the training database.
>
> Thanks,
>
> Roger Xu
>
> $ imp / file=/tmp/foo.dmp show=y
> Import: Release 9.2.0.8.0 - Production on Tue Dec 1 14:26:05 2009
> Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
> Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit
> Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.8.0 - Production
> Export file created by EXPORT:V09.02.00 via conventional path
> import done in US7ASCII character set and AL16UTF16 NCHAR character set
> IMP-00031: Must specify FULL=Y or provide FROMUSER/TOUSER or TABLES
> arguments
> IMP-00000: Import terminated unsuccessfully
> $
>
>

Other related posts: