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 database schema and contents

Re: Export database schema and contents

From: <vdolt_at_my-deja.com>
Date: Mon, 09 Oct 2000 13:22:58 GMT
Message-ID: <8rsgrc$sn6$1@nnrp1.deja.com>

There are many tools that extract SQL from your schema (I am using DBArtisan by Embarcadero). I am sure you can download one of the web. If not, here is the tricky way to do that. You export schema out (set parameter ROWS=N). Then you create new database with a small tablespace (something like 1K). Import with a parameter IGNORE=Y and LOG=log.dat, all your object create statements will fail and they will be printed in the log file.
Again, it is much easier to use some kind of tool that does it for you.

In article <39E0BE38.81C6A5CF_at_knuut.de>,   "Dipl.-Informatiker Khamis Abuelkomboz" <khamis_at_knuut.de> wrote:
> How can I export my database in sql statements, so that I can
> create/load
> the same schema and contents on a different database, the result
 should
> be
> something like
>
> CREATE TABLE Animal (
> ID NUMBER(6) PRIMARY KEY,
> name VARCHAR2(20) UNIQUE,
> legs NUMBER(3),
> insertionDate DATE);
>
> CREATE SEQUENCE AnimalIDs;
>
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'cow', 4, SYSDATE);
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'tiger', 4, SYSDATE);
> INSERT INTO Animal VALUES(AnimalIDS.NEXTVAL, 'spider', 8, SYSDATE);
> COMMIT;
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 09 2000 - 08:22:58 CDT

Original text of this message

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