刚刚在公司的一台PC机器上用vmware workstation8搭建了一套10gr2的rac环境,用的是裸设备+ASM搭建,在安装成功后,不小心被直接重
2011.11.23虚拟机RAC的ASM磁盘组坏块导致重建DB
刚刚在公司的一台PC机器上用vmware workstation8搭建了一套10gr2的rac环境,用的是裸设备+ASM搭建,在安装成功后,不小心被直接重启了下主机,结果再次启动虚拟机的时候提示到有磁盘损坏,也没有在意。但是在启动RAC的时候出现了问题,一开始的现象是如下几个个资源没办法随着其他资源一起启动:
ora.node1.LISTENER_NODE1.lsnr
ora.node2.LISTENER_NODE2.lsnr
ora.RAC.RAC1.inst
ora.RAC.RAC2.inst
ora.RAC.db
看具体的启动过程:
[Oracle@node1 bin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....C1.inst application OFFLINE OFFLINE
ora....C2.inst application OFFLINE OFFLINE
ora.RAC.db application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
[oracle@node1 bin]$ crs_start -all
Attempting to start `ora.node1.vip` on member `node1`
Attempting to start `ora.node2.vip` on member `node2`
Start of `ora.node1.vip` on member `node1` succeeded.
Start of `ora.node2.vip` on member `node2` succeeded.
Attempting to start `ora.node1.ASM1.asm` on member `node1`
Attempting to start `ora.node2.ASM2.asm` on member `node2`
Start of `ora.node2.ASM2.asm` on member `node2` succeeded.
Attempting to start `ora.RAC.RAC2.inst` on member `node2`
Start of `ora.RAC.RAC2.inst` on member `node2` failed.
node1 : CRS-1018: Resource ora.node2.vip (application) is already running on node2
node1 : CRS-1018: Resource ora.node2.vip (application) is already running on node2
Start of `ora.node1.ASM1.asm` on member `node1` succeeded.
Attempting to start `ora.RAC.RAC1.inst` on member `node1`
Start of `ora.RAC.RAC1.inst` on member `node1` failed.
node2 : CRS-1018: Resource ora.node1.vip (application) is already running on node1
node2 : CRS-1018: Resource ora.node1.vip (application) is already running on node1
CRS-1002: Resource 'ora.node1.ons' is already running on member 'node1'
CRS-1002: Resource 'ora.node2.ons' is already running on member 'node2'
Attempting to start `ora.node1.gsd` on member `node1`
Attempting to start `ora.RAC.db` on member `node1`
Attempting to start `ora.node2.gsd` on member `node2`
Start of `ora.node1.gsd` on member `node1` succeeded.
Start of `ora.node2.gsd` on member `node2` succeeded.
Start of `ora.RAC.db` on member `node1` failed.
Attempting to start `ora.RAC.db` on member `node2`
Start of `ora.RAC.db` on member `node2` failed.
CRS-1006: No more members to consider
CRS-0215: Could not start resource 'ora.RAC.RAC1.inst'.
CRS-0215: Could not start resource 'ora.RAC.RAC2.inst'.
CRS-0215: Could not start resource 'ora.RAC.db'.
CRS-0223: Resource 'ora.node1.LISTENER_NODE1.lsnr' has placement error.
CRS-0223: Resource 'ora.node1.ons' has placement error.
CRS-0223: Resource 'ora.node2.LISTENER_NODE2.lsnr' has placement error.
CRS-0223: Resource 'ora.node2.ons' has placement error.
[oracle@node1 bin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....C1.inst application ONLINE OFFLINE
ora....C2.inst application ONLINE OFFLINE
ora.RAC.db application ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
尝试先把lsnr起来:
[oracle@node1 bin]$ crs_start ora.node1.LISTENER_NODE1.lsnr
Attempting to start `ora.node1.LISTENER_NODE1.lsnr` on member `node1`
Start of `ora.node1.LISTENER_NODE1.lsnr` on member `node1` succeeded.
[oracle@node1 bin]$ crs_start ora.node2.LISTENER_NODE2.lsnr
Attempting to start `ora.node2.LISTENER_NODE2.lsnr` on member `node2`
Start of `ora.node2.LISTENER_NODE2.lsnr` on member `node2` succeeded.
接着启动两个inst,接着出现问题了,,inst无法拉起来:
[oracle@node1 bin]$ crs_start ora.RAC.RAC1.inst
Attempting to start `ora.RAC.RAC1.inst` on member `node1`
Start of `ora.RAC.RAC1.inst` on member `node1` failed.
node2 : CRS-1018: Resource ora.node1.vip (application) is already running on node1

在數據庫優化中,應根據查詢需求選擇索引策略:1.當查詢涉及多個列且條件順序固定時,使用複合索引;2.當查詢涉及多個列但條件順序不固定時,使用多個單列索引。複合索引適用於優化多列查詢,單列索引則適合單列查詢。

要優化MySQL慢查詢,需使用slowquerylog和performance_schema:1.啟用slowquerylog並設置閾值,記錄慢查詢;2.利用performance_schema分析查詢執行細節,找出性能瓶頸並優化。

MySQL和SQL是開發者必備技能。 1.MySQL是開源的關係型數據庫管理系統,SQL是用於管理和操作數據庫的標準語言。 2.MySQL通過高效的數據存儲和檢索功能支持多種存儲引擎,SQL通過簡單語句完成複雜數據操作。 3.使用示例包括基本查詢和高級查詢,如按條件過濾和排序。 4.常見錯誤包括語法錯誤和性能問題,可通過檢查SQL語句和使用EXPLAIN命令優化。 5.性能優化技巧包括使用索引、避免全表掃描、優化JOIN操作和提升代碼可讀性。

MySQL異步主從復制通過binlog實現數據同步,提升讀性能和高可用性。 1)主服務器記錄變更到binlog;2)從服務器通過I/O線程讀取binlog;3)從服務器的SQL線程應用binlog同步數據。

MySQL是一個開源的關係型數據庫管理系統。 1)創建數據庫和表:使用CREATEDATABASE和CREATETABLE命令。 2)基本操作:INSERT、UPDATE、DELETE和SELECT。 3)高級操作:JOIN、子查詢和事務處理。 4)調試技巧:檢查語法、數據類型和權限。 5)優化建議:使用索引、避免SELECT*和使用事務。

MySQL的安裝和基本操作包括:1.下載並安裝MySQL,設置根用戶密碼;2.使用SQL命令創建數據庫和表,如CREATEDATABASE和CREATETABLE;3.執行CRUD操作,使用INSERT,SELECT,UPDATE,DELETE命令;4.創建索引和存儲過程以優化性能和實現複雜邏輯。通過這些步驟,你可以從零開始構建和管理MySQL數據庫。

InnoDBBufferPool通過將數據和索引頁加載到內存中來提升MySQL數據庫的性能。 1)數據頁加載到BufferPool中,減少磁盤I/O。 2)臟頁被標記並定期刷新到磁盤。 3)LRU算法管理數據頁淘汰。 4)預讀機制提前加載可能需要的數據頁。

MySQL適合初學者使用,因為它安裝簡單、功能強大且易於管理數據。 1.安裝和配置簡單,適用於多種操作系統。 2.支持基本操作如創建數據庫和表、插入、查詢、更新和刪除數據。 3.提供高級功能如JOIN操作和子查詢。 4.可以通過索引、查詢優化和分錶分區來提升性能。 5.支持備份、恢復和安全措施,確保數據的安全和一致性。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!