You are on page 1of 13

INFORMIX HDR

High Availability Data ReplicationHDRHDR

DMLData Manipulation Language


HDR

HDR Informix 6

Informix 11.5 HDR


Informix 11.5 HDR HDR
hot standby
informix HDR

primary: server beijing
standby: server shanghai,

Redhat AS 5

:192.168.1.200/192.168.1.210
informix
IBM Informix Dynamic Server Version 11.70.UC1IE
informix informix HDR
HDR
informix HDR
IDS version (OS )
a. Root Dbspace
ROOTNAME
ROOTOFFSET
ROOTPATH
ROOTSIZE

ROOTNAME rootdbs
ROOTPATH $INFORMIXDIR/hdr/rootdbs
ROOTOFFSET 0
ROOTSIZE 1000000
MIRROR root dbspace

MIRROR
MIRROPATH
MIRROROFFSET

informix INFORMIXDIR

PHYSBUFF
PHYSILE

LOGBUFF
LOGFILES
LOGSIZE
DYNAMIC_LOGS
HDR
DRAUTO
DRINTERVAL
DRTIMEOUT

DRAUTO 0
DRINTERVAL -1
DRTIMEOUT 30
HDR
ENCRYPT_HDR
ENCRYPT_CIPHERS
ENCRYPT_MAC
ENCRYPT_SWITCH
ENCRYPT_MACFILE

informix 11.5
UPDATABLE_SECONDARY 1

SERVERNUM 0/1
DBSERVERNAME beijing/shanghai
1.
HDR HDR

RSH
rsh

#chkconfig | grep rsh


rsh: on
Informix rsh
Informix
I/O
/home/informix .rhosts
primary .rhosts IP :standby 192.168.1.210
standby .rhosts IP :primary 192.168.1.200
.rhosts 600

chmod 600 .rshosts


rsh
primary informix
$rsh standby hostname
stadnby
standby informix
$rsh primary hostname
primary
informix redhat AS RSH RedHat
Linux RSH
2.
beijing sqlhosts shanghai
shanghai onsoctcp 192.168.1.210 sqlexec1
shanghai sqlhosts
beijing onsoctcp 192.168.1.200 sqlexec2
sqlhosts
beijing onsoctcp 192.168.1.200 sqlexec2
shanghai onsoctcp 192.168.1.210 sqlexec1
3./etc/services
/etc/services
sqlexec1 8088/tcp
sqlexec2 8089/tcp
4. UDRUDTDataBlade
UDRUDTDataBlade
UDRUDTDataBlade,
5. primary
$onmode -d primary shanghai
primary beijing HDR
shanghai
6.
HDR
$oninit -ivy

informix online ,
ontape

$onmode ky
dbspace chunk chunk chunk
chunk.

touch $INFORMIXDATA/datachunk
chmod 660 $INFORMIXDATA/datachunk
7. primary 0
informix ontape
STDIO
0

$ontape -s -L 0 -t STDIO -F|rsh 192.168.1.210 . ~/.bash_profile;ontape -p -t STDIO


/.bash_profile; informix
informix
standby shanghai not initialized initialization Fast
Recovery
$onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE Initialization Up 00:35:23 152348 Kbytes
$onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE Fast Recovery Up 00:35:23 152348 Kbytes
8.
$onmode -d secondary beijing
standby shanghai HDR
beijing
9.
standby shanghai Fast Recovery Updatable(Sec)

$ onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE Updatable (Sec) Up 00:35:35 152348 Kbytes
$ onstat -g dri
IBM Informix Dynamic Server Version 11.70.UC1IE Updatable (Sec) Up 00:35:57 152348 Kbytes
Data Replication at 0x4b4241a0:
Type State Paired server Last DR CKPT (id/pg) Supports Proxy Writes
HDR Secondary on shanghai 22 / 23 Y
DRINTERVAL -1
DRTIMEOUT 30
DRAUTO 0
DRLOSTFOUND /opt/IBM/informix/etc/dr.lostfound
DRIDXAUTO 0
ENCRYPT_HDR 0
Backlog 0

$onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE On-Line (Prim) Up 00:42:17 152348 Kbytes
$onstat -g dri
IBM Informix Dynamic Server Version 11.70.UC1IE On-Line (Prim) Up 00:42:21 152348 Kbytes
Data Replication at 0x4b4241a0:
Type State Paired server Last DR CKPT (id/pg) Supports Proxy Writes
primary on beijing 22 / 23 NA
DRINTERVAL -1
DRTIMEOUT 30
DRAUTO 0
DRLOSTFOUND /opt/IBM/informix/etc/dr.lostfound
DRIDXAUTO 0
ENCRYPT_HDR 0
Backlog 0
HDR

informix
10.HDR
HDR IDS
UPDATABLE_SECONDARY
11.50 0 2(CPU VP), CPU VP CPU
0
(delete/insert/update) Updatable (Sec) 0 select
Read-Only (Sec)

DRINTERVAL
-1
logical log buffer
-1

DRAUTO
0 Manual
1 Retain server type
2 Reverse server type
3 Connection Manager Arbitrator controls
HDR IDS 1 2
3 HDR DRAUTO 1
DRAUTO 2
DRTIMEOUT
HDR
DRLOSTFOUND

DRIDXAUTO
01

ENCRYPT_HDR 01
ENCRYPT_CIPHERS
ENCRYPT_MAC off, low, medium, high
ENCRYPT_SWITCH 60,60
ENCRYPT_MACFILE BUILDIN
HDR ENCRYPT_HDR 1
IDS11.5 DES, des3 , desx, aes ENCRYPT_CIPHERS all,

ENCRYPT_MAC
ENCRYPT_SWITCH
HDR
ENCRYPT_MACFILE
BUILDIN IDS GenMacKey
IDS HDR
informix HDR
1.
$ onstat -c|grep DRAUTO
# DRAUTO Controls automatic failover of primary
DRAUTO 0 -
$onmode -ky
sercondary
onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE Updates Blocked (Sec) Up 00:20:14 152348 Kbytes
$onstat -m
IBM Informix Dynamic Server Version 11.70.UC1IE Updates Blocked (Sec) Up 00:21:16 152348 Kbytes
Message Log File: /opt/IBM/informix/informix.log
11:04:33 Fri Jun 3 loguniq 22, logpos 090018, timestamp: 0xd0612 Interval: 527
11:04:33 Maximum server connections 0
11:04:33 Checkpoint Statistics Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 19, Llog used 0
11:05:40 Checkpoint Completed: duration was 0 seconds.
11:05:40 Fri Jun 3 loguniq 22, logpos 092018, timestamp: 0xd0618 Interval: 528
11:05:40 Maximum server connections 0
11:05:40 Checkpoint Statistics Avg. Txn Block Time 0.000, # Txns blocked 0, Plog used 2, Llog used 0
11:05:41 SMX thread is exiting because of network error code -25582
11:05:41 SMX thread is exiting because of network error code -25582
11:05:41 DR: Receive error
11:05:41 ASF Echo-Thread Server: asfcode = -25582: oserr = 0: errstr = : Network connection is broken.
11:05:41 DR_ERR set to -1
11:05:42 DR: Turned off on secondary server
11:05:42 Updates from secondary currently not allowed
11:05:42 Updates from secondary currently not allowed
primary
$oninit
$onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE On-Line (Prim) Up 00:00:41 144156 Kbytes
secondary
$onstat -
IBM Informix Dynamic Server Version 11.70.UC1IE Updatable (Sec) Up 00:23:55 152348 Kbytes

2. chunk dbspace
HDR / chunks/dbspace

HDR
link

chunk
$touch /opt/IBM/informix/dbspaces/testdbs
$chmod 660 /opt/IBM/informix/dbspaces/testdbs
primary
$ onspaces -c -d testdbs -p /opt/IBM/informix/dbspaces/testdbs -o 0 -s 1000
Verifying physical disk space, please wait
Space successfully added.
** WARNING ** A level 0 archive of Root DBSpace will need to be done.

3.
DRAUTO 0

primary
$onmode -ky
secondary
$onmode -d standard
$onmode -d primary shanghai
primary :
$onmode -ky
$oninit -PHY
$onmode -d secondary beijing
informix chunk

Sun Jun 19 15:30:19 2011


