Wednesday, January 29, 2014

Saturday, January 25, 2014

Change MiWIFI back to a normal WIFI LAN CARD

XIAOMI is selling a USB WIFI Adapter in RMB9.9

http://www.xiaomi.com/miniwifi

But it is designed to make your PC to a WIFI router instead of a pure WIFI adapter.

I figured a way to change it back to a normal WIFI Adapter by just installing its driver without using bundled software.

Please download from here.
https://docs.google.com/uc?authuser=0&id=0B8gWj5_Gu6ZudU1FOFp5NzhHdTQ&export=download

Tuesday, January 14, 2014

Huge Oracle Trace + Alert Log



SQL> show parameter max_dump_file_size

SQL> alter system set max_dump_file_size='1024m' scope=both;

UTF8 issue after upgrading MySQL to 5.5

In MySQL 5.5.X it introduce utf8mb4 and lead to old table might have coding issue.

<my.cnf>

[client]
default_character_set = utf8mb4

[mysql]
default-character-set=utf8mb4
skip-character-set-client-handshake

[mysqld]
character_set_server = utf8mb4
collation_server = utf8mb4_general_ci
init-connect = 'SET NAMES utf8mb4'
skip-character-set-client-handshake


----------
Convert your table / column collation

ALTER TABLE mytable CONVERT TO CHARACTER SET utf8mb4
ALTER DATABASE  `databasename` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci

Tuesday, November 19, 2013

Installing SMT on SLES 11

1. Generate nu.novell.com credentials on novell support portal

2. Download SMT iso from novell

3. install and setup

4. a2enmod ssl

https://www.suse.com/documentation/smt11/book_yep/data/book_yep.html

Monday, November 18, 2013

Reclaim VMDK space from thin disk on ESXi 5.0/5.1/5.5

There are 2 methods but both need you system to power down.

1. Use VMware convertor, it is free, but need to rename your VM and GUID also changed. It is not a very good choice if you have all those VM backup software that recognize GUID instead of VM Name  (However, I have tested both, it give the best result for reclaiming space, especially some space in LVM will not be able to be reclaimed by method 2 )

2. Do it Manually in 2 steps
- zero out all empty space (Windows sdelete, Linux secure-delete)
        Linux: execute "sfill -llfzv /" after installing secure-delete  (you might want to zero out swap also)
        Windows: "sdelete -z" (downloaded from microsoft technet)
- hole punching using vmkfstools in ESXi
         SSH into ESXi host and run this command: vmkfstools -K <vmdkname>

**if space not able to reclaim, try storage vmotion to thick then thin to force it happens.







Friday, November 8, 2013

Install Oracle 12c on SLES 11SP3



/etc/fstab
none                 /dev                 tmpfs      remount,size=6G       0 0


zypper install binutils gcc43 gcc-c++ glibc glibc-devel ksh libaio libaio-devel libcap1 libstdc++33 libstdc++43 libstdc++46 libgcc46 make sysstat


Install software only during when running ./runInstaller, do not create database

When it prompt for running root.sh script

Open terminal  (using oracle owner account)

1. su root    (don't use "su -" )
2. Execute those script required
3. Back to finish the installer
4. run ./netca to create LISTENER
5. run ./dbca to create your DB

For init script

you can install orarun packet using YaST or zypper

you have to modify /etc/sysconfig/oracle to select what service you want to start

/etc/init.d/oracle
1. Add 11g and 12c version support for startdb part
        ORACLE_VERSION=`$ORACLE_HOME/bin/sqlplus -v | awk '{split($3, V, "."); print V[1]}'`
        if [ $ORACLE_VERSION = "11" ]; then
to
        ORACLE_VERSION=`$ORACLE_HOME/bin/sqlplus -v | awk '{split($3, V, "."); print V[1]}'`
        if [ $ORACLE_VERSION = "11" ] || [ $ORACLE_VERSION = "12" ]; then


2.Change
  if [ ! -z "$ORACLE_HOME" -a ! -d "$ORACLE_HOME" ]; then
to
  if [ ! -z "$ORACLE_HOME" -a -d "$ORACLE_HOME" ]; then

3.
  # Set Intelligent Agent Start/Stop
  AGENT_VERSION="unknown"
to
 ORACLE_VERSION=`$ORACLE_HOME/bin/sqlplus -v | awk '{split($3, V, "."); print V[1]}'`
  # Set Intelligent Agent Start/Stop
  AGENT_VERSION="unknown"