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: Exporting structure

Re: Exporting structure

From: Martin Haltmayer <Martin_Haltmayer_at_KirchGruppe.de>
Date: 1997/10/31
Message-ID: <3459A180.BDEC4830@KirchGruppe.de>#1/1

Do

exp userid=test/test file=struct.dmp rows=n imp userid=test/test file=struct.dmp indexfile=struct.sql

This will give you an editable file. By the way, the indexfile parameter is documented. It will generate a file struct.sql containing remark lines for generating the tables and unremarked commands to generate indexes.

I wrote a small C program to substitute one string within an export file by another. You cannot just edit it by several reasons:

  1. It is a binary file. Your editor may break the lines or the characters or both.
  2. It may contain very long lines.
  3. The first three characters of this file are invisible for most editors. Do a od -cx dumpfile on a Unix box and you will see these three characters which most editors won't recognise. They contain e. g. information about the NLS_CHARACTERSET that was used for export.

Martin Haltmayer

Steve wrote:
>
> We need to export a user's schema, structure only, make sizing changes
> then import this in another instance. I know that the file in which
> export puts out is a binary file and you're not suppose to edit it.
> Is there a problem if I take what it exports modify it and clean it up
> and then instead of using import just execute it as a SQL script or is
> this a bad idea?
>
> Will I be missing any constraints/indexes etc?
>
> I talked with someone during Oracle Openworld in the Campground area and
> they said that there was an undocumented ascii export option. When I
> got back I called Oracle Support and they never heard of it.
>
> I'd appreciate any help or suggestions.
>
> Thanks in advance.
>
> Steve
Received on Fri Oct 31 1997 - 00:00:00 CST

Original text of this message

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