虚拟机上windows server 2008 +Oracle11g RAC配置过程

我的整体配置:

# Public
192.168.9.143   node1
192.168.9.144   node2
#Private
10.10.10.100   node1-priv
10.10.10.200   node2-priv
#Virtual
192.168.9.146  node1-vip
192.168.9.148   node2-vip
#SCAN
192.168.9.145  vion-scan

 

服务器A(RAC-A)

      OS:win 2008              ServerName:node1

      Pubic_IP:192.168.9.143/24            DNS:192.168.9.88

      Heartbeat_IP:10.10.10.100/24

 

服务器B(RAC-B)

      OS:win 2008             ServerName:node2

      Public_IP:192.168.9.144/24            DNS:192.168.9.88

      Heartbeat_IP:10.10.10.200/24

 

群集cluster

       ClusterName:vion-scan

      Cluster_IP:192.168.9.185/24

 解释几个ip:

1. private IP address is used only for internal clustering processing (Cache Fusion)
私有IP用于心跳同步,这个对于用户层面,可以直接忽略,简单理解,这个Ip用来保证两台服务器同步数据用的私网IP。
2. VIP is used by database applications to enable fail over when one cluster node fails
虚拟IP用于客户端应用,以支持失效转移,通俗说就是一台挂了,另一台自动接管,客户端没有任何感觉。
这也是为什么要使用RAC的原因之一,另一个原因,我认为是负载均衡。
3. public IP adress is the normal IP address typically used by DBA and SA to manage storage, system and database.
公有IP一般用于管理员,用来确保可以操作到正确的机器,我更愿意叫他真实IP。
4,scan ip
Oracle 11G R2 RAC增加了scan ip功能,在11.2之前,client链接数据库的时候要用vip,假如你的cluster有4个节点,那么客户端的tnsnames.ora中就对应有四个主机vip的一个连接串,如果cluster增加了一个节点,那么对于每个连接数据库的客户端都需要修改这个tnsnames.ora
至于为什么需要在dns里注册三个,主要是为了尽量提高可用性。当节点数大于3时,最多也只会有3个SCAN listener,也就是说有的节点上没有scan listener.
如果使用/etc/hosts文件解析scan ip,因为不能做轮训的负载均衡,所以这时候scan ip就只能有一个了

 

一、准备

1,虚拟机2台 系统均为windows  server 2008系统,可以克隆快些

2,宿主服务器最低配置为4G内存,虽然oracle官方说的虚拟机安装rac所需3G,但是分给每个虚拟机的内存1.6G即可,曾经分配了1.3G提示不够,呵呵

 

Oracle 11gR2 引入了很多新特性, Oracle 11gR2 将自动存储管理 (ASM) 和 Oracle Clusterware 集成在 Oracle Grid Infrastructure 中。Oracle ASM 和 Oracle Database 11gR2 提 供了较以前版本更为增强的存储解决方案,该解决方案能够在 ASM 上存储 Oracle Clusterware 文件,即 Oracle 集群注册表 (OCR) 和表决文件(VF,又称为表决磁盘)。这一 特性使 ASM 能够提供一个统一的存储解决方案,无需使用第三方卷管理器或集群文件系统 即可存储集群件和数据库的所有数据;
Oracle 11gR2 中引入了 SCAN(single client access name),即简单客户端连接名,一个 方便客户端连接的接口;在 Oracle 11gR2 之前,client 链接数据库的时候要用 vip,假如 cluster 有 4 个节点,那么客户端的 tnsnames.ora 中就对应有四个主机 vip 的一个连接串,如果 cluster 增加了一个节点,那么对于每个连接数据库的客户端都需要修改这个 tnsnames.ora。SCAN 简化了客户端连接,客户端连接的时候只需要知道这个名称,并连接即可, 每个 SCAN VIP 对应一个 scan listener,cluster 内部的 service 在每个 scan listener 上都有注册,scan listener 接受客户端的请求,并转发到不同的 Local listener 中去,由 local 的 listener 提供服务给客户端。

 

二、安装虚拟机(RAC-A)

1、一步一步安装即可,简单,

三,配置虚拟机

1、配置网络,

两个网卡都是桥接模式,

修改两个网卡一个网卡是pri----我配置的时候似有ip不需要访问外网,没有配置网关什么的,一个是pub,最后保证pub访问顺序第一,方法是在网络连接页面按下alt键,选择高级-》高级配置,调整网卡顺序即可

