http://iotn.co.kr ¿¬¶ôó: gilho.kr@gmail.com [ The Japanese government should apologize to Japanese Military Sexual Slavery victim. / ìíÜâïÙݤªÏìíÜâÏÚªÎàõîÜÒ¿ÖË?ßåíºªËÞóñªª¹ªÙª­. ]

»ç¿ëÀÚ

ID:
PW:

INDEX
01.°Ô½ÃÆÇ
°Ô½ÃÆÇ [71]
02.File Book
File ÀÚ·á½Ç [95]
Site Link [17]
°³ÀÎÆú´õ [200]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [18]
MySQL [41]
DB2 [79]
ORACLE [2955]
PSQL [132]
±âŸÁ¤º¸ [155]
¿î¿µÃ¼Á¦ [591]
04.Q/A Book
Q/A [53]
05.¹æ¸í·Ï
¹æ¸í·Ï [54]
·¹º§¾÷ [37]
±¸ÀÎ/±¸Á÷ [2]

±â³äÀÏ
Search
LINK
+ °¡Á· Hompy
+ DNSEver
IOTN :: Field Book :: Altibase

 È¸¿ø°¡ÀÔ

altibase replication test
ÃÖ±æÈ£ [LIST]   2016-11-17 12:41:53, Á¶È¸ : 2,012

grep PORT $ALTIBASE_HOME/conf/altibase.properties
PORT_NO                = 20300
REPLICATION_PORT_NO    = 20301
//
PORT_NO                = 22300
REPLICATION_PORT_NO    = 22301

select count(*) from v$statement where execute_flag = 1;    # ¼öÇà ÁßÀÎ statement

select name from v$datafiles;
create tablespace tester1 datafile '/home/altibase/data/tester1.dbf' size 10m
autoextend on next 20m maxsize unlimited;

create user tester1 identified by pwd default tablespace tester1;

connect tester1/pwd
create table tester1.test1 ( i1 integer primary key, i2 char(10));

drop replication rep
-- node1
create replication rep with '192.168.20.5',22301 from tester1.test1 to tester1.test1;
-- node2
create replication rep with '192.168.20.5',20301 from tester1.test1 to tester1.test1;

insert into tester1.test1 select level,level from dual connect by level <=100;
insert into tester1.test1 select level,level from dual where level > 100 connect by level <=150;
select count(1) from tester1.test1 ;

// ¼­ºñ½º test:  node2 down / node1 data insert / node2 start [ ÀÚµ¿Àû¿ë ] / È®ÀÎ
node2$ server stop [ ÁßÁö ]
node1> delete tester1.test1 ; [ rollback ¾ÈµÊ [default] , ¿É¼ÇÁÖ¸é °¡´ÉÇÒÁöµµ ]
node1> insert into tester1.test1 select level,level from dual connect by level <=100;
node2$ server start [ ÀÚµ¿ Àû¿ë ]

// Ä÷³ º¯°æ
node1,node2>
alter replication rep stop;
alter replication rep drop table from tester1.test1 to tester1.test1;
alter system set REPLICATION_DDL_ENABLE=1;
alter table tester1.test1 add column ( i3 varchar(10));
alter system set REPLICATION_DDL_ENABLE=0;
alter replication rep add table from tester1.test1 to tester1.test1;
<<¿Ï·á>>
// ÁøÇàÁß ¿¡·¯
alter table tester1.test1 add column ( i3 varchar(10));
[ERR-312C4 : Cannot execute this DDL on a replicated table when the system property REPLICATION_DDL_ENABLE is 0.]
>> alter system set REPLICATION_DDL_ENABLE=1;
iSQL> alter replication rep drop table from tester1.test1 to tester1.test1;
[ERR-6106F : You cannot drop only one replicated table.]
>> create table sys.rep1 (id integer primary key );
>> alter replication rep add table from sys.rep1 to sys.rep1;

// Ãß°¡ º¯°æ
alter replication rep stop
alter replication rep add host 'ip','port';

// °ü·Ã Á¤º¸ È®ÀÎ
select * from v$repreceiver;
select * from v$repsender;
select * from system_.SYS_REPLICATIONS_ ;
SELECT rep_name, rep_gap FROM v$repgap;
select replication_name||': '||local_user_name||'.'||local_table_name from system_.sys_repl_items_ order by replication_name;



// insert conflict test
tail -f $ALTIBASE_HOME/trc/altibase_rp.log
node1,node2>
alter replication rep stop;
node1> insert into tester1.test1 values(1000,'node1');
node2> insert into tester1.test1 values(1000,'node2');
alter replication rep start;
select * from tester1.test1 where i1=1000;
node1: i1=1000 ,i2=node1
node2: i1=1000 ,i2=node2
delete tester1.test1 where i1=1000;
//
// test with replication_insert_replace=1
alter system set replication_insert_replace=1;
>> [ ¸ÕÀú ½ÇÇàÇÑ°Ô sync ¶Ç´Â ¼­·Î ¹Ù²î±âµµÇÑ´Ù.]
node1: i1=1000 ,i2=node2
node2: i1=1000 ,i2=node1

