I want to run a .sql file from java without using jdbc on windows 7. I am trying with java runtime class which executes the system commands. But my java is running with only user privileges and the command needs Administrator privileges. The command that am using to run is "sqlplus /nolog @sqlscript.sql".
+2
A:
You need either JDBC, or a 3rd party software+sufficient rights.
No other way. (If we don't count low-level DB access, which would be an overkill)
Bozho
2010-04-23 13:19:03
A:
I was able to do it by installing oracle client as the logged in user(We need to hold the shift key and right click on the exe and select Run as different user). Also we need to set oracle home in non primary partition of the hard diski.e., not where OS is installed. After doing this if i pass a command like "sqlplus /nolog @test.sql" to the Java Runtime class, it executes the script. This works in only win 7 Ultimate and above. Win 7 Home and starter editions does not support this.
Guru1985
2010-04-28 09:23:14