2、修改host文件(C:\windows\system32\drivers\etc\hosts)

添加页首的配置

3、禁用媒体感知

在运行下运行regedit,找到以下节点HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters,然后右键添加

Value Name: DisableDHCPMediaSense
Data Type: DWORD
Value: 1

四,创建共享盘

以下操作过程中先关闭虚拟机!

a,创建目录mkdir G:\gel\share-A

b,进入到virtualbox安装的根目录因为要用到里边的工具

1、创建控件

VBoxManage createhd --filename G:\gel\share-A\asm1.vdi --size 5120 --format VDI --variant Fixed----创建五个序号依次增加

VBoxManage createhd --filename G:\gel\share-A\asm2.vdi --size 5120 --format VDI --variant Fixed----创建五个序号依次增加

2、连接上虚拟机

VBoxManage storageattach RAC-A --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium G:\gel\share-A\asm1.vdi --mtype shareable 依次创建连接五个

VBoxManage storageattach RAC-A --storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium G:\gel\share-A\asm2.vdi --mtype shareable

3、使共享

VBoxManage modifyhd G:\gel\share-A\asm1.vdi --type shareable

c,启动RAC-A做一些操作

C:\>diskpart

DISKPART》 list disk

再次启动dos

automount enable
select disk 1
create partition extended
create partition logical
select disk 2
create partition extended
create partition logical
select disk 3
create partition extended
create partition logical
select disk 4
create partition extended
create partition logical
select disk 5
create partition extended
create partition logical
exit

d,最后一些操作

进入虚拟机中grid根目录,执行以下操作

C:\grid>asmtool -add \Device\HardDisk1\Partition1 ORCLDISK1

C:\grid>asmtool -add \Device\HardDisk2\Partition2 ORCLDISK2

一直到5

c:\grid>asmtool -list

可以查看正常与否

五,克隆虚拟机RAC-A

1、导出虚拟电脑

2、导入虚拟电脑RAC-B

3、修改虚拟机RAC-B的MAC地址,否则两个虚拟机不能互通

4、配置RAC-B的网络和hosts文件

5、验证能够互相ping同

6、关闭虚拟机

执行如下:

VBoxManage storageattach RAC-B --storagectl "SATA 控制器" --port 1 --device 0 --type hdd --medium G:\gel\share-A\asm1.vdi --mtype shareable 依次创建连接五个

VBoxManage storageattach RAC-B--storagectl "SATA 控制器" --port 2 --device 0 --type hdd --medium G:\gel\share-A\asm2.vdi --mtype shareable

7、验证是否可以互ping,并且主机名

六、安装GRID

一步一步安装即可

注意,在安装到specify cluster configuration时候,scan name一定是网络上没有的名字,并且对应的ip地址网络上也没有,依次下一步即可

七,安装数据

一步一步安装即可

八,验证是否成功

1,

C:>sqlplus / as sysdba

C:>select inst_name from v$active_instances

将显示两个实例,即正常

2,登陆em

一般em地址为https://node1:1158/em

 

 

以下是官网的安装文档,贴在此处,因为我是按照他来安装的,很有纪念意义,呵呵:

 

Introduction

One of the biggest obstacles preventing people from setting up test RAC environments is the requirement for shared storage. In a production environment, shared storage is often provided by a SAN or high-end NAS device, but both of these options are very expensive when all you want to do is get some experience installing and using RAC. A cheaper alternative is to use a FireWire disk enclosure to allow two machines to access the same disk(s), but that still costs money and requires two servers. A third option is to use virtualization to fake the shared storage.

Using VirtualBox you can run multiple Virtual Machines (VMs) on a single server, allowing you to run both RAC nodes on a single machine. In additon, it allows you to set up shared virtual disks, overcoming the obstacle of expensive shared storage.

Virtual RAC

