Базы данных Oracle - статьи


Проверка работы конфигурации - часть 2


> i number :=1 ;

> begin

> for i in 1 .. 1000 loop

> insert into plans (ID, NAME, PRICEPERMIN, STATUS)

> values (i, 'test', 1, 'ACT');

> end loop;

> end;

> / PL/SQL procedure successfully completed. Command> select count(*) from plans; < 1000 > 1 row found. Command>

Теперь посмотрим состояние базы данных на узле rac2. [oracle@rac2 ~]$ ttisql "DSN=ha_ds;UID=app;PWD=app"

Copyright (c) 1996-2009, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=ha_ds;UID=app;PWD=app"; Connection successful: DSN=ha_ds;UID=app;DataStore=/u01/app/oracle/datastore/ha_ds;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/oracle/product/11.2.1/TimesTen/tt1/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0; (Default setting AutoCommit=1) Command> call ttRepStateGet();

< STANDBY >

1 row found. Command> select count(*) from plans;

< 1000 > 1 row found. Command>


Видим, что узел, находящийся в состоянии Standby, принимает информацию с узла rac1 и также доступен на чтение. Попытаемся вставить строки в таблицу plans на данном узле. Command> insert into plans (ID, NAME, PRICEPERMIN, STATUS)

> values (0, 'test', 2, 'ACT');

16265: This store is currently the STANDBY. Change to APP.PLANS not permitted. The command failed. Command>

При попытке изменения данных получаем ошибку 16265.

Теперь воспроизведем ситуацию выхода из строя одного из серверов. Для этого выполним на узле rac1 команду reboot

![root@rac1 ~]# reboot

Посмотрим состояние репликации на узле rac2.

[root@rac2 ~]# cd /u01/app/oracle/product/11.2.1/TimesTen/tt1/bin

[root@rac2 bin]# ./ttCWAdmin -status

TimesTen Cluster status report as of Tue Sep 14 20:25:12 2010 ==================================================================== TimesTen daemon monitors: Host:RAC1 Status: unavailable Host:RAC2 Status: online ==================================================================== ==================================================================== TimesTen Cluster agents Host:RAC1 Status: unavailable Host:RAC2 Status: online ==================================================================== Status of Cluster related to DSN HA_DS: ==================================================================== 1. Status of Cluster monitoring components: Monitor Process for Master Datastore 1 on Host RAC1: NOT RUNNING (ttCWAdmin) crsctl.c(21567): TT48004: clssgspubdata failed with status = 12. Monitor Process for Master Datastore 2 on Host rac2: RUNNING Monitor Process for Active datastore:RUNNING on Host rac2 Monitor Process for Standby datastore:RUNNING on Host rac2 2.Status of Datastores comprising the cluster Master Datastore 1: Host:RAC1 Status:UNAVAILABLE State:UNKNOWN Master Datastore 2: Host:rac2 Status:AVAILABLE State:ACTIVE ==================================================================== The cluster containing the replicated DSN is offline




Начало  Назад  Вперед



Книжный магазин