Discussion Locked

Extract Scripts of a running Oracle DB

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an Oracle 7.3 Database, and i want to extract (generate) the script file of this database, because i want to run it on different machine, are there any case tools that i can use to get the script of my database?

1 reply

by draegor

I got this from the DBA Mailing list. It might help. Note I have not tried it yet.
****************************
An "un-documented" feature of IMPort involves using the tool to generate
table and index create scripts from an export file. The command line syntax is:

imp userid=username/password rows=n indexfile=database.sql

What this will do is create a text file called "database.sql" which will
contain CREATE statements for all TABLES and INDEXES for all resource users
in the whole database. There will be STORAGE parameters as well as the 2
PCTxxxx parameters.

Running the script from SQL*Plus requires some editing on the script, but it
has proven to be an enormous time-saver when plannning recovery procedures.

One may wish to check with tech support to find out the availability of this
functionality, but I believe it works with kernel numbers 6.0.30 and higher.

One need not be the owner of any objects to enter one's username and password
on the command line, butif the EXPort being read was created by a user with
DBA, you may have to read it from a DBA user. This is nothing new.

This discussion is closed to new replies.