星期一, 2月 13, 2017

exadata x6-2 可用空間計算方式

http://nnawaz.blogspot.tw/2016/06/calculate-exadata-x6-storage-space.html

 

#exadata x6-2 1/4' 使用normal redunancyASM可用空間為:

 

The calculation is as follows - 
 Size of one disk : 7.1192474365234375TB
Disks per cell node : 12 
No of cell nodes : 3 
 Total size of Disk : 7.119TB  * 12 * 3 = 256.284TB 


Normal Redundancy  = [ Total size of Disk / 2 ] * .85 
= [ 256.284TB / 2 ] * .85 
= 128.142TB * .85 
=> 108.9207TB or 109TB [ The value in the Exadata X6 data sheet ] 

星期三, 1月 25, 2017

[FW] Mount ASM diskgroups with new ASM instance

http://msutic.blogspot.tw/2014/10/mount-asm-diskgroups-with-new-asm.html

 

List Oracle ASM disks mounted to new server.
With "scandisks" command I will find devices which have been labeled as ASM disks.


# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

 

# oracleasm listdisks

DISK1

DISK2

DISK3

DISK4

DISK5

FRA1


Install "Oracle Grid Infrastructure software only" option to avoid automatic Oracle Restart and ASM configuration. This configuration will be performed later manually.

After installation finished run noted perl script as root to configure Grid Infrastructure for a Stand-Alone server.
For my configuration script looks like this:

 

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:

/u01/app/11.2.0.1/grid/perl/bin/perl -I/u01/app/11.2.0.1/grid/perl/lib -I/u01/app/11.2.0.1/grid/crs/install /u01/app/11.2.0.1/grid/crs/install/roothas.pl



Start cssd if it's not running.

# ./crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.cssd

      1        OFFLINE OFFLINE

ora.diskmon

      1        OFFLINE OFFLINE

 

# ./crs_start ora.cssd

Attempting to start `ora.cssd` on member `asterix`

Attempting to stop `ora.diskmon` on member `asterix`

Stop of `ora.diskmon` on member `asterix` succeeded.

Attempting to start `ora.diskmon` on member `asterix`

Start of `ora.diskmon` on member `asterix` succeeded.

Start of `ora.cssd` on member `asterix` succeeded.



Create parameter file for ASM instance in $ORACLE_HOME/dbs directory of Grid Infrastructure.

init+ASM.ora

*.asm_diskstring='/dev/oracleasm/disks'

*.asm_power_limit=1

*.diagnostic_dest='/u01/app/grid'

*.instance_type='asm'

*.large_pool_size=12M

*.remote_login_passwordfile='EXCLUSIVE'



Register and start ASM instance.

1

2

3

4

5

6

7

$ export ORACLE_SID=+ASM

$ export ORACLE_HOME=/u01/app/11.2.0.1/grid

$ srvctl add asm -p $ORACLE_HOME/dbs/init+ASM.ora

 

$ srvctl start asm

$ srvctl status asm

ASM is running on asterix



Now notice what I see when I start ASM configuration assistant.

1

$ ./asmca




These are diskgroups with my database and recovery files.
Click "Mount all" to mount them all.






Install Oracle database software and create parameter file in "$ORACLE_HOME/dbs" to start database.

$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

$ export ORACLE_SID=ora11gr2

 

$ cd $ORACLE_HOME/dbs

$ cat initora11gr2.ora

*.spfile='+DATA1/ora11gr2/spfileora11gr2.ora'

 

$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 29 14:29:37 2014

 

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

 

Connected to an idle instance.

 

SQL> startup

ORACLE instance started.

 

Total System Global Area  668082176 bytes

Fixed Size                  2216344 bytes

Variable Size             222301800 bytes

Database Buffers          436207616 bytes

Redo Buffers                7356416 bytes

Database mounted.

Database opened.

SQL>

SQL>

SQL> select name from v$datafile;

 

