Chicharito
Chicharito

Reputation: 1440

Oracle export problem

cmd:
exp bla/bla file=c:\bla.bkp

my bla schema in objects

Table
T_1
T_2
T_3
T_4

Functions
F_1
F_2

Procedure
P_1
P_2

I need all object but not in table ( T_4 ) how to make ?

Upvotes: 0

Views: 192

Answers (2)

Justin Cave
Justin Cave

Reputation: 231661

If you are using the deprecated export utility, you cannot exclude a single object. You would have to specify every table that you wanted in a TABLES clause, i.e.

exp username/password file=c:\bla.dmp tables=(T_1, T_2, T_3)

Obviously, that gets unwieldy rather quickly. You can potentially write a query that generates the tables list for you and then copy & paste from a SQL*Plus window. But that is also rather unwieldy.

Assuming you are using a reasonably new version of Oracle, however, you should be able to use the data pump version of the export and import utilities, expdp. With expdp

expdp username/password dumpfile=c:\bla.dmp exclude=T_4

Upvotes: 2

vickirk
vickirk

Reputation: 4067

You can specify teh tables of interest n the command line, something like

exp bla/bla file=c:\bla.bkp TABLES=(T_1,T_2,T_3)

Ok, that only gets tables, the rest of the stuff you are going to have to use/write something else. Look at the enter code heredbms_metadata.GET_DDL procedure,

Upvotes: 0

Related Questions