Monday, October 25, 2010

chopt utility

(originally published at Pythian)
There is a new tool came with Oracle 11g Rel.2 that helps to modify options in
installed oracle home (Enabling and Disabling Database Options)
It is very simple and straightforward utility that recompiles database kernel
with different flags.
[oracle@r1 bin]$ chopt
usage:
chopt <enable|disable> <option>
options:
dm = Oracle Data Mining RDBMS Files
dv = Oracle Database Vault option
lbac = Oracle Label Security
olap = Oracle OLAP
partitioning = Oracle Partitioning
rat = Oracle Real Application Testing
e.g. chopt enable rat

There is no "list" command that can show installed options for the selected home
although it can be helpful and useful to have such option.

Initially enabled options can possibly be seen in $ORACLE_HOME/install/make.log file
(flags were set as compilation options for ins_rdbms.mk) but it can be changed over time
and not always relfect the current configuration.

Knowing that there is XML file for properties of oracle home wouldn't be
$ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
a good place to track list of oracle home configured options?

And finally the tool does not take into account several options at once, it simply ignores
all parameter after the second one:

[oracle@r1 bin]$ chopt enable dm dv

Writing to /u01/app/oracle/product/11.2.0/dbhome_1/install/enable_dm.log...
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk dm_on
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
/usr/bin/make -f /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk ioracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/
[oracle@r1 bin]$


Have a good day!

Thursday, October 7, 2010

Redo Transport Compression

originally published at Pythian

I was co-presenting recently at Sydney Oracle Meetup
about Data Guard Compression and in preparation I did
some tests to see how it works for 11.2.0.1 (Linux x86-64)

...and I am still not able to see it working.

There is a note
"Redo Transport Compression in a Data Guard Environment [ID 729551.1]"
on MOS how to set compression for redo transport destination
and for log archive gaps but none of those settings helped to see compression
reported neither in trace files nor in v$archived_log view (compressed column).

Possibly at first compression for archive logs was mentioned in the
"Archivelog compression?" post but even "alter database archivelog compress enable"
works in 11.2.0.1 (still not documented)
it does not affect compression of archive logs although archivelog_compression in
v$database changed to ENABLED.

Later on I checked ability of alter database... to influence compression of archive logs
in 11.1.0.6 and 11.1.0.7 (Linux x86-64) and got positive results:

in both versions archive logs of 50M were decreased in size to ~10M
and trace file for ARCH process was updated with information about ratio
of compression:
Archivelog compression complete.
Input: 50969088 bytes Output: 10307875 bytes
Compression Performance: 79.78 percent or 1.62 bits per byte


But for 11g Rel.2 database created from predefined templates compression did not work.
Does it require some special additional options or specific hidden parameters configuration
in addition to mentioned in the note COMPRESSION=ENABLE and "_redo_transport_compress_all"
(which by default set to TRUE)?

Definitely truth is out there...

Have a good day!