The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Connecting to oracle database from shell script satyakiran Shell Programming and Scripting 8 07-03-2009 03:22 PM
shell script to remove old files and write to a log file yabai Shell Programming and Scripting 4 12-09-2008 01:08 PM
Need Shell Script to upload data from Text file to Oracle database chandrashekharj Shell Programming and Scripting 6 03-26-2007 03:21 AM
unix script to export data from csv file to oracle database vinayagan Shell Programming and Scripting 3 07-20-2005 04:16 AM
How To create Flat Files using Unix Shell Script? Aparna_k82 Shell Programming and Scripting 4 02-10-2005 05:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-03-2006
coolbuddy coolbuddy is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 1
How to write Flat Files by shell script using Oracle Database

Hello There..

I came to a situation where I need to write flat files using shell scripts, I need to pull the records from the oracle database and create the flat file, This process should be automated.

Can any shell script expert out here to help me.. please..

Will be really glad to see your response.

Thanks in advance.
BCool
  #2 (permalink)  
Old 02-03-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
using these forums' search capabilities would be a good start!
  #3 (permalink)  
Old 02-03-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
Start by searching for sqlplus.
  #4 (permalink)  
Old 02-21-2006
atagore atagore is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 7
Lightbulb Hmmmm

Howz bouts thiz
(1) Write a SQL script to spool data to a file
(2) Write UNIX script to invoke SQL script

Example:
(1)
/*
This is SQL script named: get_emp.sql
*/
spool ascii.txt
Select * from emp;
spool off
(2)
#!/bin/sh
#
# This is UNIX script named: cron.job
# Runs SQL script and e-mail result to users
#
sqlplus uid/pwd @get_emp.sql

mail 'outlook Address list' < ascii.txt
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:54 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0