Add Oracle public YUM server for Oracle RPMs

In case you need to install some Oracle rpm for compatible OS like Centos, RedHat or for Oracle Enterprise Linux just do following steps:

Enterprise Linux 5

Download repository configuration file

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-el5.repo 

once it’s done enable repository that you need

 vi public-yum-el5.repo
 Change enabled=0 to enabled=1 from the repository you need.

Enterprise Linux 6

Oracle Linux 6

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo 

once it’s done enable repository that you need

 vi public-yum-el6.repo
 Change enabled=0 to enabled=1 from the repository you need.

Verify it works

yum list
yum install firefox

More information on http://public-yum.oracle.com/

Have a fun 🙂

Tomasz

Visualize your query in sqldeveloper

In case you need to analyze some complex queries you can do quick visualization of the query using nice feature of sqldeveloper: Query Builder.

Just enter your query to sqldeveloper tab “Worksheet” and switch to second tab “Query Builder” so you can see visualization of your query.

You can also build your query directly in “Query Builder” by drag and drop tables from Connections Navigator display.

Have a fun 🙂

Tomasz

 

 

Install Centos Linux 6

This article presents how to install Centos 6.

I assume you have already downloaded Centos Linux 6 64 bit(about 3.5 G) and you know how to use VirtualBox 64 bit(100M) which is available on OTN. Create virtual machine with default settings for Centos Linux 64 bit. 1GB ram and 32G for disk is enough to run Centos 6 64-bit. Rest of options you can keep default – however I usually increase memory for graphic card to 128M, enable 3D acceleration and set processor to 2.

Continue reading

Install Centos Linux 5

This article presents how to install Centos 5.

I assume you have already downloaded Centos Linux 5 64 bit(about 3.5 G) and you know how to use VirtualBox 64 bit(100M) which is available on OTN. Create virtual machine with default settings for Centos Linux 64 bit. 1GB ram and 32G for disk is enough to run Centos 5 64-bit. Rest of options you can keep default – however I usually increase memory for graphic card to 128M, enable 3D acceleration and set processor to 2.

Continue reading

Instance caging in Oracle 11g

Consolidation is very popular word today to save costs:
  • buy one huge server with a lot of CPU, memory, huge storage, fast network
  • put as many as possible databases on it
  • utilize it as efficient as possible
But consolidation brings problem how to share resources between databases:
  • CPU (this article is related only to this resource)
  • storage
  • memory
  • network

As default an Oracle database can see/use all CPUs on a host. In 11.2G there is new option called “Instance Caging” which enables to limit number of CPUs which can be seen/used by a database.

Continue reading

Oracle metrics from AWR tables using sqldevloper report

In case you don’t have Oracle Enterprise Manager at hand you can always generate quick reports in sqldeveloper that will show activity on your database.

Oracle metrics

There are tones of metrics which are collected by database on regular bases and a lot of them are very interesting.

Metrics definition can be found in view V$METRIC. There are about 200 metrics in 11g some examples of them below

Continue reading

Options, Features and Properties of your Database

There are a lot of options which can be used in database. Not all are available in your database. It depends which version of database you are using (standard/enterprise or else)  or if a given option is active/tuned off/on. You can find details in V$OPTION.

select * from v$option;

PARAMETER                                 VALUE
----------------------------------------- -----
Active Data Guard                         FALSE  
Advanced Compression                      TRUE  
Backup Encryption                         TRUE  
Basic Compression                         TRUE  
...
Spatial                                   TRUE  
Streams Capture                           TRUE  
Unused Block Compression                  TRUE  
XStream                                   TRUE  

 64 rows selected

Continue reading

Table compression in Oracle 11g

This article presents new features related to table compression in Oracle 11g. It’s not presenting compression related to Exadata.

Compression option is extended in 11g and have following features:

  • requires compatibility 11.1 for new functionality
  • extended COMPRESS caluse: COMPRESS [BASIC | FOR OLTP]
  • BASIC – default, bulk-load operations from prior releases
  • FOR OLTP – it’s new used for OLTP + direct loads
  • BASIC and FOR OLTP are not supported for tables with more than 255 columns
  • only available for heap organized tables
  • compression can be different for each partition
  • COMPRESS [BASIC|FOR OLTP] is not used for BasicFile LOBs
  • new columns in views DBA/ALL/USER_TABLES and DBA/ALL/USER_TAB_PARTITIONS – COMPRESS, COMPRESS_FOR
  • columns can’t be dropped for compressed tables only set as unused

Continue reading