LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-10-2007, 06:21 AM   #1
mjh
Member
 
Registered: Nov 2007
Posts: 37

Rep: Reputation: 15
export oracle tables as readable sql


Hi everyone

I am working with an Oracle 10 database - and was wondering if there was a way (on the command line / cron job) that I could export all the tables as human readable readable SQL.

I am currently using exp and imp to export and import binary dumps of the database, but would prefere to be able to see what has been exported, this would also be useful for importing the database into another machine/database.

Thanks,
Matt.
 
Old 12-10-2007, 08:09 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
well, you can pass a script of SQL commands to the SQL login prompt can you not?

set SPOOL to a file and select what you want, n'est-ce pas?

I think that's what i used to do.
 
Old 12-10-2007, 09:41 AM   #3
mjh
Member
 
Registered: Nov 2007
Posts: 37

Original Poster
Rep: Reputation: 15
Was hoping there was some amazing program or command I could pass to exp in order to do it.... Pure laziness on my part reallty. I will give it a go.
 
Old 12-11-2007, 03:06 AM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
probably is,
you could use perl DBI or PRO*C or something in java to connect I should imagine.

i can't really say cos I aint worked with oracle for about 4 years.
 
Old 12-12-2007, 01:05 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Yrs ago I used Oracle a lot and used SQL*Loader to load in flat files. I thought there was a reverse tool as well, SQL*Dump (??) or something (SQL*Loader with a dump option?) , so you could easily move backups between diff versions of Oracle.
 
Old 12-12-2007, 03:27 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
yeah me too, sqlload from CA, I seem to remember there was a dump too, perhaps the same
tool, i remember doing configuration files for it.
but it's not free! (or it wasn't then)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
In Memory SQL type tables koodoo Programming 2 08-05-2006 03:55 AM
SQL: tables and queries in school project cold Programming 1 10-29-2005 07:58 PM
How to compare records in two tables in seperate My Sql database using shell script sumitarun Programming 5 04-14-2005 09:45 AM
SQL: making queries from multiple tables ganninu Programming 1 01-08-2004 11:17 AM
SQL query, comparing tables ngomong Programming 3 07-07-2002 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration