Этап 1. Сконфигурировать кластер на платформе Oracle RAC, состоящий из двух узлов, размещённых на отдельных виртуальных машинах и создать кластерную базу данных с заданными параметрами. Особенности конфигурации кластера и БД: Имя базы данных: "angryreaver". Имена узлов кластера: "angryreaver0" и "angryreaver1". В качестве хранилища необходимо использовать ASM, сконфигурированный в результате выполнения лабораторной работы №3. Хранилище ASM необходимо расположить на диске, доступном со всех узлов кластера по протоколу NFS. Этап 2. Создать тестовые таблицы с записями и произвести следующие операции с БД: Создать нового пользователя "furiousqueen". Создать нового пользователя "excitedmutalisk". Закрыть все сессии на всех узлах кластера, запущенные от имени пользователя "furiousqueen". Создать новую сессию от имени пользователя "furiousqueen". Остановить узел "angryreaver1". srvctl stop instance -d angryreaver1 -i instance_name cdbrac Создать нового пользователя "greatultralisk". Создать новую сессию от имени пользователя "excitedmutalisk". Запустить узел "angryreaver1". srvctl start instance -d angryreaver1 -i instance_name cdbrac Создать нового пользователя "depressedmutalisk". Вывести состояние всех сессий БД, запущенных от имени пользователя "depressedmutalisk". Закрыть все сессии на всех узлах кластера, запущенные от имени пользователя "greatultralisk". Создать нового пользователя "embarrasseddevourer". Закрыть все сессии на всех узлах кластера, запущенные от имени пользователя "excitedmutalisk". Остановить узел "angryreaver0". Закрыть все сессии на всех узлах кластера, запущенные от имени пользователя "greatultralisk". Создать новую сессию от имени пользователя "excitedmutalisk". Вывести состояние всех сессий БД, запущенных от имени пользователя "excitedmutalisk". Закрыть все сессии на всех узлах кластера, запущенные от имени пользователя "embarrasseddevourer". Запустить узел "angryreaver0". Этап 3. Осуществить "внештатную" остановку узла кластера "angryreaver0", проверив таким образом, что вся нагрузка будет перенесена на узел "angryreaver1" и целостность данных не будет нарушена. Этап 4. Выполнить ряд операций в следующей последовательности: Остановить кластер. Запустить Oracle Clusterware только на узле "angryreaver1". Остановить кластер и запустить Oracle Clusterware на обоих узлах. Shutdown Oracle Home process accessing database [oracle@database ~]$ emctl stop dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://database.example.com:5500/em/console/aboutApplication Stopping Oracle Enterprise Manager 11g Database Control ... ... Stopped. [grid@node1 bin]$ srvctl stop listener -n node1 [grid@node1 bin]$ srvctl status listener -n node1 Listener LISTENER is enabled on node(s): node1 Listener LISTENER is not running on node(s): node1 Shutdown RAC Database Instances on all nodes [oracle@node2 ~]$ srvctl status database -d oradb Instance oradb1 is running on node node1 Instance oradb2 is running on node node2 [oracle@node2 ~]$ srvctl stop database -d oradb [oracle@node2 ~]$ srvctl status database -d oradb Instance oradb1 is not running on node node1 Instance oradb2 is not running on node node2 Shutdown All ASM instances from all nodes: [grid@node2 oracle]# srvctl stop asm -n node1 -f [grid@node2 oracle]# srvctl stop asm -n node2 -f [grid@node2 oracle]# srvctl status asm -n node1 ASM is not running on node1 [grid@node2 oracle]# srvctl status asm -n node2 ASM is not running on node2 Shutdown Node applications running on nodes [grid@node2 oracle]# srvctl stop nodeapps -n node1 -f [grid@node2 oracle]# srvctl status nodeapps -n node1 VIP node1-vip is enabled VIP node1-vip is running on node: node1 Network is enabled Network is running on node: node1 GSD is disabled GSD is not running on node: node1 ONS is enabled ONS daemon is running on node: node1 Shut down the Oracle Clusterware or CRS [root@node1 bin]# crsctl check cluster -all ************************************************************** node1: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************* node2: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** [root@node1 bin]# crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1' CRS-2673: Attempting to stop 'ora.crsd' on 'node1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'node1' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'node1' CRS-2673: Attempting to stop 'ora.node2.vip' on 'node1' ------------------------------------------------- ------------------------------------------------- ------------------------------------------------- CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'node1' CRS-2677: Stop of 'ora.gipcd' on 'node1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'node1' CRS-2677: Stop of 'ora.gpnpd' on 'node1' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node1' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@node1 bin]# crsctl check cluster -all CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Check failed, or completed with errors. Start Oracle Clusterware or CRS: [root@node1 bin]# crsctl start crs CRS-4123: Oracle High Availability Services has been started [root@node2 bin]# crsctl check cluster -all ************************************************************** node1: CRS-4535: Cannot communicate with Cluster Ready Services CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** node2: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** [root@node1 bin]# crsctl start res ora.crsd -init [root@node1 bin]# crsctl check cluster -all ************************************************************** node1: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** node2: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** Start Node applications running on nodes [grid@node1 bin]$ srvctl start nodeapps -n node1 [grid@node1 bin]$ srvctl status nodeapps -n node1 VIP node1-vip is enabled VIP node1-vip is running on node: node1 Network is enabled Network is running on node: node1 GSD is disabled GSD is not running on node: node1 ONS is enabled ONS daemon is running on node: node1 Start All ASM instances from all nodes: [grid@node1 bin]$ srvctl start asm -n node1 [grid@node1 bin]$ srvctl status asm -n node1 ASM is running on node1 Start RAC Database Instances on all nodes [grid@node1 bin]$ srvctl start database -d oradb [grid@node1 bin]$ srvctl status database -d oradb Instance oradb1 is running on node node1 Instance oradb2 is running on node node2 Start Oracle Home process accessing database [grid@node1 bin]$ srvctl start listener -n node1 [grid@node1 bin]$ srvctl status listener -n node1 Listener LISTENER is enabled on node(s): node1 Listener LISTENER is running on node(s): node1 [oracle@database ~]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://database.example.com:5500/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control .......................... . started. ------------------------------------------------------------------ Logs are generated in directory /etc/oracle/oracle/database.example.com_orcl/sysman/log https://oracle-base.com/articles/11g/oracle-db-11gr2-rac-installation-on-linux-using-nfs#create_shared_disks http://askubuntu.com/questions/642991/virtualbox-ubuntu-14-04-vboxclient-the-virtualbox-kernel-service-is-not-runnin http://stackoverflow.com/questions/8328250/centos-64-bit-bad-elf-interpreter http://www.dbuggr.com/smallwei/resolve-remove-linux-bad-password-based-dictionary-word/ https://community.oracle.com/thread/2456806?tstart=0 http://www.dadbm.com/how-to-fix-ora-12547-tns-lost-contact-when-try-to-connect-to-oracle/ https://community.oracle.com/thread/3822923?start=0&tstart=0 https://oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-6-using-virtualbox SQL> SELECT inst_name FROM v$active_instances; INST_NAME ------------------------------------------------------------ ol6-121-rac1.localdomain:cdbrac1 ol6-121-rac2.localdomain:cdbrac2 SQL> create table test (ID NUMBER, COUNT NUMBER); Table created. SQL> commit; Commit complete. SQL> SQL> insert into test values(2,2); 1 row created. SQL> insert into test values(3,4); 1 row created. SQL> select * from test; ID COUNT ---------- ---------- 2 2 3 4 SQL> commit; SQL> select * from test; ID COUNT ---------- ---------- 2 2 3 4 SQL> SQL> alter session set "_ORACLE_SCRIPT"=true; Session altered. SQL> create user furiousqueen identified by oracle; User created. SQL> grant connect, resource to furiousqueen; Grant succeeded. SQL> commit; Commit complete. SQL> connect furiousqueen Enter password: Connected. SQL> SELECT inst_id, sid FROM gv$session WHERE username='FURIOUSQUEEN'; SQL> SELECT inst_id, sid, serial# FROM gv$session WHERE username='FURIOUSQUEEN'; INST_ID SID SERIAL# ---------- ---------- ---------- 2 418 47630 ALTER SYSTEM KILL SESSION '418,47630,@2'; SQL> SELECT status FROM gv$session WHERE username='FURIOUSQUEEN'; STATUS -------- KILLED SQL> select 2 from dual; select 2 from dual * ERROR at line 1: ORA-00028: your session has been killed https://oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-6-using-virtualbox http://www.dbas-oracle.com/2013/07/Shutdown-and-Start-Oracle-Real-Application-Clusters-RAC-Database.html