!! Please do not post Off Topic to this List !!
Sorry, but imp indexfile, don't produce an output of
the procedures, packages or every piece of code of the
database.
Regards.
- "Aponte, Tony" <AponteT_at_hsn.net> wrote:
> I've used this script to process the indexfile
> produced by imp.
>
> ##
>
########################################################################
> #####
> ##
> ## Autor: Martin Zahn Akadia AG
> ##
> ## Purpose: Generieren der CREATE TABLE
> Statements aus Export
> ##
> ## Environment: Shell Script
> ##
> ##
>
########################################################################
> #####
> #
> # create_table_from_indexfile
> #
> # 1). Export erstellen:
> # exp system/manager file=dbfull.dmp full=y
> compress=y grants=y
> indexes=y
> # 2). Indexfile erstellen:
> # imp system/osiris file=dbfull.dmp
> indexfile=file.sql
> # 3). Dieses Script starten:
> # create_table_from_indexfile file.sql
> # 4). Generiertes File create_tables.sql editieren
> # (Passwoerter, Storage-Parameter,
> Default-Tablespace)
> # 5). Datenbank neu generieren:
> # 6). User der Tables in Datenbank eroeffnen
> (create_user.sql)
> # 7). Tables vorkreieren:
> # sqlplus system/manager
> # @create_table
> # 8). Import der Datenbank (Ohne Indexe !!)
> # imp system/manager full=y ignore=y
> file=dbfull.dmp grants=y
> indexes=n
> # 9). Indexe aus Indexfile erstellen.
> #
> # sed commandos:
> #
> # "/^REM/!d" Loesche alle Zeilen die nicht
> ein 'REM' am Anfang
> # der Zeile haben
> # "s/^REM //" Loesche String 'REM '
> # "s/^User/CONNECT/" Ersetze 'User' durch 'CONNECT'
> # "/rows/d" Loesche alle Zeilen mit 'rows'
> # "/;/a\\ Fuege nach jedem ';' ein
> 'DISCONNECT;' ein
> # DISCONNECT;"\
> # "/CONNECT.*/s//&;/" Fuege ein ';' an jede Zeile
> die 'CONNECT' enthaelt
> # am Ende der Zeile an: CONNECT
> SYSTEM --> CONNECT
> SYSTEM;
> #
> #
>
########################################################################
> #####
> echo " "
> echo "Edit Output-File 'create_tables.sql' with
> Passwords for Users:"
> echo " "
> grep "User" $1 | uniq | sed -e "s/^REM //"
> echo " "
> sed -e "/^REM/!d"\
> -e "s/^REM //"\
> -e "s/^User/CONNECT/"\
> -e "/rows/d"\
> -e "/;/a\\
> DISCONNECT;"\
> -e "/CONNECT.*/s//&;/" $1 > create_tables.sql
> echo "Output-File 'create_tables.sql' created"
>
> -----Original Message-----
> Sent: Thursday, September 13, 2001 6:05 AM
> To: Multiple recipients of list ORACLE-L
>
>
> !! Please do not post Off Topic to this List
> !!imp...... show=y rows=n
> log=<script.sql>. And then
> working with awk over the file <script.sql>.
>
> Regards.
>
>
> --- Ketan Patel <ketanfororacle_at_yahoo.com> wrote:
> > !! Please do not post Off Topic to this List !!Hi
> > list,
> > Is there any utility provided by oracle through we
> > can extract only
> > table definitions , procedures .... in another
> > file?
> >
> > -Ketan
> >
> >
>
> > Do You Yahoo!?
> > Get your free @yahoo.com address at
> > http://mail.yahoo.com
> >
> > --
> > Please see the official ORACLE-L FAQ:
> > http://www.orafaq.com
> > --
> > Author: Ketan Patel
> > INET: ketanfororacle_at_yahoo.com
> >
> > Fat City Network Services -- (858) 538-5051
> FAX:
> > (858) 538-5051
> > San Diego, California -- Public Internet
> > access / Mailing Lists
> >
>
> > To REMOVE yourself from this mailing list, send an
> > E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of
> > 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> > ORACLE-L
> > (or the name of mailing list you want to be
> removed
> > from). You may
> > also send the HELP command for other information
> > (like subscribing).
>
>
> =====
> Eng. Christian Trassens
> Senior DBA
> Systems Engineer
> ctrassens_at_yahoo.com
> ctrassens_at_hotmail.com
> Phone : 541149816062
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
>
http://dailynews.yahoo.com/fc/US/Emergency_Information/
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author: Christian Trassens
> INET: ctrassens_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
>
Eng. Christian Trassens
Senior DBA
Systems Engineer
ctrassens_at_yahoo.com
ctrassens_at_hotmail.com
Phone : 541149816062
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Christian Trassens
INET: ctrassens_at_yahoo.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Thu Sep 13 2001 - 14:35:04 CDT