Build RAC+DG on Windows R2

Source: Internet
Author: User
Tags cdata ole

Pre-planning:


Node 1: tc1 192.168.56.101 Memory: 2G

Node 2: tc2 192.168.56.102 Memory: 2G

Physical standby: tcdg192.168.56.108 Memory: 1G

Operating system: Windows R2 Enterprise


*******
RAC section
*******


First, the preparatory work


1. Modify elevation prompt as "No prompt, direct promotion" (default to "consent Prompt for non-Windows binaries")
Behavior of elevation prompt for administrators in Admin Approval Mode, user Account Control, security options, cmd> secpol.msc-> Local Policy


2. Disabling the firewall
Cmd> firewall.cpl-> turn firewall on or off, close window firewall


3. Modify the registry to turn off DHCP media awareness (after the change is in effect)
Cmd> regedit->\hkey_local_machine\system\currentcontrolset\services\tcpip\parameters Add an item below, The name is DisableDHCPMediaSense, the type is DWORD, and the value is 1


4. Check if it takes effect
Cmd> netsh interface ipv4 show global
DHCP Media Sense : Enabled


5. Turn off the Scalable Network Pack (SNP) feature (effective immediately after modification)
cmd> netsh int tcp set global rss=disabled
cmd> netsh int tcp set global chimney=disabled


c:\grid>netsh int TCP Show global
Query activity status ...


TCP Global Parameters
----------------------------------------------
Receiver Scaling Status: Disabled
Chimney Unload Status: Disabled
NetDMA Status: Enabled
Direct cache Access (DCA): Disabled
Receive Window Auto-tuning level: normal
Additional congestion control provider: CTCP
ECN function: Disabled
RFC 1323 Timestamp: Disabled


6. Adjust the network binding order
Cmd> ncpa.cpl-> Advanced Settings----adjust public before, private, and ensure the IPV4 protocol before the IPV6 protocol


7. Stop distributed Transaction Coordinator and set to manual start
Cmd> services.mcs-> Point Property modification


8. Synchronize each node time (optional)
Typically, the time between nodes is guaranteed by CTSSD (Cluster times synchronization Services Daemon) or by Windows service.
If Windows Time Service is turned on (the default is off), you must ensure that it is not reversed and you need to make the following adjustments
Cmd> Regedit->\hkey_local_machine\system\currentcontrolset\services\w32time\config
Change the value of MaxNegPhaseCorrection to 0
Cmd> W32tm/config/update--making changes effective


9. Set environment variables (optional)
Install the system by default should already have the TMP and Temp two environment variables, the path is%userprofile%\appdata\local\temp
Because these 2 environment variables are used when installing oui, you need to add them if not, and make sure the paths are consistent


10. Modify C:\windows\system32\etc\hosts
#public IP
192.168.56.101 Tc1
192.168.56.102 Tc2
#virtual IP
192.168.56.103 Tc1-vip
192.168.56.104 Tc2-vip
#private IP
10.0.0.1 Tc1-priv
10.0.0.2 Tc2-priv
192.168.56.105 Tc-cluster-scan


11.full clone Node 1 to Node 2
Start and modify the network card IP address and host name of Node 2 and restart again


12. Test connectivity
Node 1 execution
Cmd> Ping Tc2
Cmd> Ping Tc2-vip
Cmd> Ping Tc2-priv
cmd> net use \\tc2\c$
Node 2 Execution (slight)


13. Test your Remote Registry
Node 1 execution
cmd> regedit-> file, connection Network registry, input tc2-> check name-ok
Node 2 Execution (slight)


Second, configure the shared disk


1. Shared Disk partitioning planning
DISK1 Tc_ocr_vote11G
DISK2 Tc_ocr_vote21G
DISK3 Tc_ocr_vote31G
DISK1 Tc_data12G
DISK5 Tc_data22G
DISK6 Tc_fra1 2G
DISK7 Tc_fra2 2G


Starting with 11g, Oracle recommends that OCR and Votedisk be managed in ASM, so there are a total of 7 disks, 3 for disk group Ocrvote, normal redundancy, and 2 blocks for FRA for data,2 blocks, all externally redundant. Note that the disk assigned here to create the ASM disk group must be a bare disk without a drive letter, and in Windows 2003, you can use Diskmgmt.msc instead of DiskPart to create the disk partition, but the windowns You can only use DiskPart to partition in 2008.


2. Set automatic mount (all nodes)
Cmd> DiskPart
Diskpart> AutoMount Enable


3. Clear Disk (Node 1)
Cmd> list Disk
Cmd> Select disk 1
Cmd> Clean All
...
Cmd> Select disk 7
Cmd> Clean All


4. Creating extended partitions and logical disks (node 1)
Cmd> Select disk 1
Cmd> Create part Ext
Cmd> Create part Log
...
Cmd> Select disk 7
Cmd> Create part Ext
Cmd> Create part Log


5. Delete Logical Disk Letter (Node 2)
After you create the extended partition and the logical disk with DiskPart on the local node, the logical drive letter does not appear, but the other nodes may have, need to be completely removed, note that a restart on Node 2 to discover the partition on the disk on Node 1
Cmd> Select disk 3-note the corresponding logical drive volume label, not starting from 1
Cmd> Remov
...
Cmd> Select Disk 9
Cmd> Remov


6. Use Asmtool or Asmtoolg to divide ASM Disk Group partitions
Enter the grid installation media, such as: C:\grid\asmtools, run Amstoolg
Select the disks you want to add to the same disk group, enter the disk group name, and click Next


Third, install the grid infrastructure software


1. Pre-Test installation conditions are satisfied
c:\grid> runcluvfy stage-pre crsinst-n tc1,tc2-verbose
c:\grid> runcluvfy stage-post hwos-n tc1,tc2-verbose

