> I have a question and I don't know of any other way to contact you.
> I was wondering if you knew how to dump a schema in oracle 8.  I am but a
> lowly intern looking for enlightenment.  If you could help,I would be greatly
> appreciative.  I promise to praise your name to all that will hear.

Peter,

Thanks for the email and welcome to the world of Oracle. There are a few
ways to dump a schema. For Oracle-only format, you use the Export and
Import Oracle utilities. This will dump the contents of all tables,
clusters, rollback segments, etc. to a binary Oracle-only file. Import
loads it in again. There is tons of documentation about Export/Import in
books and in the included Oracle documentation.

If you want to dump to a flat-file, you can follow the example below:

SQL> DESC employees

LAST_NAME			VARCHAR2(100)
FIRST_NAME			VARCHAR2(30)
DEPARTMENT			NUMBER
SALARY				NUMBER

SQL> SET HEADER OFF
SQL> SET PAGESIZE 0
SQL> SET ECHO OFF
SQL> SET FEEDBACK OFF
SQL> SPOOL employees.txt
SQL> SELECT last_name||chr(9)||first_name||chr(9)||department||salary
     FROM employees;

(table gets spooled here)...

SQL> SPOOL OFF

Now, you have a file "employees.txt" that is filled with the data from
Employees. The || is Oracle's concatenation symbol. CHR(9) is the ASCII
symbol for a TAB. Usually, dumped files separate columns with a TAB.

Hope that this helps!

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 305+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             www.arikaplan.com                                 <->
<->                                                               <->
<->             email: akaplan@interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->

Back to Ari Kaplan's Home Page dex.htm"> Back to Ari Kaplan's Home Page