15:30:19 Warning: ONCONFIG dump directory (DUMPDIR) /opt/informix/temp has insecure permissions
15:30:19 Event alarms enabled. ALARMPROG = /opt/informix/etc/alarmprogram.sh
15:30:19 Booting Language <c> from module <>
15:30:19 Loading Module <CNULL>
15:30:19 Booting Language <builtin> from module <>
15:30:19 Loading Module <BUILTINNULL>
15:30:25 Requested shared memory segment size rounded from 1176KB to 2048KB
15:30:25 IBM Informix Dynamic Server Version 9.40.UC7 Software Serial Number AAA#B000000
15:30:30 IBM Informix Dynamic Server Initialized Shared Memory Initialized.
15:30:30 Physical Recovery Started at Page (3:36643).
15:30:31 Physical Recovery Complete: 3555 Pages Examined, 3424 Pages Restored.
15:30:31 Logical Recovery Started.
15:30:31 20 recovery worker threads will be started.
15:30:32 Assert Warning: I/O read chunk 13, pagenum 9449, pagecnt 1 > errno = 9
15:30:32 IBM Informix Dynamic Server Version 9.40.UC7
15:30:32 Who: Session(12, informix@itellin2, 0, 9105f1d8)
Thread(61, xchg_1.6, 910339f8, 7)
File: rsbuff.c Line: 5070
15:30:32 Action: Please notify IBM Informix Technical Support.
15:30:32 stack trace for pid 17514 written to /opt/informix/temp/af.425a598
15:30:32 See Also: /opt/informix/temp/af.425a598
15:30:32 I/O read chunk 13, pagenum 9449, pagecnt 1 > errno = 9
15:30:32 Rollforward of log record failed. iserrno = 172
15:30:32 Log Record: log = 215146, pos = 0xa332c4, type = OLDRSAM:HINSERT(40), trans = 14
15:30:42 Assert Warning: Chunk 5 is being taken OFFLINE. //
15:30:42 IBM Informix Dynamic Server Version 9.40.UC7
15:30:42 Who: Session(12, informix@itellin2, 0, 9105f1d8)
Thread(61, xchg_1.6, 910339f8, 7)
File: rsmirror.c Line: 1887
15:30:42 Results: Dynamic Server will block at next checkpoint
15:30:42 Action: Shutdown (onmode -k) or override (onmode -O)
15:30:42 stack trace for pid 17514 written to /opt/informix/temp/af.425a598
15:30:42 See Also: /opt/informix/temp/af.425a598
15:30:42 Chunk 5 is being taken OFFLINE . //
15:30:42 Rollforward of log record failed. iserrno = 172
15:30:42 Log Record: log = 215146, pos = 0xa332c4, type = OLDRSAM:HINSERT(40), trans = 14
15:30:42 Rollforward of log record failed. iserrno = 101
15:30:42 Log Record: log = 215146, pos = 0xa3e130, type = OLDRSAM:DELITEM(29), trans = 101
15:30:42 Rollforward of log record failed. iserrno = 101
15:30:42 Log Record: log = 215146, pos = 0xa3e130, type = OLDRSAM:DELITEM(29), trans = 101
15:30:42 Rollforward of log record failed. iserrno = 101
15:30:42 Log Record: log = 215146, pos = 0xa3e184, type = OLDRSAM:DELITEM(29), trans = 101
15:30:42 Rollforward of log record failed. iserrno = 101
15:30:42 Log Record: log = 215146, pos = 0xa3e184, type = OLDRSAM:DELITEM(29), trans = 101
15:30:42 Rollforward of log record failed. iserrno = 101
15:30:42 Log Record: log = 215146, pos = 0xa3e6e4, type = OLDRSAM:DELITEM(29), trans = 101
15:30:42 Rollforward of log record failed. iserrno = 101

