Hello. I have a question regarding PL/SQL and JDBC. I have a file which is about 500 kb in its size with PL/SQL procedures, declarations, etc. How can I execute it through JDBC? The problem is that I have to write an installer for an app which uses db Oracle, and while installing I have to create a scheme in Oracle. First I thought about executing SQLPlus on that file from the Java VM, but I was told to do this through JDBC. Is there any way ?
Hi Grigory, I executed the below java code on a Windows XP computer using J2SE SDK 1.4.1_02 and Oracle (thin) JDBC driver (file: ojdbc14.jar) against an Oracle 8i (18.104.22.168) database running on SUN [sparc] Solaris 7
Note that file "plsql000.txt" is a plain text file that I put in the same directory as my compiled java code -- the "JdbcTest.class" file. This is the contents of file "plsql000.txt"
Note that the "plsql000.txt" file has a trailing blank line (but I don't know if that's important or not). Hopefully this will help you. Good Luck, Avi.