Generate tables script

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
Nadia Teles
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Mon, 19 Jun 2006 11:57 am
Location: São Caetano do Sul

Good afternoon staff,

I created the bank, the tables, sequences and primary keys through Enterprise Manager. How do I generate a script for all this? For, I will install on another Oracle server.

Thanks

Nádia
gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Hi Nadia!

Good source is this link http://www.quest-pipelines.com/newsletter-v7/0406_A.htm

a concrete example:

Select all

 
set pagesize 0 
 
 set long 90000 
 
 set feedback off 
 
 set echo off  
 spool scott_schema.sql  
 connect scott/tiger; 
 SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) 
     FROM USER_TABLES u; 
 SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) 
     FROM USER_INDEXES u; 
 spool off; 
Gilberto
erthal
Rank: Analista Sênior
Rank: Analista Sênior
Posts: 130
Joined: Mon, 22 Nov 2004 1:45 pm
Location: Niterói - RJ
Gustavo Erthal Jr. | TRISCAL
...................................................
Rio de Janeiro | (21) 2507-2010
São Paulo | (11) 3167-0526
www.triscal.com.br

Nadia,

or else you can make use of a freeware called dbdesigner4, from Fabforce, that you find in superdownloads.

He does a "perverse" engineering than you want, from the bank, of a specific schema and so on.

[] 's
ARF
Rank: Programador Pleno
Rank: Programador Pleno
Posts: 41
Joined: Thu, 03 Aug 2006 9:30 am
Location: Criciúma - SC

Oracle SQL Developer (Oracle Free Tool) shows the DDLs of the objects.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 1 guest