NAME

--------------------------------------------------------------------------------

+DATA1/ora11gr2/datafile/system.297.844627929

+DATA1/ora11gr2/datafile/sysaux.265.844627967

+DATA1/ora11gr2/datafile/undotbs1.266.844627991

+DATA1/ora11gr2/datafile/users.267.844628031

+DATA2/ora11gr2/datafile/marko.261.859213577



Database is successfully opened and you can register instance using SRVCTL command.

$ srvctl add database -d $ORACLE_SID -o $ORACLE_HOME -p $ORACLE_HOME/dbs/initora11gr2.ora

$ srvctl start database -d $ORACLE_SID



Final status.

$ ./crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA1.dg

               ONLINE  ONLINE       asterix

ora.DATA2.dg

               ONLINE  ONLINE       asterix

ora.FRA1.dg

               ONLINE  ONLINE       asterix

ora.asm

               ONLINE  ONLINE       asterix                  Started

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.cssd

      1        ONLINE  ONLINE       asterix

ora.diskmon

      1        ONLINE  ONLINE       asterix

ora.ora11gr2.db

      1        ONLINE  ONLINE       asterix                  Open



Be aware that this demo is performed in virtual environment on my notebook.

星期三, 1月 18, 2017

11g physical standby database 讓其固定在特定的scn number

11g physical standby database 讓其固定在特定的scn number

主要是方便拿來做testing/ 或是OGG initial使用, 不會造成primary db loading.

 

alter database recover managed standby database cancel;

 

--where scn is the value of the CURRENT_SCN field of V$DATABASE plus 1.

--所以在primary db查到的current_scn 會是9606671794378

alter database recover automatic standby database until change 9606671794379;

 

oracle 11g 新特性密碼延遲驗證引發的 血案

ref:

High 'library cache lock' Wait Time Due to Invalid Login Attempts (Doc ID 1309738.1)

SQL>

 

--To disable the wait between login failures

alter system set event ="28401 TRACE NAME CONTEXT FOREVER, LEVEL 1" scope=spfile sid='*';

 

--To enable the wait between login failures

SQL>

alter system set event ="28401 TRACE NAME CONTEXT OFF" scope=spfile sid='*';

 

ref:

http://www.cddba.com/2013/04/07/oracle11g-%E5%AF%86%E7%A0%81%E5%BB%B6%E8%BF%9F%E9%AA%8C%E8%AF%81%E6%B5%8B%E8%AF%95%E4%B8%89/

 

ref:

http://blog.csdn.net/mchdba/article/details/51794443

oracle 11g 新特性密碼延遲驗證引發的 血案

PS:據說在oracle 11g的最後一個版本 11.2.0.4已經徹底修復了這個bug

 

星期三, 12月 14, 2016

Oracle 11.2.0.3/ 11.2.0.4 RAC asm timeout調整

Ref: http://hsbxxl.blog.51cto.com/181620/1609883

 

Sympom:

11.2.0.3 or 11.2.0.4 RAC如遇到multipath mpio切換或斷線時,因為Redhat Linux 6 Disk timeout 60(default)

ASM heart beat timeout 15, 所以在災難發生時,FC path回復之前,ASM就偵測到dead path,

隨即會把Diskgroup dismount…

 

解決方法

 

是加大_asm_hbeatiowait , 從預設的15 加大到120 (12.1.0.2 以後Oracle已經放大此參數到120)

設定方法:

1.      alter system set "_asm_hbeatiowait"=<value> scope=spfile sid='*';.

2.      設定後須重啟GRID / ASM Instance

 

 

--

另外for 10.2.0.4 RACtimeout Tuning部分請參考這一篇:

http://jaychu649.blogspot.tw/2012/01/patch-list-for-oracle-10g.html

RAC nodes 在比較忙的時候,會因為cssd health check timeout 造成reboot現象,需放大這個health check 機制。

 

