Home » RDBMS Server » Server Utilities » Could I call SQL Loader in PHP? (Oracle 11 and PHP5)
Could I call SQL Loader in PHP? [message #280567] Wed, 14 November 2007 01:55 Go to next message
raccsdl
Messages: 3
Registered: November 2007
Location: Viet Nam
Junior Member
Hi.

I a newer using oracle with PHP. I want to import data to database.

I am using SQL Loader tool. It is good for import data.

Now, I want to call command from PHP. Can I call it from PHP or Not?

Thank for your help.

Rac
Re: Could I call SQL Loader in PHP? [message #280569 is a reply to message #280567] Wed, 14 November 2007 02:03 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
SQL*Loader is an application.

If you can (i.e. know how to) call any other application, you'll be able to do it with SQL*Loader as well. I don't know PHP so I can't help you much about it; you might get the answer here, but - perhaps you should find a way how to call an application from PHP on one of PHP forums instead.
Re: Could I call SQL Loader in PHP? [message #280571 is a reply to message #280567] Wed, 14 November 2007 02:10 Go to previous messageGo to next message
raccsdl
Messages: 3
Registered: November 2007
Location: Viet Nam
Junior Member
Hi Littlefoot.

Thank you for quickly reply. I try to find the wal call other application in PHP.

If anyone have other solution for this, Please help me. Thanks so
much.

Rac
Re: Could I call SQL Loader in PHP? [message #280778 is a reply to message #280567] Wed, 14 November 2007 13:39 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
$sqlldr = shell_exec('/a/oracle/product/10.2.0/bin/sqlldr');
Is the specific answer to you question, but likely it will NOT do as expected/desired.
The reason for the failure would be because the shell environment would be missing critical values.
I'll leave it to you to figure out how to actually make it work.
Re: Could I call SQL Loader in PHP? [message #281782 is a reply to message #280778] Mon, 19 November 2007 05:26 Go to previous messageGo to next message
raccsdl
Messages: 3
Registered: November 2007
Location: Viet Nam
Junior Member
Hi anacedent
thanks for your reply.

I try to run sqlldr with Shell_exec or system and exec but it did not sucess.

I run it with system and got return value 126 that invole permission but I don't know the way to fix it. please help me the way to fix it.

I chang mode for that file to 777 and the same with shell script call it.

this is urgent so please help me. thanks so much. Sad
Re: Could I call SQL Loader in PHP? [message #281850 is a reply to message #280567] Mon, 19 November 2007 09:18 Go to previous message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
>this is urgent so please help me.
Explain why it is URGENT for ME to solve this problem form you.
Do I get a bonus if I meet your deadline?
In most cases the newly spawned process run as OS user "nobody".
Consult with your Unix System Administrator on how to do what you desire.
Previous Topic: ERROR EXP-00003 During an Export!
Next Topic: Newbie: error during an import
Goto Forum:
  


Current Time: Sat Dec 03 16:27:16 CST 2016

Total time taken to generate the page: 0.05176 seconds