null

Установка Oracle Database 11g Release 2 в окружении Oracle Solaris Cluster

Исходная задача - создать базу данных Oracle версии 11.2.0.3 в среде Oracle Solaris Cluster с использованием ASM для хранения файлов данных. При этом необходимо обеспечить три окружения: основное, резервное и тестовое. Принципиально ничего сложного, но... Для разделения окружений учитывая специфику версий ПО используем Zone Cluster. Согласно документации "Oracle Solaris Cluster Data Service for Oracle Guide":
Single instance Oracle ASM is not supported with Oracle 11g release 2.
Соответственно устанавливаем и конфигурируем Clustered Oracle ASM. Создаем необходимые ресурсы в кластере, устанавливаем Oracle Database и создаем базу. Осталось совсем не много - создать ресурс для базы. Как обычно "clrs create -t oracle_server ..." - ресурс создан, но перевести его в состояние "Online" невозможно - падает вся ресурсная группа с ошибкой:

	Aug 24 15:19:32 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Failed to update the INCARNATION value within the CCR TABLE GIConfig_ora11db-zcora11-db-rs, [You cannot run this command from a non-global zone]
	

 

Причина - использование в агенте команды ccradm (особенность реализации агента HA Oracle версии 11.2), а внутри Zone Cluster эта команда не поддерживается (Bug 7082865). Для разрешения ситуации отключаем использование функционала Grid Infrastructure агентом Oracle HA внутри Zone Cluster. Так-как самостоятельно править скрипты агентов не совсем правильно - разработан временный патч (скачать можно здесь).

В итоге в "глобальном" кластере (используется функционал Grid Infrastructure):

старт ресурса Oracle HA

	Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Start [1]
Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: DB_UNIQUE_NAME=ora11gc
Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: INCARNATION=1
Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE=OFFLINE
Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE_DETAILS=Instance_Shutdown
Aug 29 20:33:45 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Starting ora11gc ...
Aug 29 20:34:05 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Server is running.
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Start [2]
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: DB_UNIQUE_NAME=ora11gc
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: INCARNATION=2
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE=ONLINE_on_n240a
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE_DETAILS=Open
Aug 29 20:34:12 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Checking the instance's status and role.
Checking status of instance ora11gc
DB_ROLE:PRIMARY
Role returned by instance is: PRIMARY
DB_STATUS:OPEN
Status returned by instance is: OPEN
Instance found to be in correct status of OPEN.
Executing command: /opt/SUNWscor/oracle_server/bin/oracle_server_manage check_db_open               SUNWscor.oracle_server start ora11db-db-rs ora11db-rg
Aug 29 20:34:16 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Server is online.
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: Start [3]
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: DB_UNIQUE_NAME=ora11gc
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: CCR_INCARNATION=2
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: CCR_OPERATION=RESTART
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: INCARNATION=2
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE=ONLINE_on_n240a
Aug 29 20:34:18 SC[SUNWscor.oracle_server.start]:ora11db-rg:ora11db-db-rs: STATE_DETAILS=Open
Aug 29 20:34:35 SC[SUNWscor.oracle_server.monitor_start]:ora11db-rg:ora11db-db-rs: GI fault monitor starting with ORA_PMON_PID 21312
Aug 29 20:34:35 SC[SUNWscor.oracle_server.monitor_start]:ora11db-rg:ora11db-db-rs: GI fault monitor is running, return code 0

 

