This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 (220.127.116.11) 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.