The Cluster service configuration fails because the VIP is not configured at this time and is ignored. There is also a warning that the user "Administrator" cannot be authenticated as a domain user , which can be ignored. The last warning is that the firewall is not closed, but check it out, it is really closed, according to the instructions in the following oui, you can turn off the firewall by modifying the registry. But it was later discovered because the firewall in the domain configuration file was not responsible for the


2. Installation (slightly)




Iv. Installation of database software


1. Pre-Test installation conditions are satisfied
c:\grid> runcluvfy stage-pre dbinst-n tc1,tc2-verbose


2. Installation (slightly)
Install database software card in 100%, card for about 1 hours, once thought the card died, finally finally wait until it completely installed
After the end, perform oracle_home/bin/selecthome.bat on the remote node to activate the following 5 products:
Oracle Data Provider for. NET
Oracle Provider for OLE DB
Oracle Objects for OLE
Oracle Counters for Windows performance Monitor
Oracle Administration Assistant


V. Create a disk group (ASMCA)


1. Create +data and +fra disk groups
C:\users\administrator>set Oracle_home=c:\app\11.2.0\grid
C:\users\administrator>set ORACLE_SID=+ASM1
C:\users\administrator>asmcmd
Asmcmd> ls
data/
fra/
ocrvote/


2. Create an OCR image backup
Although a disk group has previously been created separately for OCR and Votedisk, Oracle recommends that you store OCR images in at least one of the other disk groups, noting that each disk group can only hold an OCR mirror
C:\users\administrator>asmcmd lsof
Db_name instance_name Path
+asm +ASM1 +ocrvote.255.4294967295
Because the DB instance is not created at this time, only one file is currently available in the +ocrdate disk group, which is the OCR file


C:\users\administrator>asmcmd
Asmcmd> CD Ocrvote/tc-cluster/ocrfile
Asmcmd> ls
registry.255.854982335
asmcmd> pwd
+ocrvote/tc-cluster/ocrfile
Note that the actual filename of OCR is registry.255.854982335, not +ocrvote.255.4294967295, which is just a path


How OCR files are backed up


--Automatic backup
C:\users\administrator>ocrconfig-showbackup
Prot-24:oracle automatic backup of the cluster registry is not available
Prot-25:oracle Manual backup of the cluster registry is not available


Default Oracle provides 5 automated backups, monthly, weekly, Day, and last 3 changes, or manual backups, because it is a newly deployed environment, so automatic backups have not been generated and no manual backups have been performed


--Manual backup
C:\users\administrator>ocrconfig-manualbackup


TC2 2014/08/08 11:05:30 C:\app\11.2.0\grid\cdata\tc-cluster\backup_20140
808_110530.ocr
By default, under "%oracle_crs_home%\cdata\ Cluster name \", the file name format is "BACKUP_XXXXXXXX_XXXXXX.ORC"
This default location can be changed by the-backuploc parameter.
C:\users\administrator>ocrconfig-backuploc C:\app


C:\users\administrator>ocrconfig-manualbackup


TC2 2014/08/08 11:20:38 C:\APP\BACKUP_20140808_112038.OCR


TC2 2014/08/08 11:05:30 C:\app\11.2.0\grid\cdata\tc-cluster\backup_20140
808_110530.ocr


Note that the above command was executed on the TC1 node, but by default it was placed on the local path of the TC2 node, and I tried to perform a manual backup on node 2 again, still generating an OCR backup on the path specified locally on the TC2 node, was it specifically designed by Oracle?


--How to export/import to a local disk
Ocrconfig-export C:\OCR_BAK.OCR
Ocrconfig-import C:\OCR_BAK.OCR


Note: Recovery with automatic or manual backup is done with restore instead of import


--Add OCR redundancy to the disk group
C:\users\administrator>ocrconfig-add +data
C:\users\administrator>ocrconfig-add +fra
C:\users\administrator>ocrcheck
The status of the Oracle cluster registry is as follows:
Version: 3
Total Space (KB): 262120
Used Space (KB): 2808
Free Space (KB): 259312
id:513928542
Device/File name: +ocrvote
Device/File Integrity check succeeded
Device/File name: +data
Device/File Integrity check succeeded
Device/File name: +fra
Device/File Integrity check succeeded


Device/File Not configured


Device/File Not configured


Cluster registry Integrity Check succeeded


Logical corruption Check Succeeded


Here, the +data and +fra disk groups are configured with an OCR backup, and you can see that Oracle provides up to 5 locations to back up OCR


As you can see, Oracle provides a variety of methods to back up the Orc, in the 10g, more is used to store on more than one raw device, and then use Export/import to Raw disk in the way of backup recovery, to the 11g,oracle put the OCR into the disk group, The default is the disk group where Votedisk is placed, and it is recommended to create redundancy in other disk groups


3. View the voting disk
C:\users\administrator>crsctl Query CSS Votedisk
# # state file Universal Id file Name Disk Group
--  -----    -----------------                --------- ---------
1. ONLINE 7a6a6919ffe84fcfbf1e242c18f0b93e (\\.\ORCLDISKOCRVOTE2) [Ocrvote]
2. ONLINE 5857035b4da74fb3bf2f9c7d79a8aa2e (\\.\orcldiskocrvote1) [Ocrvote]
3. ONLINE 7dd5966551d84fcbbffd88b32c038537 (\\.\ORCLDISKOCRVOTE0) [Ocrvote]
3 voting disks were found.


Vi. Creating a DB instance (DBCA)


1. Whether the RAC database software installed before preflight is normal
c:\grid> runcluvfy stage-pre dbcfg-n all-d C:\app\11.2.0\grid-verbose


2. Create a DB instance
C:\grid> DBCA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.