Raspberry Pi

Came across something very interesting yesterday – Raspberry Pi.
It’s a $25/$35 dollar computer.
It is cheap and very customizable.
What can we do with it? Anything or nothing.
After doing through the articles, this very cheap computer is very small, and it is running on ARM. A platform used by smartphone. In theory, it should be able to run, android or meebo on it.
For a start, it already is it’s own OS. Call raspbean. Basically it is Linux, Debian based Linux.

More info in :-
http://www.raspbian.org/
http://www.myraspberry-pi.org/

Malaysian Sites :-
http://malaysia.rs-online.com/web/generalDisplay.html?id=raspberrypi&cm_mmc=MY-PPC-0411-_-google-_-4_Raspberry_PI-_-raspberry%20pi_Broad

User Manual :-
http://www.myraspberry-pi.org/wp-content/uploads/2013/02/Raspberry.Pi_.User_.Guide_.pdf

How to relink Oracle binaries after OS upgrade in 11gR2 with Grid Infra?

(1) Shutdown DB, DBconsole (if any), Cluster, ASMlib (if any in Linux)

As RDBMS owner id “oracle”:
$ srvctl stop database -d -o immediate #– run once in any node
$ emctl stop dbconsole #– run on all nodes

As UNIX/Linux “root”:
# /bin/crsctl stop crs #– run on all nodes
# /bin/crsctl disable crs #– run on all nodes
# /etc/init.d/oracleasm stop #– run on all nodes
# /etc/init.d/oracleasm disable #– run on all nodes

(2) Backup filesystem for GI ORACLE_HOME & RDBMS ORACLE_HOME

(3) O/S upgrade

(4) Upgrade ASMlib (if any in Linux, run on all nodes)
# rpm -Uvh oracleasm-support-xxx
# rpm -Uvh oracleasm-2.6.xxx
# rpm -Uvh oracleasmlib-xxx
# /etc/init.d/oracleasm enable
# /etc/init.d/oracleasm lisdisks

(5) Relink RDBMS ORACLE_HOME Binary
Note: complete full steps in onde node, then proceed to next

As RDBMS owner id “oracle”:
$ /bin/relink all

(6) Relink GI ORACLE_HOME Binary
Note: complete full steps in onde node, then proceed to next

As UNIX/Linux “root”:
# cd /crs/install
# ./rootcrs.pl -unlock

As RDBMS owner id “oracle”:
$ cd /bin
$ ./relink all

As UNIX/Linux “root”:
# cd /rdbms/install
# ./rootadd_rdbms.sh
# cd /crs/install
# ./rootcrs.pl -patch

(7) Enable CRS auto-startup and start CRS on all nodes
Note: complete full steps in onde node, then proceed to next

As UNIX/Linux “root”:
# /bin/crsctl start crs
# /bin/crsctl enable crs

(8) Double check if DB, instances and all resrouces are ONLINE.

As RDBMS owner id “oracle”:
$ crsctl stat res -t

Gentle reminder:
Please read the following known bug before you plan for relinking Grid Infra 11.2.0.3.

Bug 16038046 : FAILED TO WRITE THE CHECKPOINT:” WITH STATUS:FAIL.ERROR CODE IS 256

How to test INSERT/UPDATE in Informix BYTE column?

Question:
How to test INSERT/UPDATE in Informix BYTE column?

Preparation:
1. Informix IDS is online and running

2. Informix Client-SDK installed

3. Prepare 2 object files (image1.pdf, image2.pdf)

4. create table testbyte1 (num integer,
file byte);
create unique index byte_idx1 on testbyte1(num) ;

5. Compile “blobload” utility.
– set environment variable $INFORMIXDIR
(where CSDK installed)

– set environment variable PATH=$INFORMIXDIR/bin:$PATH
– you may find “blobload.ec” in $INFORMIXDIR/demo/esqlc
– compile “esql -o blobload blobload.ec”, will get executable binary “blobload”

Test INSERT/UPDATE BYTE column:

6. To get syntax on usage, just type “./blobload”

Usage: blobload {-i | -u} — choose insert or update
-f filename — file containing the blob data
-d database_name — database to open
-t table_name — table to modify
-b blob_column — name of target column
-k key_column key_value — name of key column and a value
-v — verbose documentary output

All parameters except -v are required.
Parameters may be given in any order.
As many as 8 -k parameter pairs may be specified.

7. INSERT BYTE testing.

$ ./blobload -i -f ./image1.pdf -d mytestdb -t testbyte -b file -k num 1001 -v

prepared stmt =
INSERT INTO testblob1( file, num) VALUES( ?, “1001”);

1 row(s) inserted.

8. UPDATE BYTE testing.

$ ./blobload -u -f ./image2.pdf -d mytestdb -t testbyte -b file -k num 1001 -v

prepared stmt =
UPDATE testblob1 SET file = ? WHERE num = “1001”;

1 row(s) updated.

9. Check number of rows:

SQL> select * from testbyte1;

num 1001
file

1 row(s) retrieved.