workdbs chunk
hang dbspace workdbs
i/o worksbs
chunk dbspace
Dbspaces
address number flags fchunk nchunks flags owner name
d671e158 1 1 1 1 N informix rootdbs
d6749090 2 1 2 1 N informix logdbs
d6749150 3 1 3 1 N informix phydbs
d6749210 4 2001 4 2 NT informix tempdbs
d67492d0 5 5 6 30 ND informix workdbs
5 active, 2047 maximum
Chunks
address chk/dbs offset size free bpages flags pathname
d671e218 1 1 20 63500 62409 PO- /dev/vgdata/rlvrootdbs
d671e920 2 2 20 500000 349947 PO- /dev/vgdata/rlvlogdbs
d671ea28 3 3 20 500000 199947 PO- /dev/vgdata/rlvphydbs
d671eb30 4 4 20 250000 249947 PO- /dev/vgdata/rlvtempdbs1
d671ec38 5 4 20 250000 249997 PO- /dev/vgdata/rlvtempdbs2
d671ed40 6 5 20 1000000 0 PD- /dev/vgdata/rlvworkdbs1
d671ee48 7 5 20 1000000 0 PD- /dev/vgdata/rlvworkdbs2

d6748f88 35 5 20 1000000 0 PD- /dev/vgdata/rlvworkdbs30


35 active, 2047 maximum
chunk
1
1.1 chunk I/O Chunk I/O CHUNK
PDInformix sanity
check
chunk Informix Informix online.log
08:39:58 IBM Informix Dynamic Server Version 9.40.FC4 08:39:58
Who: Session(1, informix@HBDB84_1, 0, c000000000b63028)
Thread(15, main_loop(), c000000000b21028,
3)File: rspartn.cLine: 7747 08:39:58
Results: Chunk 117 is being taken OFFLINE.08:39:58
Action: Restore chunk from archive.08:39:58
stack trace for pid9747 written to /tmp/af.3f7f15e 08:39:58
See Also: /tmp/af.3f7f15e 08:39:59 chunk failed sanity check 08:39:59 I/O error,
Primary Chunk /opt/informix/chunks/npmhis2008 _data/npmdb_npmchk_07 Offline (sanity)
1.2 Oncheckpr Informix
oncheck-pr
offlineoncheck-pr |grepffline
Chunk number 73 Flags 010020 Chunk is offline
Chunk path /opt/informix/chknew/npm/hpmchk1_b Chunk offset 5
(p) Chunk size 10000000
(p) Number of free pages 6723197 DBspacenumber 38
1.3 Onstatd Chunk onstat -dfree 0
chunk PD onstat-d |grepPD
Chunksaddress chunk/dbsoffset size free bpagesflags pathnamec00000020a8434f0 73 38 5 10000000 0 PD-
B /opt/informix/chknew/npm/hpmchk1_b
1.4sane_chopenafwarn_interface chunk sanity
check,
( 0) legacy_hp_afstack
( 1) afstack
( 2) afhandler
( 3) afwarn_interface
( 4) sane_chopen
( 5) chopen_util
( 6) chopen
( 7) rscon
( 8) aud_iscon
( 9) chgstat
(10) onspace
(11) startup
(12) resume
Chunk/Dbspace DBA Informix
Informix
2
2.1
2.2
2.3 I/O :
dd if=/opt/informix/chknew/npm/hpmchk1_b of=/dev/null count=20000
2.4 informix:informix 660
:
ls-lt/opt/informix/chknew/npm/hpmchk1_b

3
3.1 Informix

3.2 LV LV Informix DBA


;
onspaces-s <spacename> -p <path> -o <offset> -O -y
3.3
Informix
chown informix:informix /opt/informix/chknew/npm/hpmchk1_bchmod660
/opt/informix/chknew/npm/hpmchk1_b
3.4 DD Informix

3.5 onstat -d

4
Informix (Chunk/Dbspace)
rootdbspacephysical log dbspacelogical log dbspace

4.1 Informix 53
rootdbspace 53
onspaces-d
/home/informix/940:oncheck -petestdbsDBspaceUsage Report: testdbsOwner:
informixCreated: 10/13/2009Chunk Pathname Size Used Free2 ./dsk/gydbs1000 53 947
Description Offset Size RESERVED PAGES 0 2
CHUNK FREELIST PAGE 2 1testdbs:informix.
TBLSpace3 50FREE 53 947
Total Used: 53Total Free: 947
4.2 onspaces -d
4.3
drop table drop database Informix


ONDBSPACEDOWN 2 # Dbspace down option: 0 = CONTINUE, 1 = ABORT, 2 = WAIT
DATASKIP off # List of dbspaces to skip
chunk dbspace D dbspace,
dbspace

You might also like