Hi All

Please download following file from Google drive and keep in unix directory say /home/oracle

https://drive.google.com/open?id=0B8-3R318F39hQUJOcnVPMUdrNzg

The files to be downloaded:-

Please use ojdbc7.jar downloaded for 12c.For 11g,you can use ojdbc6.jar.

 

Please provide execute permissions

Now you can test connection using below:-

[oracle@SBJ1ITESBDBV01 ~]$ sh sqlScript_new.sh
2017-10-26 09:45:53.0

Please note you may get following error if you use ojdbc6.jar to connect 12c database.

[oracle@SBJ1ITESBDBV01 ~]$ sh sqlScript_new.sh
Exception in thread “main” java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at sqlconnect.main(sqlconnect.java:20)

Leave a Reply

Your email address will not be published. Required fields are marked *