Home » SQL & PL/SQL » SQL & PL/SQL » How to pass data file name as a parameter to the control file ?
How to pass data file name as a parameter to the control file ? [message #247246] Mon, 25 June 2007 04:27 Go to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
Hi All,

I am using Oracle 10.0.2.0

I need to run the sql loader command from a shell script.

sqlldr userid=apps/apps control=$CTL_DIR/XXSUNXMLTPIMP.ctl
data=$DATA_DIR/$DATA_FILE.......


My requirment is, the target table(XXSUN_TARGET) should have the data with the data file name for the reference.

The data file name will keep on change. So in control file I can't use that as a default value.

Is there a way, where I can get the data file name as a parameter to the control file ?

Regards,
Prabhu
Re: How to pass data file name as a parameter to the control file ? [message #247248 is a reply to message #247246] Mon, 25 June 2007 04:40 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No parameter on control file.
But it is easy to dynamically build the control file from your shell script.

Regards
Michel

[Updated on: Mon, 25 June 2007 04:40]

Report message to a moderator

Re: How to pass data file name as a parameter to the control file ? [message #247258 is a reply to message #247246] Mon, 25 June 2007 05:21 Go to previous messageGo to next message
prabhuapps
Messages: 79
Registered: June 2005
Location: Bangalore
Member
So each and every time, do I need to build the control file dynamically ? No other way ?



Regards,
Prabhu
Re: How to pass data file name as a parameter to the control file ? [message #247262 is a reply to message #247258] Mon, 25 June 2007 05:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
With the information you gave.
None I can see.
What's the problem?
You create, you load, you remove.

Regards
Michel
Re: How to pass data file name as a parameter to the control file ? [message #247352 is a reply to message #247246] Mon, 25 June 2007 11:49 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
If I was you, I would use execute immediate to create a dynamic external table with a fixed name and then simply query it. This way, you do not have to use sql loader.
Previous Topic: Ora-06540 error by the pipelined function at runtime
Next Topic: Parallel threads on Deletes
Goto Forum:
  


Current Time: Thu Dec 08 18:44:19 CST 2016

Total time taken to generate the page: 0.11224 seconds