Anil Bansal

Greenhorn
+ Follow
since Jun 18, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anil Bansal

Hi,
If i add something to the process.getOutputStream then i am able to get the password to connect to the db. But the problem here is i cannot send multiple arguments through the same stream.
For instance, if i just had to pass only the password to connect to the db through the proc.getOutputStream, it is working fine and executing the sql as well, but if i want to pass the arguments of the sql script also through the same stream it does not work as it considers everything as one string.
This is the problem that i have.
Hi,
Thanks a lot for redirecting to that article and after reading that article i understood that we cannot use it the way i was trying to use it.
But the article does not show the way i can successfully execute my command.
I want to first connect to a database using sqlplus command as well as at the same time hide the password used to connect, then run an sql with the required arguments as well as hide all those arguments.
Can you please guide me as to how to do this?

Anil Bansal

Hi All,
I also wanted to execute an sql script through java but had one more requirement. I wanted to ensure that the password that i am using to connect to the database as well as the arguments to the script are not visible through ps commands.
Can you suggest me a way in which i can redirect the password as well as the arguments through a file using java.
something like:
runtime.exec(sqlplus system@db @some.sql <tmp)
where tmp is the temporary file and has the password to connect to the db as well as the arguments required by the sql file.
This is not working in java through runtime command but the same kind of thing works in a shell script.

Is there any other better way of achieving the same.

Thanks,
Anil

Hi All,
I also wanted to execute an sql script through java but had one more requirement. I wanted to ensure that the password that i am using to connect to the database as well as the arguments to the script are not visible through ps commands.
Can you suggest me a way in which i can redirect the password as well as the arguments through a file using java.
something like:
runtime.exec(sqlplus system@db @some.sql <tmp)
where tmp is the temporary file and has the password to connect to the db as well as the arguments required by the sql file.
This is not working in java through runtime command but the same kind of thing works in a shell script.

Is there any other better way of achieving the same.

Thanks,
Anil