остановка ресурса Oracle HA

	Aug 29 20:34:46 SC[SUNWscor.oracle_server.monitor_stop]:ora11db-rg:ora11db-db-rs: GI fault monitor stopped, return code 0
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Stop [1]
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: DB_UNIQUE_NAME=ora11gc
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: CCR_INCARNATION=2
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: CCR_OPERATION=RESTART
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: INCARNATION=2
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: STATE=ONLINE_on_n240a
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: STATE_DETAILS=Open
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Stopping ora11gc ...
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Using method 'run_setuid_prog' to execute shutdown commands
Aug 29 20:35:03 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Stopping oracle server using shutdown immediate
Shutting down Oracle instance: ora11gc  : /u02/app/oracle/product/11.2.0/db_1.

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 29 20:35:03 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Executing command: /opt/SUNWscor/oracle_server/bin/oracle_server_manage shutdown immediate
Aug 29 20:35:13 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Server stopped successfully.
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: Stop [2]
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: DB_UNIQUE_NAME=ora11gc
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: CCR_INCARNATION=2
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: CCR_OPERATION=RESTART
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: INCARNATION=2
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: STATE=ONLINE_on_n240a
Aug 29 20:35:16 SC[SUNWscor.oracle_server.stop]:ora11db-rg:ora11db-db-rs: STATE_DETAILS=Instance_Shutdown

 

и в Zone Cluster (без использования функционала Grid Infrastructure):

старт ресурса Oracle HA

	Aug 29 20:04:33 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Starting Oracle server.
Aug 29 20:04:33 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Using method 'su' to execute start commands
Shutting down Oracle instance: demo112  : /u02/app/oracle/product/11.2.0/db_1.

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 29 20:04:35 2011

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

Connected to an idle instance.

SQL> ORACLE instance shut down.
SQL> Disconnected

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 29 20:04:37 2011

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

Connected to an idle instance.

SQL> ORACLE instance started.

Total System Global Area 1637302272 bytes
Fixed Size                  2158824 bytes
Variable Size             956305176 bytes
Database Buffers          671088640 bytes
Redo Buffers                7749632 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 29 20:04:53 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL>
Grant succeeded.

SQL>
Grant succeeded.

SQL>
Grant succeeded.

SQL>
Grant succeeded.

SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Aug 29 20:04:54 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Server successfully started.
Aug 29 20:04:54 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Checking the instance's status and role.
Checking status of instance demo112
DB_ROLE:PRIMARY
Role returned by instance is: PRIMARY
DB_STATUS:OPEN
Status returned by instance is: OPEN
Instance found to be in correct status of OPEN.
Aug 29 20:04:55 monitor started for database online check
Aug 29 20:04:55 Starting monitor child process
Aug 29 20:04:58 SC[SUNWscor.oracle_server.start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Server is online.
Aug 29 20:04:59 SC[SUNWscor.oracle_server.monitor_start]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Starting fault monitor. pmf tag ORASERV_MON_ora11db-zcora11-db-rs
Aug 29 20:04:59 Starting monitor child process
Aug 29 20:04:59 SC[SUNWscor.oracle_server.monitor]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: RDBMS probe successful

 

остановка ресурса Oracle HA

	Aug 29 20:05:25 SC[SUNWscor.oracle_server.monitor_stop]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Stopping fault monitor using pmfadm tag ORASERV_MON_ora11db-zcora11-db-rs
Aug 29 20:05:26 SC[SUNWscor.oracle_server.stop]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Using method 'su' to execute shutdown commands
Aug 29 20:05:26 SC[SUNWscor.oracle_server.stop]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Stopping oracle server using shutdown immediate
Shutting down Oracle instance: demo112  : /u02/app/oracle/product/11.2.0/db_1.

SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 29 20:05:26 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Aug 29 20:05:33 SC[SUNWscor.oracle_server.stop]:ora11db-zcora11-rg:ora11db-zcora11-db-rs: Server stopped successfully.

Konstantin Borzov, Baku 2009

Коротко о себе:

Закончил Пушкинское высшее училище радиоэлектроники противовоздушной обороны (ПВУРЭ ПВО).

Служил в ВС и МВД, работал в народном хозяйстве. В настоящее время сотрудник компании Tune-It.

Привлекает решение "стандартных" задач - создание конфет из имеющегося сырья подручными средствами.

Ненавижу питерские пробки. Еще больше ненавижу общественный транспорт. В результате ежедневно пару часов провожу за рулем.