Before you launch into this installation, here are a few things to consider.

  • The finished system includes the host operating system, two guest operating systems, two sets of Oracle Grid Infrastructure (Clusterware + ASM) and two Database instances all on a single server. As you can imagine, this requires a significant amount of disk space, CPU and memory.
  • Following on from the last point, the VMs will each need at least 3G of RAM, preferably 4G if you don't want the VMs to swap like crazy. As you can see, 11gR2 RAC requires much more memory than 11gR1 RAC. Don't assume you will be able to run this on a small PC or laptop. You won't.
  • This procedure provides a bare bones installation to get the RAC working. There is no redundancy in the Grid Infrastructure installation or the ASM installation. To add this, simply create double the amount of shared disks and select the "Normal" redundancy option when it is offered. Of course, this will take more disk space.
  • During the virtual disk creation, I always choose not to preallocate the disk space. This makes virtual disk access slower during the installation, but saves on wasted disk space. The shared disks must have their space preallocated.
  • This is not, and should not be considered, a production-ready system. It's simply to allow you to get used to installing and using RAC.
  • The Single Client Access Name (SCAN) should really be defined in the DNS or GNS and round-robin between one of 3 addresses, which are on the same subnet as the public and virtual IPs. In previous Linux installations I've defined it as a single IP address in the "/etc/hosts" file, which is wrong and will cause the cluster verification to fail, but it allows me to complete the install without the presence of a DNS.
  • The virtual machines can be limited to 2Gig of swap, which causes a prerequisite check failure, but doesn't prevent the installation working. If you want to avoid this, define 3+Gig of swap.
  • This article uses the 64-bit versions of Windows and Oracle 11g Release 2.

 

Download Software

Download the following software.

 

VirtualBox Installation

First, install the VirtualBox software. On RHEL and its clones you do this with the following command as the root user.

# rpm -Uvh VirtualBox-4.1-4.1.2_73507_fedora15-1.x86_64.rpm

Once complete, VirtualBox is started from the "Applications > System Tools > Oracle VM VirtualBox" menu option.

 

Virtual Machine Setup

Now we must define the two virtual RAC nodes. We can save time by defining one VM, then cloning it when it is installed.

Start VirtualBox and click the "New" button on the toolbar. Click the "Next" button on the first page of the Virtual Machine Wizard.

New VM Wizard - Welcome

Enter the name "w2008-112-rac1", OS "Microsoft Windows" and Version "Windows 2008 (64 bit)", then click the "Next" button.

New VM Wizard - VM Name and OS Type

Enter "4096" as the base memory size, then click the "Next" button.

New VM Wizard - Memory

Accept the default option to create a new virtual hard disk by clicking the "Next" button.

New VM Wizard - Virtual Hard Disk

Select the desired file type, then click the "Next" button.

New Virtual Hard Disk Wizard - File Type

Acccept the default option by clicking the "Next" button.

New Virtual Hard Disk Wizard - Hard Disk Storage Type

Accept the default location, or enter an alterative, set the size to "30G" and click the "Next" button.

New Virtual Hard Disk Wizard - Virtual Disk Location And Size

Click the "Create" button on the Virtual Disk Wizard Summary screen.

New Virtual Hard Disk Wizard - Summary

Click the "Create" button on the Virtual Machine Wizard Summary screen.

New VM Wizard - Virtual Hard Disk

The "w2008-112-rac1" VM will appear on the left hand pane. Scroll down the "Details" tab on the right and click on the "Network" link.

Virtual Box - Console

Make sure "Adapter 1" is enabled, set to "Bridged Adapter" and select your physical network adapter "em1", then click on the "Adapter 2" tab.

Virtual Box - Network Adapter 1

Make sure "Adapter 2" is enabled, set to "Bridged Adapter" and select your physical network adapter "em1", then click on the "OK" button.

Virtual Box - Network Adapter 2

The virtual machine is now configured so we can start the guest operating system installation.

 

Guest Operating System Installation

Place the Windows 2008 SE disk in the CD drive and start the virtual machine by clicking the start button on the toolbar. The resulting console window will contain the Windows boot screen.

Windows Boot

Continue through the Full Standard Edition installation as you would for a normal server.

When the installation is complete, remember to install the VirtualBox Guest Additions on the server. This is initiated from the "Devices > Install Guest Additions..." menu. Accept all the defaults and reboot the server when requested.

 

Oracle Installation Prerequisites

Turn off the Windows firewall "Start > Control Panel > System and Security (Check Firewall Status) > Turn Windows Firewall on or off" to prevent it from interferring with the sever communication. You can turn it on later and open up any required ports if you want to.

Perform the following steps whilst logged into the virtual machine.

Amend the "C:\windows\system32\drivers\etc\hosts" file to contain the following information. Note. If you will be using DNS for resolve the SCAN, comment out the entries for it in the "hosts" files.

