data unload using shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting data unload using shell
# 1  
Old 03-10-2011
Bug data unload using shell

hi,
I work on oracel 10g unix system.

I need to unload data from few tables to a unl file using shell script. I've a file which contains the list of tables. The shell has to refer to this list and create a unl for each table.

Table_list.txt

table1|
table2|
table3|

has to create three unl's

I've worked on Informix db, its quite simple there, just UNLOAD TO would do. But i cudnt get the equivalent one in Oracle.

Thanks!
# 2  
Old 03-10-2011
Quote:
I've worked on Informix db, its quite simple there, just UNLOAD TO would do. But i cudnt get the equivalent one in Oracle.
Dvah, this site is to help with unix related issues/questions.

If you have a question on Oracle table unload, you better off post your question on an Oracle forum.

After you find out your unload question, here is a generic shell that could work for you:
Code:
#!/bin/ksh
IFS='|'
while read mTabName
do
  echo "Now unloading <${mTabName}>"
  <<< your unloading statements here >>>
done < table_list.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell to SQL for data

Input: Table: TAB1 CHILD PARENT SS MID MNM VNM RULE FLG 1 ? S1 ? ? V1 rule004 I 2 1 S1 ? ? V1 0 Z 3 1 S1 ? ? V1 1 Z 4 2 S1 ? ? V2 rule001 N 5 4 S1 ? ? V2 -999999999 to 20000 OR Missing Z 6 4 S1 ? ? V2 20000.000001 to 999999999 Z ... (3 Replies)
Discussion started by: gksenthilkumar
3 Replies

2. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

3. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

4. Shell Programming and Scripting

Replace data of a file with data from another file using shell scripting.

Dears, I'm new to shell scripting and i was wondering if you can help me with following matter. I have a file containing 400,000 records. The file contains two columns like: 00611291,0270404000005453 25262597,1580401000016155 25779812,1700403000001786 00388934,1200408000000880... (1 Reply)
Discussion started by: paniklas
1 Replies

5. UNIX for Advanced & Expert Users

Convert column data to row data using shell script

Hi, I want to convert a 3-column data to 3-row data using shell script. Any suggestion in this regard is highly appreciated. Thanks. (4 Replies)
Discussion started by: sktkpl
4 Replies

6. Shell Programming and Scripting

Read parameter file in a shell script to unload a DB2 Table???

Hi , I Have following requirement: DB2 Sql query to pass from a parameter file for example, I would create a parameter file with (SELECT column 1, column 2 FROM Table name) then job would read it and create a file with the contents named table.txt How to write/modify below ksh script to... (10 Replies)
Discussion started by: developer.dwh9
10 Replies

7. UNIX and Linux Applications

data unload in oracle 11g unix

:)hi, i work with ids and i've got a task now to load some data from oracle table to ids table. I'm trying to unload data from oracel tables. I use UNLOAD TO <filename> SELECT * FROM <table1>; sql in IDS to unload data to a unl. Is there a equivalent sql in oracle? Or is there any... (0 Replies)
Discussion started by: divak
0 Replies

8. Shell Programming and Scripting

linux ISQL and MSSQL unload results to file

Hello, I am using suse 10.1 and isql from unixodbc to connect to a MS SQL server. I got everything to work fine. What do I need to unload the results from the sql to a file? I attempted to put unload to in my sql statement but got a error. I don't see in the isql help where it has a option to... (0 Replies)
Discussion started by: benefactr
0 Replies

9. Shell Programming and Scripting

Unload utility with loop method

Hi, I just wonder why the unload tools from INFORMIX doesn't unload all required file to every output of mOutFile at the accumulative way OR my script has an error ? In fact it just unload to one single record at the latest. for mFile in x??? do echo "Now working with file "$mFile"... (1 Reply)
Discussion started by: cedrichiu
1 Replies

10. Linux

Is there any way to unload *.so by force?

In linux, dlclose can unload the dynamic linked library when the reference count decreases to zero. My questions is: Is there any way to unload the *.so without caring the reference count? (0 Replies)
Discussion started by: princelinux
0 Replies
Login or Register to Ask a Question