Saturday, August 24, 2013

0 DB2 10.5 BLU testing

 

Create the COLUMN store database

db2 terminate
db2set db2_workload=ANALYTICS
db2 force applications all
db2stop force
# sleep 5
db2start
db2 create database coldb

image

0 How to fix the SQL2441N

While testing db2covert for converting row base table to column base table , I got the error SQL2441N.

image 

The error is causing by previous convert fail which left the orphan entry in  SYSTOOLS.ADMIN_MOVE_TABLE.

Wednesday, August 21, 2013

0 Use TPC-H to create large test data sets

 

Prerequisite

Install Visual Studio Express 2012 for Windows Desktop

Download the TPC-H

Compile the dbgen.exe

Open the tpch.sln from the tpch_2_16_0\tpch_2_15_0\dbgen\ and click the BUILD.

image

There would be some error, however, the ddlgen.exe still create successfully under Debug folder

Tuesday, August 20, 2013

2 Install DB2 10.5 on Centos 6.4

 

Prerequisite

  • Install Centos 6.4
  • Download DB2 10.5
  • Add the Host Name resolution: /etc/hosts –> This is required because I don’t have DNS setup for my VM.
 

Prerequisite check

  • libstdc++so.6:  I use yum whatprovides libstdc++so.6 and install the missing package –> libstdc++4.4.7-3-el6.i686
  • /lib/libpam.so*: This is 32-bit PAM modules. I use yum whatprovides /lib/libpam.so* to search and install the missing package –> pam-1.1.1-l3.el6.i686
  • openibd : This is packaged is needed for purescale. The package has been rename to RDMA ( Remote Direct Memory Access) in Centos 6. Since I am not testing purescale, I am going to ignore.

image

  • Disable SELinux : Edit  /etc/selinux/config and reboot.

Sunday, August 18, 2013

0 DB2 10.5 BLU Acceleration

I had the opportunity to attend the IBM PoT event for DB2 10.5 BLU. One of the big features for the DB2 10.5 release is the BLU Acceleration and how it can improve on the analytical  environment .The columnar store data structure is not the new concept among database vendor, however it is interesting to see how IBM implement and position itself among the competitors.

What is BLU stands for ?

The internal Code name for BLU was Blink Ultra. Now it is called BLU.

Currently, it is stands for Big Data,Lightning fast and Ultra-easy.

But you know it can changed any time .

What edition of DB2 10.5 support DB2 BLU Acceleration ?

BLU Acceleration is a feature of DB2 and just like any database features it is only supported on the certain edition. Currently, it is only supported in :

  • Advanced workgroup server edition
  • Advanced Enterprise Server edition

BLU does not support in the DPF, HADR and purescale at this point. ( 2013 August) , it is in the high priority list within IBM.

Friday, August 9, 2013

0 Oracle Backup/Restore (2) RMAN - Backup

RMAN – Recovery Manager

  • Backup is happen on the data block level. It can save time and space. Would detect the HWM on the file and do not backup data block higher the HWM.
  • Compression
  • Can detect the bad data block
  • Backup Level 0-5. 0 is Full backup.  1-5 can be differential or incremental .

 

RMAN Catalog

-- Create tablepsace to hold repository
CREATE TABLESPACE RMAN
DATAFILE '/u01/app/oracle/oradata/oracledb1/RMAN01.DBF' SIZE 50M REUSE
AUTOEXTEND ON NEXT 64K MAXSIZE 32767M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
 
-- Create rman schema owner
CREATE USER rman IDENTIFIED BY rman
TEMPORARY TABLESPACE temp 
DEFAULT TABLESPACE rman 
QUOTA UNLIMITED ON rman;
 
GRANT connect, resource, recovery_catalog_owner TO rman;

image

rman catalog username/passowrd@SID target username/password@SID

  • If SID is not provided, it use the current $ORACLE_SID
  • Catalog’s username name and password is the one we create in the above.
  • In below screenshot, we only connect to the catalog

image

In below screenshot,  we connect to the $ORACLE_SID database and catalog and then register database.

image

Backup database

backup database; 
backup database plus archivelog;

image

Here is the screenshot of the backup database plus archivelog

image

Backup tablespace

backup tablespace <TABLESPACE NAME>
backup tablepsace exmple;

image

Backup data file

backup datafile [datafile path] 
backup datafile '/u01/app/oracle/oradata/oracledb1/example01.dbf';

image

 

Backup control file

 backup current controlfile;

image

 

Differential Incremental backup

  • Incremental backup would only backup the changed block since the last level 0 incremental backup.
  • If there is no level 0 incremental backup. RMAN will first create level 0 and then create the level 1 backup.
  • Oracle would not use the FULL backup as base (parent ) for increment backup ( level 1).
  • The level 1 backup would only backup the changes since last level 0 or level 1 backup.
 backup incremental level 1 database;

image

Cumulative Incremental backup

RMAN can also backup Cumulative backup base on the last level 0 backup.

 

BACKUP INCREMENTAL LEVEL 1 CUMULATIVE database

image

List backup

# Show all backup 
list backup;
 
# Show/Delete items not needed for recovery
report obsolete;
delete obsolete;
image

 

image

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates