Oracle Licensing

select * from v$license;


how to determine if we have partitioning installed:


select decode(count(*), 0, 'No', 'Yes') Partitioning
from ( select 1 
       from dba_part_tables
       where owner not in ('SYSMAN', 'SH', 'SYS', 'SYSTEM')
         and rownum = 1 );


How to figure out what features we’re using:

Set feedback off
Set linesize 122
Col name             format a45     heading "Feature"
Col version          format a10     heading "Version"
Col detected_usages  format 999,990 heading "Detected|usages"
Col currently_used   format a06     heading "Curr.|used?"
Col first_usage_date format a10     heading "First use"
Col last_usage_date  format a10     heading "Last use"
Col nop noprint
Break on nop skip 1 on name
Select decode(detected_usages,0,2,1) nop,
       name, version, detected_usages, currently_used,
       to_char(first_usage_date,'DD/MM/YYYY') first_usage_date, 
       to_char(last_usage_date,'DD/MM/YYYY') last_usage_date
from dba_feature_usage_statistics
order by nop, 1, 2

How to get how many cpu does my AIX server have?
posted Jan 18, 2011 5:57 PM by Sachchida Ojha

Any of the following:
#lsdev -Ccprocessor | grep -ci available

# lparstat -i | grep "Online Virtual CPUs"
Online Virtual CPUs : x

The following will tell you what the specification is...
# lsattr -El proc0


sar -P ALL 1 1

lsattr -El proc0
pmcyles -m

How to Check and Enable/Disable Oracle Binary Options

This is for UNIX Only ! Does NOT work on Windows !

This requires advanced skills to make the changes and perform the relink.

The goal of this article is 2 parts:

1. Verify if a given option is turned on or not
2. Enable/Disable given options

This applies to the following options:

* RAC (Real Appliction Cluster)
* RAT (Real Application Testing)
* OLS (Oracle Label Security)
* DV (Database Vault)

Last, some unusual items to be aware of

* ASM (Automated Storage Management)
* OLAP (Oracle OLAP)
* PART (Oracle Partitioning)
* CTX (Context Management Text)


Before you can verify options and/or enable/disable them, you will need to:
cd $ORACLE_HOME/rdbms/lib

and run either or both of the following commands:
ar -t libknlopt.a | grep -c {file}

where {file} is => OPTION - file

* RAC - kcsm.o
* RAT - kecwr.o
* OLS - kzlibac.o
* DV - kzvidv.o
* ASM - kfon.o
* OLAP - xsyeolap.o
* PART - kkpoban.o
* CTX - kciwcx.o

An example
ar -t libknlopt.a | grep -c kcsm.o
would return 0 if RAC is disabled or a number >0 if enabled

The ar command does not work on IBM AIX

To enable or disable options, please look at the following commands:
make -f {option}

where {option} is => OPTION - {option on} / {option off }

* RAC - rac_on / rac_off
* RAT - rat_on / rat_off
* OLS - lbac_on / lbac_off
* DV - dv_on / dv_off
* ASM - asm_on / asm_off
* OLAP - olap_on / olap_off
* PART - part_on / part_off
* CTX - ctx_on / ctx_off
* DM - dm_on / dm_off

An example
make -f asm_on

would enable ASM option

Unusual Items to be Aware Of

The V$OPTION is unchanged and you will need to refer to other documentation to change it in order to complete the changes to the options. This include but not limited to running sql scripts which changes the DB Catalog.

Lastly, the Oracle binary will need to be recompiled

$ make -f rdbms/lib/ ioracle

Additional information is the chopt utility

This note can be made applicable for all platforms by adopting the chopt utility.

Besides working on Windows platforms, another useful feature is the fact that on UNIX/Linux platforms, it neatly displays the commands that need to be executed:

[celcaix3]/grdbms/64bit/patchdb/app/oracle/product/p11201b/rdbms/lib> chopt disable rat

Writing to /grdbms/64bit/patchdb/app/oracle/product/p11201b/install/disable_rat.log...
%s_unixOSDMakePath% -f /grdbms/64bit/patchdb/app/oracle/product/p11201b/rdbms/lib/ rat_off
%s_unixOSDMakePath% -f /grdbms/64bit/patchdb/app/oracle/product/p11201b/rdbms/lib/ ioracle

Note that the relink commands above are not actually being run by chopt. The user has to manually run them.

Note: The fact that chopt is showing an Installer variable is a bug.
As per "Bug 8967636: $ORACLE_HOME/BIN/CHOPT.INI NOT INSTANTIATED CORRECTLY" chopt really *should* invoke make and relink the oracle executable.

Workaround as per the bug is edit the chopt.ini file and
replace all references to %s_unixOSDMakePath% with /usr/bin/make
before running the chopt script.

Warning concerning switching on ASM should only be done on Grid Infrastructure
Homes in Oracle 11gR2. Doing it on standard RDBMS will result in errors on