Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Export "exp" File Format????

Re: Export "exp" File Format????

From: <derwin_at_my-dejanews.com>
Date: Tue, 26 Jan 1999 18:52:44 GMT
Message-ID: <78l2to$8bh$1@nnrp1.dejanews.com>


In article <36AAAA3A.273B_at_bhp.com.au>,
  Connor McDonald <mcdonald.connor.cs_at_bhp.com.au> wrote:
> steve_mundie_at_my-dejanews.com wrote:
> >
> > I must be missing something here... You'll get most of the required
> > information by using the show=y option of import with a redirection to a
> > file.
> >
> > After that it's only making sure you extract the relevant information in the
> > groups you want rather than trying to hack through the exportfile itself.
> >
> > SteveM
> >
> > In article <36A8140C.783_at_bhp.com.au>,
> > Connor McDonald <mcdonald.connor.cs_at_bhp.com.au> wrote:
> > > D.F.S. wrote:
> > > >
> > > > I am trying to parse the output of Oracle Export File.
> > > >
> > > > The intent is to be able to take a full database export and
> > > > pull out all the DDL statements and group them in individual
> > > > files by tables or users for stuff like Grants and creates and such.
> > > > Ok so it is not ALL DDL, you get the idea.
> > > >
> > > > The idea is to have a directory structure and format that would make it
> > > > easy to go find the create statement for table XYX in Schema 123 easily.
> > > >
> > > > This makes dropping indexes and constraints easy to allow massive
> > > > loads and the added speed of creating the indexes in an unrecoverable
> > > > step in one fell swoop after loads. It makes life easier.
> > > >
> > > > The old approach was to go get this info from the System data
> > > > dictionary.
> > > > I'm sick of rewriting that code every time oracle upgrades or
> > > > changes something.
> > > >
> > > > Hence the idea of simply digging everything out of Export Files.
> > > > EVERYTHING needed to build or reconfigure any user, constraint
> > > > or trigger should be there, right!?
> > > >
> > > > The problem comes with the fact Oracle Export Files contain
> > > > wierd Characters.
> > > > I have not seen the pattern of Why they are there or what they may
> > > > mean, but they are not a fluke, they exist in at least 2 versions
> > > > or oracle on at least 3 different platforms.
> > > >
> > > > Take the first few lines for example, there is a rash of them around
> > > > the date before the begin statement.
> > > > That I would ignore, the main issue comes with the fact there are a LOT
of
> > > > them in and around SQL code for triggers.
> > > >
> > > > Does anyone know what they mean, or if I can just strip them with
> > > > impunity?
> > > >
> > > > Does anyone have any documentation of the structure of the export file?
> > > >
> > > > It looked pretty straight-forward until I hit this issue.
> > > >
> > > > Marc
> > >
> > > If you are on Unix, run an export with rows=n and then use the "strings"
> > > command - you get pretty much everything you want.
> > > --
> > > ==============================================
> > > Connor McDonald
> > > BHP Information Technology
> > > Perth, Western Australia
> > > "The difference between me and a madman is that I am not mad"
> > > - Salvador Dali
> > >
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

>

> On our platform (Solaris, 7.3.3) performing export show=y gives a file
> with line breaks at (somewhere about) the 80 char mark. Thus keywords
> etc etc get broken over multiple lines and this much of the SQL you end
> up with unusable (unless you write further scripts to rejoin the
> lines)...
>

> Using strings, each DDL command comes out as a single line which makes
> life easier...

>

Don't forget about the imp indexfile=<somefilename> option that basically does all this for you.

Daryl

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Jan 26 1999 - 12:52:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US