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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Editing dump file before Import??

Re: Editing dump file before Import??

From: Geoffrey Bray <gbray1_at_my-deja.com>
Date: 2000/07/12
Message-ID: <8kif62$v5k$1@nnrp1.deja.com>#1/1

Sybrand seems a little overboard to me. Sure, editing the .dmp file isn't really supported or encouraged but so what? We've got work to do and sometimes you take shortcuts. Now would I recommend that you edit production dmp files on a regular basis? Heck no. Can you do it periodically and mostly on files for test and QA? You betcha. I do it on a reasonably regular basis ... but typically just changing tablespace names, schema names, etc. The couple of hex editors I've used don't allow you to add characters so typically the editing I have done is fairly small and I work around issues to make sure that the tablespace name is the same size or smaller than the one in the dmp file. I'm betting that the file is setup in some kind of record format so you want to be careful about crossing the "boundaries" in the dmp file.

You can use the imp as suggested below or you can even do a strings on the file and use various UNIX commands to split out the segments you need if you're just looking for ddl.

HTH,
Geoffrey

In article <963380571.25509.0.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>
> "Robert Wagner" <RobertWagner_at_alum.mit.edu> wrote in message
> news:ahMa5.17934$9E6.102645_at_newsr1.maine.rr.com...
> > I've been trying to edit the .DMP file created by an EXP80, in order
 to
> > change things like the tablespaces for tables and indexes. But when
 I try
 to
> > use the edited file in an import, I get "IMP-00038: Could not
 convert to
> > environment character set's handle."
> >
> > Is there a CRC check on the file, or something else which makes this
 kind
 of
> > operation impossible?
> >
> > Or could it just be a typo in making the changes?
> >
> > TIA >>>> Robert
> >
> >
> >
> >
> A dump file is *NOT* an ASCII file.
> You should *NEVER EVER!!* edit the dump file. If you want to change
 create
> tablespace statements, use the following procedure:
> run imp with the following parameters
> show=y full=y log=<anyfilename>
> In <anyfilename> you will find a dump of *all* commands including the
 create
> tablespace statements. You could easily edit that file, pull the
 statements
> out and change them.
> If you want to change tablespaces for tables, make sure
> the default tablespace of the destination user has been changed, the
 user
> doesn't have unlimited tablespace privilege, and has quota on the new
> tablespace only.
> For changing index tablespaces, run imp with the indexfile=<filename>
 and
> you will get all create index statements in that filename.
> Please do *NOT* start hacking a dmp file, it's not going to work, and
 it is
> not supported.
>
> Regards,
>
> Sybrand Bakker, Oracle DBA
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jul 12 2000 - 00:00:00 CDT

Original text of this message

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