127.0.0.1       localhost.localdomain   localhost
# Public
192.168.0.151   w2008-112-rac1.localdomain        w2008-112-rac1
192.168.0.152   w2008-112-rac2.localdomain        w2008-112-rac2
#Private
192.168.1.151   w2008-112-rac1-priv.localdomain   w2008-112-rac1-priv
192.168.1.152   w2008-112-rac2-priv.localdomain   w2008-112-rac2-priv
#Virtual
192.168.0.153   w2008-112-rac1-vip.localdomain    w2008-112-rac1-vip
192.168.0.154   w2008-112-rac2-vip.localdomain    w2008-112-rac2-vip
#SCAN (192.168.0.155 - 192.168.0.157 in DNS)
192.168.0.155   w2008-112-scan.localdomain w2008-112-scan
192.168.0.156   w2008-112-scan.localdomain w2008-112-scan
192.168.0.157   w2008-112-scan.localdomain w2008-112-scan

Open the "Network Connections" screen (Start > Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings). Rename the two connections to "public" and "private" respectively, making sure you apply the names to the appropriate connections. You can do this by right-clicking on the connection and selecting "Rename" from the pop-up menu.

Set the correct IP information for the two connections. Right-click on a connection and select the "Properties" menu option. Click on "Internet Protocol Version 4 (TCP/IPv4)" option and click the "Properties. button. Enter the appropriate IP, subnet, default gateway and DNS for the networks.

public:

  • IP Address: 192.168.0.151
  • Subnet: 255.255.255.0
  • Default Gateway: 192.168.0.1
  • DNS: 192.168.0.4

private:

  • IP Address: 192.168.1.151
  • Subnet: 255.255.255.0
  • Default Gateway: N/A
  • DNS: N/A

If any of the network connections are left in a disabled state, right-click on then and select the "Diagnose" option to repair them.

Ensure the public interface is first in the bind order:

  • On the "Network Connections" dialog, press "Alt+N" to show the advanced menu. Select "Advanced Settings...".
  • On the "Adapters and Bindings" tab, make sure the public interface is the first interface listed.
  • Click on each network in turn and make sure the "TCP/IPv4" bindings come before the "TCP/IPv6" bindings. This should be correct by default.
  • Accept any modifications by clicking on the "OK" button and exiting the "Network Connections" dialog.

Disable Windows Media Sensing for TCP/IP:

  • Backup the Windows registry.
  • Run the Registry Editor (Regedit.exe) and find the following key.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • Add the following registry value.

    Value Name: DisableDHCPMediaSense
    Data Type: DWORD
    Value: 1
  • This change will not take effect until the computer is restarted.

Open the "System Properties" dialog (Start > Control Panel > System and Security > System > Change Settings) and do the following:

  • Click the "Change" button, enter the machine name "w2008-112-rac1" then click the "OK" button.
  • Click on the Advanced tab and the "Environment Variables" button.
  • Edit both the "TEMP" and "TMP" environment variables to be "%WINDIR%\temp", which is "C:\Windows\temp".
  • Click the "OK" button and "OK" out of the "System" dialog.

Note. In this installation I will install Oracle as the Administrator user. If you want to set up another user, it must be part of the administrator group and have the "TMP" and "TEMP" environment variables set correctly.

 

Create Shared Disks

Make sure the VM is shutdown, create a directory to host the shared virtual disks on the host OS, then create the shared disks. My host is Linux, so the paths to the virtual disks are UNIX-style paths. If your host is Windows, then you will be using Windows-style paths.

$ mkdir -p /u04/VirtualBox/w2008-112-rac
$ cd /u04/VirtualBox/w2008-112-rac
$
$ # Create the disks and associate them with VirtualBox as virtual media.
$ VBoxManage createhd --filename asm1.vdi --size 5120 --format VDI --variant Fixed
$ VBoxManage createhd --filename asm2.vdi --size 5120 --format VDI --variant Fixed
$ VBoxManage createhd --filename asm3.vdi --size 5120 --format VDI --variant Fixed
$ VBoxManage createhd --filename asm4.vdi --size 5120 --format VDI --variant Fixed
$ VBoxManage createhd --filename asm5.vdi --size 5120 --format VDI --variant Fixed
$
$ # Connect them to the VM.
$ VBoxManage storageattach w2008-112-rac1 --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium asm1.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac1 --storagectl "SATA Controller" --port 2 --device 0 --type hdd --medium asm2.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac1 --storagectl "SATA Controller" --port 3 --device 0 --type hdd --medium asm3.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac1 --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium asm4.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac1 --storagectl "SATA Controller" --port 5 --device 0 --type hdd --medium asm5.vdi --mtype shareable
$
$ # Make shareable.
$ VBoxManage modifyhd asm1.vdi --type shareable
$ VBoxManage modifyhd asm2.vdi --type shareable
$ VBoxManage modifyhd asm3.vdi --type shareable
$ VBoxManage modifyhd asm4.vdi --type shareable
$ VBoxManage modifyhd asm5.vdi --type shareable

