Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Oracle Case Insensitive Sorts & Compares

Features of Oracle 10gR2 but this article is very useful for me. It explain very clearly about case insensitive
Here is the content of article
Thank you! Natalka Roshak.

To get us started, here's a simple sample table with a few rows in it.
SQL> select * from invoice_demo order by invoice_id
SQL> /

INVOICE_ID SUPPLIER_NAME
---------- ------------------------------
      1000 Max Books
      1001 MAX BOOKS
      1002 max books
      1003 janus pet supply

Insert unicode character into Oracle

1. Check & set some database parameters

    select * from nls_database_parameters where parameter like '%SET';

2. Set environment in your PC or your Server (important) 

2.1. Your PC (window) 
- Right click to MyComputer > Properties > Advance system settings > Environment variables > system variables
- Click new, add new variable:
    name: NLS_LANG
    value: AMERICAN_AMERICA.AL32UTF8

- Try to log out/ log in again or restart your PC

2.2. Your linux server
Run command: 
   export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Or insert this command at the end of   /etc/profile

Configure at the end of file: php/etc/php-fpm.conf 
env[NLS_LANG] = $NLS_LANG

Restart php-fpm 


OCFS2 cluster – quick setup guide



OCFS2 is a POSIX-compliant shared-disk cluster file system for Linux capable of providing both high performance and high availability. Cluster-aware applications can make use of parallel I/O for higher performance. OCFS2 is mostly used to host Oracle Real application clusters (RAC) database on Linux clusters.

The below steps shows how to create ocfs2 filesystem on top a multipath’d SAN lun and mount it on Linux clusters.

1. Identify the nodes that will be part of your cluster.

2. Export/Zone the LUNs on the SAN end and check whether they are accessible on all the hosts of the cluster. (fdisk -l or multipath -ll)

3. If you need multipathing, configure multipath and the multipathing policy based on your requirement. For Linux multipath setup, refer Redhat’s multipath guide.

4. Create OCFS2 configuration file (/etc/ocfs2/cluster.conf) on all the cluster nodes.