• CozWeAreFriends Banner. Nice isn't it?
  • CozWeAreFriends Banner. Nice isn't it?
  • Oracle SQL to generate maximum/high CPU on OVM Guest

    Posted on July 18th, 2015 by fath

    Hi All,

    There was a time during my project migrating our Oracle database servers to Oracle Virtual Machine (OVM) Guest (VM) that I had an issue regarding how the CPU works. Consider this scenario, you already provisioned 4 VCPUs to your guest running on Windows Server 2008 and then suddenly there is a need to increase the CPU since your Oracle database (oracle.exe) is starving for more processing power. What you did is simply increase the Guest’s VCPU on the fly through your OVM Manager console. The CPU somehow is reflected to your Windows OS (CPU in your task manager changed from 4 to 8 cores) but your oracle.exe process remained utilizing maximum 4 cores and not growing into the new 4 cores.

    I had searched through MOS and Google but cannot find much information related to the scenario except for some documentations regarding Guest sort-of bug but it however was affecting earlier version of OVM.

    Based on our testing in the environment, we found out that there’s no way to let our Oracle database process to switch to 8 VCPUs dynamically except after OS reboot. To test this, we had to ensure that our oracle.exe will initially consume maximum 4 CPUs and we tried to increase the VCPU afterwards.

    It was too bad that the database size was not that big hence I could not figure out how to simulate very high load in an easy way. So what I did was to use the following SQL so that the CPU retained at maximum all the time. I hope it will help anyone of you who is looking for the same answer.

    *Note: you may not want to run this in your production environment.

    SQL:
    select /*+ PARALLEL(100) */ distinct a.obj#, a.obj#
    from SOURCE$ a, WRH$_SYSMETRIC_HISTORY b



    Oracle SQLplus – How to check database version

    Posted on April 30th, 2012 by fath

    Hi All.

    A lot of you might’ve been knowing how to achieve what I mentioned in the title. But sometime, we are clueless and we dig down here and there, but found nothing. Hehe. So here’s the easy way how to get Oracle database version using SQLplus.

    Just login to your SQLplus. You will see it there. 🙂

     

    $ sqlplus ‘/as sysdba’

    SQL*Plus: Release 10.2.0.4.0 – Production on Mon Apr 30 17:19:49 2012

    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options