When using DBMS_STATS to gather statistics, we need a method to choose which objects to gather statistics for. This is done by the parameter “OPTIONS”. The possible values for this parameter are

  • GATHER
  • GATHER AUTO
  • GATHER STALE
  • GATHER EMPTY
  • LIST AUTO
  • LIST EMPTY
  • LIST STALE

Of the above, GATHER AUTO & GATHER STALE confuse many – let’s see what’s the main difference between the two.

GATHER STALE: Oracle gathers statistics on stale objects as determined by looking at the *_tab_modifications views. The estimate percent & degree have to be provided by the user.

GATHER AUTO : Oracle decides which objects to gather fresh statistics for and also decides how to get them. Oracle determines the estimate percent to be used. The parallelism used is based on the init.ora setting. This also used *_TAB_MODIFICATIONS to decide on the eligible candidates.

FootNote:

In 12c, Oracle has done away with most of these and provides only GATHER and GATHER AUTO

Reference:

https://docs.oracle.com/database/121/ARPLS/toc.htm

http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_stats.htm#CIHBIEII

It turns out that our datacentre guys had HyperThreading not turned on in our Oracle Database Server. We’re talking about ~30% improvement in performance with it turned on. Here’s a quick way to check if HyperThreading is enabled in Windows.

It uses the fact that when hyperthreading is enabled, the number of logical processors will be higher than number of cores.

Copy the below code and save it as ht_check.vbs

To run, open a command prompt, cd to the location you have the script saved (or use full path) and call
cscript ht_check.vbs


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set Plist = objWMIService.ExecQuery _
("Select * from Win32_Processor")
For Each prox in Plist
IF prox.NumberOfLogicalProcessors > prox.NumberOfCores THEN
Wscript.Echo "HYPERTHREADING ENABLED!"
Wscript.Echo "Num of Logical Procs:" + CStr(prox.NumberOfLogicalProcessors)
Wscript.Echo "Num of Cores:" + CStr(prox.NumberOfCores)
ELSE
Wscript.Echo "HYPERTHREADING NOT ENABLED!"
Wscript.Echo "Num of Logical Procs:" + CStr(prox.NumberOfLogicalProcessors)
Wscript.Echo "Num of Cores:" + CStr(prox.NumberOfCores)
END IF
Next

I was getting “Collection Status : Disabled by Upload Manager” on one of my EM targets. Now, I prefer to have monitoring and DBA tasks done the old school way, with scripts and all. But we have EM deployed for all targets and this is something that I had to fix.

I started by doing a “emclt upload” and see what it gave. I got the error “EMD upload error: uploadXMLFiles Skipped:: OMS version not checked yet.” . So I went back to MOS to see if  there was any help there. Note 1086343.1 is a good reference.

Upon looking at the emagent log and trace files, I saw that there were connection problems to the OMS repository. Turns out that the targets.xml file (which has details on the various monitored components on any host) was messed up.

To create a new targets.xml file, I took backups and ran the following:

emctl stop agent  --> stop the agent
agentca -d        --> force a discovery of the targets on the host

This took a while, but created a new targets.xml which has all details. I Edited the file to have only the databases that I wanted EM to monitor and removed the rest. The targets.xml is by default created without the password for the connect user (DBSNMP). So  add these two lines for each target (DB). make sure that encrypted is set to FALSE. On the next agent startup, these will be automatically encrypted (username & pwd)

<Property NAME="UserName" VALUE="DBSNMP" ENCRYPTED="FALSE"/> 
<Property NAME="password" VALUE="password" ENCRYPTED="FALSE"/>

Once this was done, I started the agent up using emctl start agent and all was good.

mkdir -p /stager12
cd
unzip -d /stager12 *.zip

GParted in OEL6

Posted: March 14, 2013 in Linux, Uncategorized

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/gparted-0.6.0-1.el6.x86_64.rpm
rpm -Uvh gparted-0.6.0-1.el6.x86_64.rpm

http://www.thegeekstuff.com/2010/09/rsync-command-examples/

Mount NTFS drives in OEL6

Posted: March 14, 2013 in Linux, Uncategorized

download the *.tgz file from http://www.tuxera.com/community/ntfs-3g-download/

export MAKE=’/usr/bin/gmail -i’
./configure
make
make install

fdisk -l to see your device handle will be like /dev/sd

mkdir -p /mnt/newmount1

mount -t ntfs-3g /dev/sda /mnt/newmount1