Home » RDBMS Server » Server Utilities » Invoke SQL Loader
Invoke SQL Loader [message #383873] Fri, 30 January 2009 17:42 Go to next message
coolguy01
Messages: 64
Registered: August 2006
Member
Hi,
I have an application where I use a SQL Loader to load data onto the table. When i log in as a regular user i try to invoke the SQL Loader on the server. For the credentials to connect to the server like username/Password@database to invoke the sqlldr it looks into a table. We had hard coded the admin username and password while passing these credentials to the server. So irrespective of which user logged in it would load data into the admin.tablename. But right now we want to change that and we want to load data into each users individual table.

For example if its user1 logged in .. when he does the data load it should load data into user1.tablename. So I assume i have to pass his credentials which connecting to the SQL loader instead of the admin. But we dont store any information of the user and their passwords in the application and there is no way we could retrieve password for each user. So if I dont have the password information of the user how would i connect to the server to run the SQL Loader. Could I pass the table name explicitly to the sqlldr instead of the .ctl file? Is there any work around to this as to how I could load data onto individual users tables.

Thanks and Regards
Re: Invoke SQL Loader [message #383889 is a reply to message #383873] Sat, 31 January 2009 00:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Could I pass the table name explicitly to the sqlldr instead of the .ctl file?

No.

Quote:
Is there any work around to this as to how I could load data onto individual users tables.

Dynamically generate the control file.

In addition, I think the whole design is somewhat wrong.

Regards
Michel
Re: Invoke SQL Loader [message #383900 is a reply to message #383873] Sat, 31 January 2009 00:59 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Aren't you worried about possible security problems? Hardcoding login credentials into the SQL*Loader command line?

Besides, do you ever change passwords? If not, well, you should. What will you do then? Edit all these scripts and change hardcoded passwords to new ones?

Why wouldn't you let every user enter his/her own credentials while loading data into a table? That's what usernames and passwords are for.
Re: Invoke SQL Loader [message #383941 is a reply to message #383900] Sat, 31 January 2009 15:55 Go to previous messageGo to next message
coolguy01
Messages: 64
Registered: August 2006
Member
Thanks for the reply,
I know the security of the application is a bit concerning, but its already an existin system I am enhancing and dont have much freedom with the changes. How do i generate the .ctl file dynamically? Can i do so that every control file would load data only into table of that users schema?
Re: Invoke SQL Loader [message #383942 is a reply to message #383873] Sat, 31 January 2009 16:06 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you

http://www.oracle.com/pls/db102/portal.portal_db?selected=3#index-ULT
Above is the Fine Manual for SQL Loader. I\
I suggest you actually read it.
Answers to most of your question are contained in it.

You have not provided Oracle version (to 4 decimal places),
but I suspect the version is obsolete.

>I know the security of the application is a bit concerning, but its already an existin system I am enhancing and dont have much freedom with the changes.

Are you bragging or complaining?

>How do i generate the .ctl file dynamically?
By using some scripting langage or shell script.
What is OS name & version?

>Can i do so that every control file would load data only into table of that users schema?

"That users schema" is less than definitive when multiple schemas are being discussed.

If security concerns are not an issue,
SQLLDR could log into DB as "super user" which can write to ANY (schema's) TABLE to work around not knowing individual users passwords.

You could also change the password for each schema to a known value, invoke sqlldr, & then change the password back to original.

Hope This Helps!

[Updated on: Sat, 31 January 2009 16:07]

Report message to a moderator

Re: Invoke SQL Loader [message #383943 is a reply to message #383942] Sat, 31 January 2009 19:24 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
If you are doing this on the server, you could make all users externally authenticated instead of password authenticated.

Ross Leishman
Previous Topic: SQL*Loader use field from previous record
Next Topic: Running sql loader on CLIENT ?
Goto Forum:
  


Current Time: Tue Dec 06 04:44:27 CST 2016

Total time taken to generate the page: 0.14964 seconds