星期四, 9月 29, 2016

FW: 如何在Redhat Linux 5 上面安裝Oracle 9i Database


Oracle 9.2.0.4 real installation guide for RHEL-5 64-BIT
1. Make sure Java libraries are up to date.. (sysad side..)

2. Do not start installation from the 9204 base installation- Oracle Universal Installer has problem

2.1 Install first the OUI "only" from the 9206 patchset (p3948480_9206_Linux-x86-64.zip)
using the Oracle_Home youve just decided

2.2 In ../Disk1/install/oraparam.ini edit the Linux value under [Certified Versions]
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-
* value must include redhat-5 inorder to suppress the error message for OS version incompat.

2.3 After completion of OUI install, edit again ../product/9204/oui/oraparam.ini as instructed
in step 2.2

2.4 Now install the 9204 base using the OUI from 9206. Run ../product/9204/oui/runInstaller BUT
this time, select the "products.jar" from 9204 base installation set.
(ex: /u01/app/oracle/Disk1/stage/products.jar)

2.5 From here u should be able to install the SOFTWARE ONLY option. DO NOT create a database yet.
 
3. Patch the 9204 base with the 9207 patchset (p4163445_92070_Linux-x86-64.zip)

3.1 After decompressing contents, repeat step 2.2 again to suppress OS version incompat.

3.2 Now proceed with the patch application
 
4. You can now create a database using the "dbca" utility.

-------
Real Tests
ref:
Please Ref : http://road-to-ocm.blogspot.tw/2012/07/oracle-9204-real-installation-guide-for.html
and
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/pdf/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/Red_Hat_Enterprise_Linux-5-Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases-en-US.pdf


vi /etc/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-398.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-398.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet elevator=deadline
        initrd /initrd-2.6.18-398.el5.img


Tuning the Page Cache
echo "vm.pagecache=40" >> /etc/sysctl.conf
echo "vm.min_free_kbytes=1024" >> /etc/sysctl.conf
echo "vm.swappiness=10" >> /etc/sysctl.conf
echo "kernel.shmmni=4096" >> /etc/sysctl.conf
echo "kernel.shmall=2097152" >> /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max=65536" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=262144" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=1024 65000" >> /etc/sysctl.conf

groupadd dba -g 501
mkdir -p /home/oracle
mkdir -p /u01
mkdir -p /u02
useradd -c "Oracle Software Owner" -g dba -u 502 -m -d /home/oracle -s /bin/bash oracle
chown -R oracle:dba /oracle /u01 
chmod -R 755 /u01

vi /home/oracle/.bash_profile

ORACLE_BASE=/u01; export ORACLE_BASE
ORACLE_HOME=/u01/db920 ;export ORACLE_HOME
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
ORACLE_TERM=xterm ;export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin; export PATH
ORACLE_SID=orcl; export ORACLE_SID

#export LD_ASSUME_KERNEL=2.4.19
umask 022

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib:/lib64:/lib:/usr/lib64:/usr/lib:/usr/local/lib64:/usr/local/lib:/usr/bin; export LD_LIBRARY_PATH
unset USERNAME

vi /etc/security/limits.conf
oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536

-Add or edit the following line in the /etc/pam.d/login file            
session     required     pam_limits.so 

-Add the following lines to /etc/profile:
 if [ $USER = "oracle" ]; then
       if [ $SHELL = "/bin/ksh" ]; then
             ulimit -p 16384
             ulimit -n 65536
             else
             ulimit -u 16384 -n 65536
       fi
 fi

[root@rhel5 install]# mount /dev/cdrom /mnt

[root@rhel5 install]# head -n1 /mnt/.discinfo
1409145026.642170

vi /etc/yum.repos.d/rhel5.repo
[rhel5-Server] 
mediaid=1409145026.642170
name=RHEL5-Server
baseurl=file:///mnt/Server
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
enabled=1 
gpgcheck=1

