Oracle SQLLoader

SQL Loader is a utility which allows you to import text based datas into an Oracle table. We can easly import data from Excel files(CSV) and Txt files to Oracle. Using a definition file (called control file), you can specify delimiters between columns. (Space, comma,Tab, etc)

To run SQL Loader, we must create a control file first. Type the data below into a txt file and save it as load.ctl.
 
LOAD DATA
   INFILE ´C:/FileToImport.txt´
   INTO TABLE MyOracleTableName
    (Person_id   POSITION(01:07)    INTEGER EXTERNAL,
     FirstName   POSITION(08:20)    CHAR,
     LastName   POSITION(21:31)    CHAR,
     email        POSITION(32:48)    CHAR )

If your data does not have constant sizes like above, you may want to specify a delimiter character like below.

LOAD DATA
INFILE ´c:/FiletoImport.txt´
INTO TABLE MyOracleTable FIELD TERMINATED BY ´,´ OPTIONALLY ENCLOSED BY ´ " ´        (Person_id,FirstName,LastName,email)

Finally, to import your data from text file into your database, use the following command.

C:>sqlldr hr/hr control=c:/load.ctl
   log=c:/persloader.log
   bad=c:/load.bad discard=c:/load.dis

 


 Oracle Errors
Oracle Errors and their explanations
Oracle Invalid Objects
Oracle Softwares & Tools

 Frequently asked oracle errors
  • ORA-19502:write error on file "string", blockno string (blocksize=string)
  • ORA-28001:the password has expired
  • ORA-24033:no recipients for message
  • ORA-12152:TNS:unable to send break message
  • ORA-21561:OID generation failed
  • ORA-01144:File size (string blocks) exceeds maximum of string blocks
  • ORA-01086:savepoint 'string' never established
  • ORA-12712:new character set must be a superset of old character set
  • ORA-00824:cannot set sga_target due to existing internal settings, see alert log for more information
  • ORA-01610:recovery using the BACKUP CONTROLFILE option must be done
  • ORA-19804:cannot reclaim string bytes disk space from string limit
  • ORA-16224:Database Guard is enabled
  • ORA-00600:internal error code, arguments: [string], [string], [string], [string], [string], [string], [string], [string]
  • ORA-12853:insufficient memory for PX buffers: current stringK, max needed stringK
  • ORA-02069:global_names parameter must be set to TRUE for this operation
  • ORA-00027:cannot kill current session
  • ORA-01732:data manipulation operation not legal on this view
  • ORA-21780:Maximum number of object durations exceeded.
  • ORA-01149:cannot shutdown - file string has online backup set
  • ORA-01190:control file or data file string is from before the last RESETLOGS
  • Main Page      Contact Us