On the java side you can check the JDBC Client Version very easy.
java -jar ./mwhome/.../ojdbc7.jar -getversion
Oracle 184.108.40.206.0 JDBC 4.1 compiled with JDK7 on Mon_Jun_30_11:30:34_PDT_2014
#Default Connection Properties Resource
#Tue Apr 17 14:13:51 CEST 2018
But somethimes you may not have access to the application server (here Weblogic) or there are many version installed on the application side.
So the best way is to check in you Oracle Database who your client are.
SQL> select SID,NETWORK_SERVICE_BANNER,CLIENT_CHARSET,CLIENT_CONNECTION,CLIENT_VERSION,CLIENT_DRIVER from v$session_connect_info;
Crypto-checksumming service for Linux: Version 220.127.116.11.0 - Production
Unknown Heterogeneous 18.104.22.168.0 jdbcthin
This is a reliable way to find how (jdbcthin, oci, ..) and with what JDBC Version the client are connecting.
If you have to test some patches and you need a new Oracle Home on the same host, cloning the existing home to the same host is an easy an quick way to do that.
Here a short step by step guide:
- check diskspace
df -h .
- copy the oracle home to it’s new location
cp -rp /opt/app/oracle/product/12.1.0/rdbms6/ /opt/app/oracle/product/12.1.0/rdbms7
- export the new home path and cone. this creates as well all nessesary inventory entries. be carefull to use a free oracle_home_name.
/opt/app/oracle/product/12.1.0 $/opt/app/oracle/product/12.1.0/rdbms6/oui/bin/runInstaller -clone -silent ORACLE_HOME=/opt/app/oracle/product/12.1.0/rdbms7 ORACLE_HOME_NAME="OraDB12Home4" ORACLE_BASE="/opt/app/oracle"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 9835 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-11-15_01-14-43PM. Please wait ...
Copyright (C) 1999, 2014, Oracle. All rights reserved.
You can find the log of this install session at:
.................................................................................................... 100% Done.
Setup in progress (Wednesday, November 15, 2017 1:16:34 PM CET)
.......... 100% Done.
Saving inventory (Wednesday, November 15, 2017 1:16:34 PM CET)
Saving inventory complete
End of install phases.(Wednesday, November 15, 2017 1:17:00 PM CET)
The following configuration scripts need to be executed as the "root" user.
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of OraDB12Home4 was successful.
Please check '/opt/app/oraInventory/logs/cloneActions2017-11-15_01-14-43PM.log' for more details.
- run the root.sh script as instructed.
- you can check the inventory if all looks as expected:
cat /opt/app/oraInventory/ContentsXML/inventory.xml|grep OraDB12Home4
- update your oratab and the the OPATCH directories of the database you want to switch to the new home
create or replace directory OPATCH_INST_DIR as '/opt/app/oracle/product/12.1.0/rdbms7/OPatch';
create or replace directory OPATCH_SCRIPT_DIR as '/opt/app/oracle/product/12.1.0/rdbms7/QOpatch';
create or replace directory OPATCH_LOG_DIR as '/opt/app/oracle/product/12.1.0/rdbms7/QOpatch';