Start the w2008-112-rac1 virtual machine by clicking the "Start" button on the toolbar. When the server has started, log in so you can partition the disks.

We will partition the disks using the "DiskPart" utility. To get alist of the current disks do the following.

C:\>diskpart

Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: RAC1

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        24 GB      0 B
  Disk 1    Online        10 GB    10 GB
  Disk 2    Online        10 GB    10 GB
  Disk 3    Online        10 GB    10 GB
  Disk 4    Online        10 GB    10 GB
  Disk 5    Online        10 GB    10 GB

DISKPART>

In the diskpart utility we will perform the following commands.

automount enable
select disk 1
create partition extended
create partition logical
select disk 2
create partition extended
create partition logical
select disk 3
create partition extended
create partition logical
select disk 4
create partition extended
create partition logical
select disk 5
create partition extended
create partition logical
exit

Stamp the disks for use with ASM. This is done using the asmtool that comes with the Grid Infrastructure media.

C:> Z:
Z:> cd z:\software\oracle\11gR2\11.2.0.2.0\win64_grid\asmtool
Z:> asmtool -add \Device\HardDisk1\Partition1 ORCLDISK1
Z:> asmtool -add \Device\HardDisk2\Partition1 ORCLDISK2
Z:> asmtool -add \Device\HardDisk3\Partition1 ORCLDISK3
Z:> asmtool -add \Device\HardDisk4\Partition1 ORCLDISK4
Z:> asmtool -add \Device\HardDisk5\Partition1 ORCLDISK5

Z:> asmtool -list

NTFS                             \Device\Harddisk0\Partition1              100M
NTFS                             \Device\Harddisk0\Partition2            30618M
ORCLDISK1                        \Device\Harddisk1\Partition1             5117M
ORCLDISK2                        \Device\Harddisk2\Partition1             5117M
ORCLDISK3                        \Device\Harddisk3\Partition1             5117M
ORCLDISK4                        \Device\Harddisk4\Partition1             5117M
ORCLDISK5                        \Device\Harddisk5\Partition1             5117M

Z:>

The shared disks are now configured.

 

Clone the Virtual Machine

Later versions of VirtualBox allow you to clone VMs, but these also attempt to clone the shared disks, which is not what we want. Instead we must manually clone the VM.

Shutdown the "w2008-112-rac1" VM.

Manually clone the virtual disk using the following commands on the host server.

$ mkdir -p /u03/VirtualBox/w2008-112-rac2
$ VBoxManage clonehd /u02/VirtualBox/w2008-112-rac1/w2008-112-rac1.vdi /u03/VirtualBox/w2008-112-rac2/w2008-112-rac2.vdi

Create the "w2008-112-rac2" virtual machine in VirtualBox in the same way as you did for "w2008-112-rac1", with the exception of using an existing "w2008-112-rac2.vdi" virtual hard drive.

Remember to add the second network adaptor as you did on the first VM. When the VM is created, attach the shared disks to this VM.

$ cd /u04/VirtualBox/w2008-112-rac
$
$ VBoxManage storageattach w2008-112-rac2 --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium asm1.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac2 --storagectl "SATA Controller" --port 2 --device 0 --type hdd --medium asm2.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac2 --storagectl "SATA Controller" --port 3 --device 0 --type hdd --medium asm3.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac2 --storagectl "SATA Controller" --port 4 --device 0 --type hdd --medium asm4.vdi --mtype shareable
$ VBoxManage storageattach w2008-112-rac2 --storagectl "SATA Controller" --port 5 --device 0 --type hdd --medium asm5.vdi --mtype shareable

Start the "w2008-112-rac2" virtual machine.

Open the "Network Connections" screen (Start > Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings) and amend the IP address values of each network to the appropriate values for the second node.

Open the "System Properties" dialog (Start > Control Panel > System and Security > System > Change Settings) and change the machine name by clicking the "Change" button. Click all "OK" buttons to exit the "System Properties" dialog and restart the server when prompted.