rpm -qa |egrep 'binutils|compat-db|compat-libstdc++|control-center|gcc|glibc|glibc-common|glibc-devel|ksh|libaio|libgcc|libgnome|libgnomeui|libgomp|libstdc++|libstdc++-devel|libXp|make|sysstat'
|sort

yum install -y binutilsbinutils
yum install -y compat-db
yum install -y compat-libstdc++-33
yum install -y control-center
yum install -y gcc
yum install -y glibc
yum install -y glibc-common
yum install -y glibc-devel
yum install -y ksh
yum install -y libaio
yum install -y libgcc
yum install -y libgnome

yum install -y libgnomeui
yum install -y libgomp
yum install -y libstdc++
yum install -y libstdc++-devel
yum install -y libXp
yum install -y make
yum install -y sysstat

另外需安裝 
libXp-1.0.0-8.i386.rpm  (java plugin required)
sysstat-7.0.2-1.el5.i386.rpm

xhost +

vi /u01/source/Disk1/install/oraparam.ini
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8

su - oracle
/u01/source/Disk1/runInstaller  --> Install OUI only

After completion of OUI install, edit again /u01/db920/oui/oraparam.ini as instructed
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8


cd /u01/source/Oracle_9i_R2_92040_Database_Linux_x86_64bit
gunzip amd64_db_9204_Disk1.cpio.gz
gunzip amd64_db_9204_Disk2.cpio.gz
gunzip amd64_db_9204_Disk3.cpio.gz

cpio -idcmv < amd64_db_9204_Disk1.cpio
cpio -idcmv < amd64_db_9204_Disk2.cpio
cpio -idcmv < amd64_db_9204_Disk3.cpio

Now install the 9204 base using the OUI from 9206. Run /u01/db920/oui/bin/runInstaller BUT
this time, select the "products.jar" from 9204 base installation set. 
(ex: /u01/source/Oracle_9i_R2_92040_Database_Linux_x86_64bit/Disk1/stage/products.jar)

From here u should be able to install the SOFTWARE ONLY option. DO NOT create a database yet.

#do the following and choose to continue if prompt error
-bash-3.2$  mkdir -p /u01/db920/Apache/Apache/conf
-bash-3.2$ cp /u01/db920/oracle.apache.apache/conf/oracle_apache.conf /u01/db920/Apache/Apache/conf/.
-bash-3.2$ cp /u01/db920/oracle.apache.apache/ports.ini /u01/db920/Apache/Apache/ports.ini
-bash-3.2$ echo "s_jservPort = 7775" >> /u01/db920/oracle.apache.apache/ports.ini 
-bash-3.2$ cp /u01/db920/oracle.apache.apache/ports.ini /u01/db920/oracle.apache/.


Patch the 9204 base with the 9208 patchset

After decompressing contents, repeat edit /u01/source/Disk1/install/oraparam.ini again to suppress OS version incompat.
Linux=redhat-2.1AS,redhat-2.1,redhat-3,UnitedLinux-1.0,SuSE-9,SuSE-8
->
Linux=redhat-2.1AS,redhat-2.1,redhat-3,redhat-4,redhat-5,UnitedLinux-1.0,SuSE-9,SuSE-8

You can now create a database using the "dbca" utility

星期四, 7月 07, 2016

informix Enterprise replication

 

Informix 內建之enterprise replication 可以針對表格-表格同步, 或是當作DR備援使用

也可挑選表格所需要的部分欄位, 可設定多個thread來加速同步速度

例如

Select A , B , D from source.tab…..    (ignore C欄位)

如果要做到資料彙整、數值比對、計算之類的事情, 還是要仰賴ETL工具來實現

 

Ref:

http://iiug2015.org/files/IIUG2015Petr_PomykacekMigr_ER_Petr_Pomykacek-final.pdf

http://www.oninit.com/manual/informix/100/25122791.pdf

 

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...