[RAC]ORACLE Database 10g RAC for Administrators學習筆記(一)
0. Introduction
What Is a Cluster?
Interconnected nodes act as a single server
Cluster software hides the structure
Disks are available for read and write by all nodes.
Operating system is the same on each machine
What Is Oracle Real Application Clusters?
Multiple instances accessing the same database
One Instance per node
Physical or logical access to each database file
Software-controlled data access
Why Use RAC
High availability
Scalability
Pay as you grow
Key grid computing features
Levels of Scalability
Hardware: Disk input/output (I/O)
Internode communication: High bandwidth and low latency
Operating system: Number of CPUs
Database management system: Synchronization
Application: Design
Scaleup and Speedup
Global Resources Coordination
RAC使用Global Resource Directory (GRD)來記錄資料庫中資源的使用情況。每個instance管理一部分GRD(resource master)。
Global Cache Services (GCS)-負責在多個instance間維持資料庫的多份copy的一致性。使用Cache Fusion演算法。
Global Enqueue Services (GES)-負責維持instance間除cache fusion外的其他資源並跟蹤enqueue的機制。
Global Cache Coordination: Example
1. The second instance attempting to modify the block submits a request to the GCS.
2. The GCS transmits the request to the holder.
3. The first instance receives the message and sends the block to the second instance. The first instance retains the dirty buffer for recovery purposes (past image).
4. On receipt of the block, the second instance informs the GCS that it holds the block.
Write to Disk Coordination: Example
1. The first instance sends a write request to the GCS.
2. The GCS forwards the request to the holder of the current version of the block.
3. The second instance receives the write request and writes the block to disk.
4. The second instance records the completion of the write operation with the GCS.
5. The GCS orders all past image holders to discard their past images.
Dynamic Reconfiguration
當有節點離開或加入cluster,GRD會重新分配。使用lazy remastering演算法,只重新分配最小部分的GRD。同時,所有instance在GRD的grant情況中把所有對於失敗的instance的引用都去除。
Object Affinity and Dynamic Remastering
Dynamic remastering:GCS會記錄哪些instance經常訪問哪些objects,必要時根據訪問頻度調整GRD的分配。
Global Dynamic Performance Views
GV$檢視-將V$檢視按instance整合的全域性性檢視。
使用特殊的並行機制獲取:coordinator執行在客戶端連線的instance,其他instance上各起一個並行程式。
Additional Memory Requirement for RAC
• Heuristics for scalability cases:
– 15% more shared pool
– 10% more buffer cache
可透過V$RESOURCE_LIMIT中關於ges和gcs的相關統計
Efficient Internode Row-Level Locking
Block的傳輸不受row-level lock的影響
Parallel Execution with RAC
並行執行一般在一個instance上起並行程式,但如有需要也可擴充套件到其他instance上。
RAC Software Principles
Additional background processes
• LMON: Global Enqueue Service Monitor
• LMD0: Global Enqueue Service Daemon
• LMSx: Global Cache Service Processes, where x can range from 0 to j
• LCK0: Lock process
• DIAG: Diagnosability process
Main processes of Oracle Clusterware
• CRSD and RACGIMON: Are engines for high-availability operations
• OCSSD: Provides access to node membership and group services
• EVMD: Scans callout directory and invokes callouts in reactions to detected events
• OPROCD: Is a process monitor for the cluster (not used on Linux and Windows)
RAC Software Storage Principles
CRS_HOME
安裝在本地儲存
ORACLE_HOME
ASM_HOME
可安裝在本地儲存或共享儲存,但在本地儲存上可實現滾動升級
Voting files: Is essentially used by the Cluster Synchronization Services daemon for node-monitoring information across the cluster. Its size is set to around 20 MB.
OCR files: It maintains information about the high-availability components in your cluster, such as the cluster node list, cluster database instance to node mapping, and CRS application resource profiles (such as services, Virtual Interconnect Protocol addresses, and so on). This file is maintained by administrative tools such as SRVCTL. Its size is around 100 MB.
以上兩項在ASM例項起來前就會使用,因此不能存放於ASM儲存,必須是raw device或Cluster File System
Data files
Temp files
Control files
Flash recovery area files
Change tracking file
SPFILE
TDE Wallet
以上必須存放在共享儲存,可以是ASMraw deviceCFS,多個例項公用
Undo tablespace
Online redo log files
以上必須存放在共享儲存,可以是ASMraw deviceCFS,每個例項獨佔
Archive logs
不能存放於raw device,可不存放在共享儲存,但在做recovery時必須使其他例項能訪問(如使用NFS)
Typical Cluster Stack with RAC
Unix和Linux平臺使用UDP on Gigabit Ethernet (GbE) 作為節點間通訊協議
使用Oracle的clusterware可以減少安裝和支援的複雜度,但如使用no-Ethernet的連線或部署了依賴於clusterware的其他應用,則需要安裝vendor clusterware。
RAC and Services
可用service將應用分解成多個邏輯上獨立的系統,更好地進行負載均衡、優先順序控制、效能監控等。(handled by instance using metrics, alerts, scheduler job classes and resource manager.
1. Oracle Clusterware Installation and Configuration
Oracle RAC 10g Installation
– Phase one installs Oracle Clusterware.
– Phase two installs the Oracle Database 10g software with RAC.
Oracle RAC 10g Installation: Outline
1. Complete preinstallation tasks:
– Hardware requirements
– Software requirements
– Environment configuration, kernel parameters, and so on
2. Perform Oracle Clusterware installation.
3. Perform ASM installation.
4. Perform Oracle Database 10g software installation.
5. Install EM agent on cluster nodes.
6. Perform cluster database creation.
7. Complete postinstallation tasks.
Windows and UNIX Installation Differences
• Startup and shutdown services
• Environment variables
• DBA account for database administrators
• Account for running the OUI
Preinstallation Tasks
Check system requirements. 硬體配置、網路配置、共享儲存
Check software requirements. 作業系統版本和相關包、hangcheck-timer Module-Linux必須、安裝OCFS程式包-Linux,可選
Check kernel parameters.核心引數
Create groups and users. 建立使用者和組、放開系統限制、配置遠端cluster安裝(SSH)
Perform cluster setup.
Virtual IP Addresses and RAC
使用虛IP來配置tns服務名-一個接點down時,另一個節點自動接管虛IP,即刻返回錯誤並使客戶端使用其他地址重連,無須等待網路超時時間。
Verifying Cluster Setup with cluvfy
可用於進行一些preinstallation或postinstallation的check
Verifying the Oracle Clusterware Installation
檢查/etc/inittab檔案中是否加如了evmd、cssd、crsd程式的自動啟動
2. RAC Software Installation3. RAC Database Creation
Database Services
Transparent Application Failover (TAF) policy
• None: Do not use TAF.
• Basic: Establish connections at failover time.
• Pre-connect: Establish one connection to a preferred instance and another connection to a backup instance that you have selected to be available.
Single Instance to RAC Conversion
• Single-instance databases can be converted to RAC using:
– DBCA
– Enterprise Manager
– RCONFIG utility
• Before conversion, ensure that:
– Your hardware and operating system are supported
– Your cluster nodes have access to shared storage
Single-Instance Conversion Using the DBCA
Conversion steps for a single-instance database on nonclustered hardware:
1. Back up the original single-instance database
使用dbca建立模板
檔案路徑可選,預設為$ORACLE_HOME/assistants/dbca/templates/下
選擇“Maintain the file locations”以便於可將檔案restore到當前路徑
生成檔案template_name.dbc(資料庫結構檔案)& template_name.dfb(資料庫映象檔案)
2. Perform the preinstallation steps.
3. Set up and validate the cluster.
4. Copy the preconfigured database image.
5. Install the Oracle Database 10g software with Real Application Clusters.
選擇dbca template selection->Copy the Preconfigured Database Image
Single-Instance Conversion Using rconfig
1. Edit the ConvertToRAC.xml file located in the
$ORACLE_HOME/assistants/rconfig/sampleXMLs directory.
2. Modify the parameters in the ConvertToRAC.xml file as required for your system.
3. Save the file under a different name.
rconfig my_rac_conversion.xml
Single-Instance Conversion Using Grid Control
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8558093/viewspace-1015729/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 10g RAC故障處理Oracle 10g
- RAC學習筆記-Day_01筆記
- 10g RAC on AIXAI
- Linux下Oracle 11.2.0.1 RAC安裝筆記LinuxOracle筆記
- Oracle 10g RAC 資料儲存更換Oracle 10g
- Disable Database Audit In Oracle 19c RAC-20220111DatabaseOracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- AIX 5.3 Install Oracle 10g RAC 錯誤集錦AIOracle 10g
- oracle RACOracle
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- Solaris 10下遷移10G RAC (一)
- Oracle RAC一鍵部署004(RAC引數校驗)Oracle
- Oracle RAC Cache Fusion 系列八:Oracle RAC 分散式資源管理(一)Oracle分散式
- Oracle 19c Concepts(18):Concepts for Database AdministratorsOracleDatabase
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBookOracleDatabaseRedhatMac
- ORACLE RAC clusterwareOracle
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- oracle 10g flashback databaseOracle 10gDatabase
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- Oracle 19c Concepts(17):Topics for Database Administrators and DevelopersOracleDatabaseDeveloper
- oracle學習筆記《一》Oracle筆記
- 【RAC】Oracle rac 如何修改公網及vipOracle
- Oracle RAC Cache Fusion 系列十四:Oracle RAC CR Server Part OneOracleServer
- Oracle RAC Cache Fusion 系列十:Oracle RAC Enqueues And Lock Part 1OracleENQ
- Oracle RAC一鍵部署大綱Oracle
- Oracle RAC Wait EventsOracleAI
- oracle rac 增加磁碟Oracle
- Scheduler in Oracle Database 10g(轉)OracleDatabase
- 10g NewFeatures學習筆記(轉)筆記
- Oracle RAC Cache Fusion 系列九:Oracle RAC 分散式資源管理(二)Oracle分散式
- 【RAC】Oracle RAC上線測試場景介紹Oracle
- Solaris 10下遷移10G RAC (六)
- Solaris 10下遷移10G RAC (八)
- Solaris 10下遷移10G RAC (四)
- Solaris 10下遷移10G RAC (二)
- Solaris 10下遷移10G RAC (七)
- Solaris 10下遷移10G RAC (三)
- Solaris 10下遷移10G RAC (五)