Once the RAC2 virtual machine has restarted, start the RAC1 virtual machine. When both nodes have started, check they can both ping all the public and private IP addresses using the following commands.

ping rac1
ping rac1-priv
ping rac2
ping rac2-priv

At this point the virtual IP addresses defined in the hosts file will not work, so don't bother testing them.

The virtual machine setup is now complete.

 

Install the Grid Instrastructure

Start the installer by double-clicking on the "Setup.exe" in the root of the installation media.

Check the "Skip software updates" option, then click the "Next" button.

Grid - Software Updates

Select the "Install and Configure Grid Infrastructure for a Cluster" option, then click the "Next" button.

Grid - Select Installation Option

Select the "Typical Installation" option, then click the "Next" button.

Grid - Select Installation Type

On the "Specify Cluster Configuration" screen, click the "Add" button.

Grid - Specify Cluster Configuration

Enter the details of the second node in the cluster, then click the "OK" button.

Grid - Add Cluster Node Information

Click the "Identify network interfaces..." button and check the public and private networks are specified correctly. Once you are happy with them, click the "OK" button and the "Next" button on the previous screen.

Grid - Network Interfaces

Enter appropriate paths and "Automatic Storage Manager" as the cluster registry storage type. Enter the ASM password and click the "Next" button.

Grid - Specify Install Locations

Set the redundancy to "External", select all 5 disks and click the "Next" button.

Grid - Create ASM Disk Group

Wait while the prerequisite checks complete. If you have any issues, either fix them or check the "Ignore All" checkbox and click the "Next" button. In this installation I used the local "Administrator" user, rather than a domain user, hence the failure. The installation completes successfully despite this.

Grid - Perform Prerequisite Checks

If you are happy with the summary information, click the "Install" button.

Grid - Summary

Wait while the setup takes place.

Grid - Setup

Click the "Close" button to exit the installer.

Grid - Finish

The clusterware installation is now complete.

 

Install the Database Software and Create a Database

Start the installer by double-clicking on the "Setup.exe" in the root of the installation media.

Uncheck the security updates checkbox and click the "Next" button.

DB - Configure Security Updates

Check the "Skip software updates" checkbox and click the "Next" button.

DB - Software Updates

Accept the "Create and configure a database" option by clicking the "Next" button.

DB - Select Installation Option

Accept the "Server Class" option by clicking the "Next" button.

DB - System Class

Make sure both nodes are selected, then click the "Next" button.

DB - Node Selection

Accept the "Typical install" option by clicking the "Next" button.

DB - Select Istall Type

Enter appropriate paths. The storage type should be set to "Automatic Storage Manager". Enter the appropriate passwords and database name, in this case "rac.localdomain".

DB - Typical Install Configuration

Wait for the prerequisite check to complete. If there are any problems either fix them, or check the "Ignore All" checkbox and click the "Next" button. If there are no errors, you will move directly to the summary screen. If you are happy with the summary information, click the "Install" button.

DB - Summary

Wait while the installation takes place.

DB - Install Product

Perform any suggested tasks on the "Finish" screen. Click the "Close" button to exit the installer.

DB - Finish

The RAC database creation is now complete.

 

Check the Status of the RAC

There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.

C:\>srvctl config database -d RAC
Database unique name: rac
Database name: rac
Oracle home: C:\app\oracle\product\11.2.0\db_1
Oracle user: nt authority\system
Spfile: +DATA/rac/spfilerac.ora
Domain: localdomain
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: rac
Database instances: rac1,rac2
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed

C:\>
 
C:\>srvctl status database -d RAC
Instance rac1 is running on node w2008-112-rac1
Instance rac2 is running on node w2008-112-rac2

C:\>

The V$ACTIVE_INSTANCES view can also display the current status of the instances.

 
C:\>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 13 12:58:23 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, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options

SQL> SELECT inst_name FROM v$active_instances;

INST_NAME
--------------------------------------------------------------------------------

W2008-112-RAC1:rac1
W2008-112-RAC2:rac2

SQL>

If you have configured Enterprise Manager, it can be used to view the configuration and current status of the database using a URL like "https://w2008-112-rac1.localdomain:1158/em".

OEM

For more information see:

Hope this helps. Regards Tim...

 

 官网连接地址:http://www.oracle-base.com/articles/11g/oracle-db-11gr2-rac-installation-on-windows-2008-using-virtualbox.php

 

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

朝闻道-夕死可矣

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值