Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to exclude a table when export?
Read 'parfile' (oracle speak for Parameter file).
Run:
set pages 0 head off feedback off
spool tables_but.par
select table_name||',' from user_tables;
spool off
Edit the tables_but.par file, add
files=(
at the first line, and:
) at the last line.
Remove the comma from the last mentioned table.
Now, find the line with you table, you don't want, and remove that line.
This will take you less than a minute to create a parfile with all the users
tables,
but for that one big table you don't want.
Oh, yes, run the above sql as owner you want to export (or substitute
user_tables with all_tables where owner='xxx')
You can now export:
exp uid/passwd file=you_tables.dmp log=your_tables_exp.log compress=n
parfile=tables_but.par
Mind you, there is a limit to how many file you can name in a parfile. Split in half if needed.
GC wrote:
> Mike Krolewski wrote:
> >
> > In article <90s5ma$kmg$1_at_nnrp1.deja.com>,
> > susana73_at_hotmail.com wrote:
> > > Hi,
> > >
> > > I am going to export an entire user(tables, indexes, constraints,
> > > grants...). There is a single large table that I don't want to
export.
> > > Is there anyway to get around on the exp command line? I am using exp
> > > user mode and don't want to specify all my 100 tables on the command
> > > line.
> > >
> > > Thanks,
> > > Susan
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > The keyword 'file' allows you to select a table. For 100 tables, the
> > command line could be really long. However, you can build a script file
> > with all the commands plus the 100 files and execute that.
>
> Incorrect. 'file' specifies the export dump file to be created (exp.dat
> is the default).
> The keyword 'tables' allows you to specify which tables to export.
>
> Cheers,
> GC
-- Gtrz, Frank van BortelReceived on Wed Dec 20 2000 - 13:38:20 CST