Quick generation of an Oracle table schema
Posted in 1999
Topics: Security, Permissions & Auditing
Oracle-ites/Informix-ites,
Ideally this message will be responded to by persons with skill in both
the Oracle and Informix database management arenas. I am of the
Informix ilk myself, so my terms may be IFMX - centric.
I am made to understand that the equivalent of a "dbschema" command in
Oracle does not exist (Oracle - heads - the dbschema command in Informix
generates a SQL script for the creation of one or many database tables
depending on how it is invoked. Basically, you can generate a SQL
script to create the structure of a database with one command).
Does anyone know of utilities out there which generate the CREATE TABLE
statement as well as any other table-specific SQL used to configure a
table in Oracle (i.e. GRANT/REVOKE statements, CREATE INDEX statements,
etc.). I'd love to find a script that simply takes a table name as
input, and spits out a script that will generate all this table specific
stuff.
Please bear in mind that I am new to the Oracle world - if there are
some great Web sites out there with this sort of thing (Oracle Users
Group sites for example), please point me to them and I will find what I
need there.
Thanks for your help.
--
Wesley Gamble
Bison Consulting
(on site at The Men's Wearhouse)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Just download the free version of T.O.A.D. at www.toadsoft.com . Toad is an
acronym for Tool for Oracle Application developers. It will do that for you
and much, much, much more. The only of the disadvantage of the freeware
variant is (and of course it lacks features) you have to download it each
month to renew your license.
Hth,
Sybrand Bakker, Oracle DBA
Wesley Gamble <wgamble@tmw.com> wrote in message
news:7p05m7$7r7$1@nnrp1.deja.com...
> Oracle-ites/Informix-ites,
>
> Ideally this message will be responded to by persons with skill in both
> the Oracle and Informix database management arenas. I am of the
> Informix ilk myself, so my terms may be IFMX - centric.
>
> I am made to understand that the equivalent of a "dbschema" command in
> Oracle does not exist (Oracle - heads - the dbschema command in Informix
> generates a SQL script for the creation of one or many database tables
> depending on how it is invoked. Basically, you can generate a SQL
> script to create the structure of a database with one command).
>
> Does anyone know of utilities out there which generate the CREATE TABLE
> statement as well as any other table-specific SQL used to configure a
> table in Oracle (i.e. GRANT/REVOKE statements, CREATE INDEX statements,
> etc.). I'd love to find a script that simply takes a table name as
> input, and spits out a script that will generate all this table specific
> stuff.
>
> Please bear in mind that I am new to the Oracle world - if there are
> some great Web sites out there with this sort of thing (Oracle Users
> Group sites for example), please point me to them and I will find what I
> need there.
>
> Thanks for your help.
>
> --
> Wesley Gamble
> Bison Consulting
> (on site at The Men's Wearhouse)
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
In comp.databases.oracle.server Wesley Gamble <wgamble@tmw.com> wrote:
hi Wes, well I'm former Informix-er now doing the Oracle thing.
To answer your question ... your best bet is to use 'exp' (export)
program but export do data. This will create what dbschema
produces but in less human readable format. THis works
fine for automated scripting stuff.
If you really want better formatting, maybe try getting the
O'Reilly book "ORacle Scripts" or something like that. There's
a script called 'ddl' that will does the orcl equiv of dbschema.
-Lin
PS: from admin standpoint, Informix is wwwaaayyyy better than oracle IMHO.
> Oracle-ites/Informix-ites,
> Ideally this message will be responded to by persons with skill in both
> the Oracle and Informix database management arenas. I am of the
> Informix ilk myself, so my terms may be IFMX - centric.
> I am made to understand that the equivalent of a "dbschema" command in
> Oracle does not exist (Oracle - heads - the dbschema command in Informix
> generates a SQL script for the creation of one or many database tables
> depending on how it is invoked. Basically, you can generate a SQL
> script to create the structure of a database with one command).
> Does anyone know of utilities out there which generate the CREATE TABLE
> statement as well as any other table-specific SQL used to configure a
> table in Oracle (i.e. GRANT/REVOKE statements, CREATE INDEX statements,
> etc.). I'd love to find a script that simply takes a table name as
> input, and spits out a script that will generate all this table specific
> stuff.
> Please bear in mind that I am new to the Oracle world - if there are
> some great Web sites out there with this sort of thing (Oracle Users
> Group sites for example), please point me to them and I will find what I
> need there.
> Thanks for your help.
> --
> Wesley Gamble
> Bison Consulting
> (on site at The Men's Wearhouse)
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
I have a cheezy awk script that gets the DDL from an oracle exp utility file using oracle imp utility. The script is called ugly_DDL. You could also use "strings" on the export file if you export no data and do some editing. http://www.tc.umn.edu/~hause011 -- --------------------------------------------------------- Steven Hauser email: hause011@tc.umn.edu URL: http://www.tc.umn.edu/~hause011 ---------------------------------------------------------