The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
writing script file for database shaksing Shell Programming and Scripting 3 07-26-2007 05:30 AM
Converting tables of row data into columns of tables justthisguy Shell Programming and Scripting 7 07-16-2007 01:42 PM
Automating back up of database tables new2ss Shell Programming and Scripting 1 05-18-2006 06:12 AM
Importing a unix file dump into a PC capable database DaltonF UNIX for Dummies Questions & Answers 7 07-23-2002 02:06 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2004
Registered User
 

Join Date: Jul 2004
Location: USA
Posts: 52
writing database tables into a file in unix

I want to collect the database tables(Ex: Emp,Sal,Bonus...etc)
in a file & give this file at the command prompt, when prompted for the tables list at command prompt. How can i do that ?

Ex:- Import jason/jason1 tables=emp,sal,bonus log=j1.log
i want to change this into
Ex:- Import jason/jason1 tables=i_tables.txt log=j1.log

where i_tables.txt should contain emp,sal,bonus.
How i can acheive this at the commnad prompt in unix .

Thanks !
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-05-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Please don't post the same question in more than one forum.

I have removed the duplicate post.

Cheers
ZB
Reply With Quote
  #3 (permalink)  
Old 03-22-2005
Ghack's Avatar
Registered User
 

Join Date: Mar 2005
Location: Milwaukee, WI
Posts: 4
Cool

you shoul be able to do this with a "par" file.
Here is small tip regarding export. It is possible to make a selective table export with parameter tables.

$exp parfile=exp.par

Example of parameter file:

$ cat exp.par
buffer=8388608
file=artist_full.dmp
log=artist_exp.log
consistent=y
tables=(emp,sal,bonus,...)
userid=system/manager
Reply With Quote
  #4 (permalink)  
Old 03-22-2005
Registered User
 

Join Date: Jan 2005
Posts: 682
The original question is rather unclear. It seems as though he only wants to extract the DDL.

You can do this as follows:

Code:
exp userid=user/pwd rows=n grants=n indexes=n constraints=n owner=schema_owner
imp userid=user/pwd full=y indexfile=schema_owner.sql
This will create a file called schema_owner.sql with your DDL. You can strip out the "REM" text and you have a functional DDL build script for your tables and indexes.

Thomas
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0