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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unix script for loading a data from a file into database grajesh_955 Shell Programming and Scripting 5 11-08-2008 11:49 PM
Oracle and Symantec Certify Veritas Data Center Solutions on Oracle - WebWire (press iBot UNIX and Linux RSS News 0 07-17-2007 08:30 AM
Need Shell Script to upload data from Text file to Oracle database chandrashekharj Shell Programming and Scripting 6 03-26-2007 03:21 AM
Problem of Data Loading.... ankitgupta Shell Programming and Scripting 1 10-11-2006 10:08 AM
unix script to export data from csv file to oracle database vinayagan Shell Programming and Scripting 3 07-20-2005 04:16 AM

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

Join Date: Jul 2006
Posts: 1
Shell Script for Data loading in Oracle

Hi All
I am new to unix.
I need a shell script to load a datafile in to oracle.
I already have a control file, and data file. all I need is if i execute the shell it must load the data using the ctl file to table.

Control file : PAY0001.ctl
Datafile : mon_grs_det.dat
log file : mon_gross_det.log
discard_file: mon_gross_det.dis

i will be calling the shell from Appworx Scheduler
  #2 (permalink)  
Old 07-21-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,416
Code:
sqlldr control=PAY0001.ctl log_file=mon_gross_det.log  discard=mon_grs_det.dat data=mon_grs_det.dat
Code:
$ sqlldr

SQL*Loader: Release 8.1.6.3.0 - Production on Fri Jul 21 08:34:33 2006

(c) Copyright 1999 Oracle Corporation.  All rights reserved.


Usage: SQLLOAD keyword=value [,keyword=value,...]

Valid Keywords:

    userid -- ORACLE username/password           
   control -- Control file name                  
       log -- Log file name                      
       bad -- Bad file name                      
      data -- Data file name                     
   discard -- Discard file name                  
discardmax -- Number of discards to allow          (Default all)
      skip -- Number of logical records to skip    (Default 0)
      load -- Number of logical records to load    (Default all)
    errors -- Number of errors to allow            (Default 50)
      rows -- Number of rows in conventional path bind array or between direct path data saves
               (Default: Conventional path 64, Direct path all)
  bindsize -- Size of conventional path bind array in bytes  (Default 65536)
    silent -- Suppress messages during run (header,feedback,errors,discards,partitions)
    direct -- use direct path                      (Default FALSE)
   parfile -- parameter file: name of file that contains parameter specifications
  parallel -- do parallel load                     (Default FALSE)
      file -- File to allocate extents from      
skip_unusable_indexes -- disallow/allow unusable indexes or index partitions  (Default FALSE)
skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable  (Default FALSE)
commit_discontinued -- commit loaded rows when load is discontinued  (Default FALSE)
  readsize -- Size of Read buffer                  (Default 1048576)

PLEASE NOTE: Command-line parameters may be specified either by
position or by keywords.  An example of the former case is 'sqlload
scott/tiger foo'; an example of the latter is 'sqlload control=foo
userid=scott/tiger'.  One may specify parameters by position before
but not after parameters specified by keywords.  For example,
'sqlload scott/tiger control=foo logfile=log' is allowed, but
'sqlload scott/tiger control=foo log' is not, even though the
position of the parameter 'log' is correct.
  #3 (permalink)  
Old 07-21-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
AppWorx runs any shell script as long as you put magic on the first line -
e.g.,
#!/bin/sh
  #4 (permalink)  
Old 07-21-2006
Dhruva's Avatar
Dhruva Dhruva is offline
Registered User
  
 

Join Date: Mar 2006
Location: India
Posts: 255
The following is the script whic you need to put in sh file..and this command should be in one line.

And i Don't agree that it is to mandatory to add that magical line #!/bin/sh for appworx.Because my scripts runs fine...with appworx.But it is good practice to include that line.


sqlldr userid= "user/password@host" control= PAY0001.ctl data= mon_grs_det.dat log=mon_gross_det.log bad=mon_gross_det.bad errors=15000
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 05:25 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