Quick one liner to get a full OPatch inventory of your Oracle Middleware Server

After trying to use OEM to grab all the patches from every installed Oracle product, I gave up and decided to write my own one liner. Customize to match your weblogic install directory.

This script will first find all Middleware Homes specifically using Weblogic, then run the lsinventory or lspatches to display a full listing.

  • First, sign in as the “oracle” user
  • Second, run the following command on your linux system



for line in `locate oraInst.loc|grep weblogic |sed 's/.\{12\}$//'`;do /u01/app/oracle/weblogic1036R2/oracle_common/OPatch/opatch lsinv -detail -oh $line;done


Oracle Database 11gR2 install on OEL 6.5

73 yum install libaio

75 yum install libaio.i686

77 yum install glibc.i686

79 yum install compat-libstdc++-33.i686

81 yum install elfutils-libelf-devel

83 yum install libaio-devel.i686

85 yum install libgcc.i686

87 yum install compat-libstdc++-33.i686

89 yum install unixODBC.i686 unixODBC.x86_64

91 yum install unixODBC-devel.i686 unixODBC-devel.x86_64

93 yum install mksh.x86_64


Oracle Database 11g install on Centos 7

Problem encountered when installing Oracle 11g on Centos 7

Google suggested this was a fairly common problem with machines with a newer GLIBC. Most of the suggested solutions didn’t work for me (writing a glib memcpy shim etc). Instead I was able to statically link this executable against the glibc archive which didn’t have the problem with the missing [email protected] reference.

yum install glibc-static.x86_64

yum install glibc-static.i686

vi /u01/app/oracle/product/11.2.0/dbhome_2/ctx/lib/ins_ctx.mk

ctxhx: $(CTXHXOBJ)

-static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) /usr/lib64/stdc.a

I additionally had to patch the the ins_emagent.mk to link to the libnnz11 library:

vi /u01/app/oracle/product/11.2.0/dbhome_2/sysman/lib/ins_emagent.mk

Search for the line


Change it to:


Then press the Retry button and it should install correctly!






Weblogic startup scripts using “UpStart”

I previously wrote on how to create weblogic startup scripts using standard init.d scripting. There is an even easier way to do things now. Why not use upstart, which is an event based replacement for the /sbin/init daemon.

Simply create a file “wlnode.conf” and put it in the /etc/init directory. This will start the Weblogic Nodemanager. You will need to modify based on your installation of course.

1st Weblogic Server


start on runlevel [345]
# console output
exec /bin/su - oracle -- /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startWebLogic.sh

Now you want the Weblogic Admin to start as well? Create a file called wladmin.conf


start on runlevel [345]
# console output
exec /bin/su - oracle -- /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startWebLogic.sh

Do you have any instances? You can start them too. Create a file called wlinstance1.conf


start on runlevel [345]
exec /bin/su - oracle -- /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startManagedWebLogic.sh instance1

To start and stop and find status, simply run “start wlnode”, “stop wlnode” and “status wlnode” using whatever you named your config file in /etc/init.

If you have a cluster setup, then you need to make sure the node manager is running and configured correctly on the second server. Once that is setup, you can add the following Upstart config files to bring everything up.

Second Weblogic Server


start on runlevel [345]
# console output
exec /bin/su - oracle -- /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startWebLogic.sh


start on runlevel [345]
exec /bin/su - oracle -- /u01/app/oracle/middleware/user_projects/domains/DEV_domain/bin/startManagedWebLogic.sh instance2 http://centos.my.lan:7001

This is just a quick example and much more can be done using UpStart!

Oracle Virtual Server 3.0 VM Migration from OVM 2.2

I know that this software is a new and fairly different version from OVM 2.2 but Oracle has been working on this over over 3 years! At least there should have been some documentation on how to migrate / move existing OVM 2.2 running VMs over to the new version. Gafff

Anyway, you can probably tell I have been at this for some time and frustrated. But here is how you do it.

  1. Install new OVM 3.0.1 on new hardware. There is no Software upgrade at all.
  2. Go into your OVM 2.x /OVS/running_pool directory and tar up individually your VMs like this

tar -cvzf vm1.tgz vm1/

  1. Copy this vm1.tgz file to a running webserver inside your network (WHAT?!! YES!)
  2. Once hosted on http://fred.my.lan/vm1.tgz you can import into your OVM 3.0 environment.
  3. From the OVM 3.0 Console. Goto “Server Pools” / “Templates” / “Choose Blue Import Template” and add your internal webserver and file location http://fred.my.lan/vm1.tgz
  4. When finished you will need to choose “Clone Template to VM” from that same menu on Server Pools.
  5. This will just ask you some questions regarding the existin VM make sure you choose Xen PVM and update your network settings if needed, otherwise it won’t let you Clone.

More to come … help me

So must spent another few hours trying to get connected to the VM consoles. They used to have passwords associated with them which were stored in the vm.cfg.  Apparently that hasn’t been fully implemented yet either https://forums.oracle.com/forums/thread.jspa?messageID=9899756

  1. Connect to your VM through the OVM Manager using Right Click on each VM and choosing “Console”
  2. The password is the Weblogic / OVM Server credentials that were entered when server was installed. “admin / whateverpassword”
Found another issue with OVM 3.0
One of my 2 servers only had one interface so