// delete conflict test
node1>
insert into tester1.test1 values(10,'test');
alter session set replication=false;
insert into tester1.test1 values(1000,'node1');
node2>
alter session set replication=true;
delete from tester1.test1 ;

// update conflict test
node1>
alter session set replication=false;
insert into tester1.test1 values(1000,'node1');
node2>
alter session set replication=false;
insert into tester1.test1 values(1000,'node2');
node1>
alter session set replication=true;
update tester1.test1 set i2='test' where i1=1000;
>> node2 ¹Ý¿µµÇÁö ¾Ê´Â´Ù.
>> node2$ $ALTIBASE_HOME/trc/altibase_rp.log
>> [2016/11/22 17:40:54] [Thread-1096284480] [Level-2]
>> ERR-61035(errno=0) [Receiver] An update conflict occurred.
>> [2016/11/22 17:40:54] [Thread-1096284480] [Level-3]
>> UPDATE TESTER1.TEST1 SET I2 = test       WHERE I1 = 1000;

iSQL> alter replication rep sync;
[ERR-6100D : [Sender] Failed to handshake with the peer server (Handshake Process Error)]
=> ip,port check

[ERR-311B1 : The user must have CREATE_ANY_TABLE privilege(s) to execute this statement.]
=> alter user tester1 access tester1 on;

iSQL> drop table tester1.test1;
[ERR-3103F : No DDL statement may be executed on a replicated table.]
iSQL> create replication rep with '127.0.0.1',22301 from tester1.test1 to tester1.test1;
[ERR-31088 : A replicated table must have a primary key. (TESTER1.TEST1)]

http://support.altibase.com/kr/faq-view?no=163
http://a07274.tistory.com/89
44.200.145.223


  LIST

Á¦¸ñ ÀÛ¼ºÀÚ ÀÛ¼ºÀÏ Á¶È¸
Admin  dbf À§Ä¡ È®ÀÎ / »èÁ¦ / create database [$ server create MS949 UTF8 ] / ¼­ºñ½º ½ÃÀÛ    ÃÖ±æÈ£ 2020/10/08 366
Troubleshoot  [FAILURE] Unable to invoke the open() function on [/home/altibase/altibase-HDB-server-6.1.1-2/logs/logfile100]    ÃÖ±æÈ£ 2020/10/07 436
Admin  ÁÖ¼Ò iloader in [ csv data import ]    ÃÖ±æÈ£ 2020/10/07 337
Admin  altibase replication test    ÃÖ±æÈ£ 2016/11/17 2012
Backup & Recovery  hot backup script [ alter database backup database to '/backup/'; ]    ÃÖ±æÈ£ 2016/10/02 1255
Admin  -- ¸ðµç Å×ÀÌºí    ÃÖ±æÈ£ 2016/10/02 4277
Admin  [ERR-110A4 : Backup in progress. Please wait until the current backup is completed.]    ÃÖ±æÈ£ 2016/10/02 784
Admin  Sybase IQ 15.2 evaluation software    ÃÖ±æÈ£ 2013/08/21 2935
Admin  alter database rename datafile    ÃÖ±æÈ£ 2013/07/27 4210
Backup & Recovery  aexport lv:9   ÃÖ±æÈ£ 2013/07/22 1385
Admin  alter tablespace ts_disk1 alter datafile '/altibase/6.1/dbs/tbs_disk1_200.dbf' autoextend on next 200m maxsize unlimited;    ÃÖ±æÈ£ 2013/04/13 2845
Troubleshoot  [FAILURE] The data file '/altibase/6.1/dbs/SYS_TBS_MEM_DIC-0-0' has an invalid header. lv:9   ÃÖ±æÈ£ 2013/04/11 1420
Troubleshoot  oracle to altibase data type ȣȯ     ÃÖ±æÈ£ 2013/04/05 2956
Admin  getdata.sql [ ¿À¶óŬ, ¾ËƼº£À̽º ¸¶À̱׷¹ÀÌ¼Ç ³»¿ë ] lv:9   ÃÖ±æÈ£ 2013/04/05 1349
Admin  http://support.altibase.com/kr/manual [ NLS_DATE_FORMAT = altibase.properties:DEFAULT_DATE_FORMAT ]    ÃÖ±æÈ£ 2013/04/04 13693
Admin  altibase ±³À° ÀÚ·á lv:4   ÃÖ±æÈ£ 2013/04/03 1542

    ¸ñ·Ïº¸±â 1
       

Copyright 1999-2023 Zeroboard / skin by ÃÖ±æÈ£(gilho.kr@gmail.com)
ÃÖ±Ù ´ñ±Û
ÃÖ±Ù °Ô½Ã¹°
06/05
[ORACLE]
ORA-27303: additional informat....
by ÃÖ±æÈ£
06/02
[°Ô½ÃÆÇ]
2023³â Àû¿ë SW(¼ÒÇÁÆ®¿þ¾î)±â¼úÀÚ Æò±ÕÀÓ±Ý ....
by ÃÖ±æÈ£
06/01
[ORACLE]
ORA-19504: failed to create fi....
by ÃÖ±æÈ£