0

I have a C++ code in which I am using sql loader using system(). When SQL Loader executes while running the code, I got below mentioned messages which I want to disable:

SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 14 14:11:25 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Commit point reached - logical record count 20
Commit point reached - logical record count 40
Commit point reached - logical record count 60
Commit point reached - logical record count 80
sajal
  • 69
  • 1
  • 13

2 Answers2

4

Remember that the system function uses the shell to execute the command. So you can use normal shell redirection:

system("/some/program > /dev/null");
Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
3

You can use the silent=ALL option to suppress these messages:

system("/orahomepath/bin/sqlldr silent=ALL ...")

See also SQL*Loader Command-Line Reference:

As SQL*Loader executes, you also see feedback messages on the screen, for example:

Commit point reached - logical record count 20

You can suppress these messages by specifying SILENT with one or more values:

  • ...
  • ALL - Implements all of the suppression values: HEADER, FEEDBACK, ERRORS, DISCARDS, and PARTITIONS.

Depending on the sql*ldr implementation, you might still end up with one or the other output - if you need complete silence, see the answer from @Joachim below.

Andreas Fester
  • 36,091
  • 7
  • 95
  • 123
  • Just be aware that SILENT=ALL will also apply that filter to the log file, not just what you see on your terminal screen –  Apr 13 '13 at 13:09