Oracle 10g利用amdu抽取數(shù)據(jù)文件的方法教程
前言
本文主要給大家介紹的是關(guān)于Oracle 10g利用amdu抽取數(shù)據(jù)文件的相關(guān)內(nèi)容,下面話不多說(shuō)了,來(lái)一起看看詳細(xì)的介紹吧
環(huán)境:OEL 5.7 + Oracle 10.2.0.5 RAC
需求:實(shí)驗(yàn)在Oracle 10g環(huán)境使用amdu抽取數(shù)據(jù)庫(kù)文件
本文主要目的是介紹3個(gè)知識(shí)點(diǎn):
1.使amdu可以在oracle 10g環(huán)境中使用
2.使kfed可以在oracle 10g環(huán)境中使用
3.amdu如何抽取損壞的ASM磁盤組數(shù)據(jù)
1.使amdu可以在oracle 10g環(huán)境中使用
在Oracle 10g環(huán)境,并沒(méi)有自帶amdu工具,需要自行去下載:
具體可以參考MOS文檔:
Placeholder for AMDU binaries and using with ASM 10g, 11g, 12c (文檔 ID 553639.1)
> $cd <your directory>
> $export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
> or $setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:`pwd`
> $export PATH=$PATH:`pwd` or setenv PATH ${PATH}:`pwd`
>
> or
>
> $cd <your directory>
> $export LIBPATH=$LIBPATH:`pwd`
> or $setenv LIBPATH ${LIBPATH}:`pwd`
> $export PATH=$PATH:`pwd` or setenv PATH ${PATH}:`pwd`
注意:如果是AIX平臺(tái),則對(duì)應(yīng)的是設(shè)置LIBPATH環(huán)境變量。我這里是Linux,所以設(shè)置LD_LIBRARY_PATH環(huán)境變量:
unzip /tmp/amdu_X86-64.zip export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd` export PATH=$PATH:`pwd`
2.使kfed可以在oracle 10g環(huán)境中使用
在Oracle 10g環(huán)境kfed需要編譯:
ASM tools used by Support : KFOD, KFED, AMDU (文檔 ID 1485597.1)
KFED executable comes with installation from 11.1 onwards; for the older version you must build it.
編譯方法如下:
$cd $ORACLE_HOME/rdbms/lib $make -f ins_rdbms.mk ikfed
3.amdu如何抽取損壞的ASM磁盤組數(shù)據(jù)
在ASM磁盤組損壞時(shí),如何使用amdu工具來(lái)抽取數(shù)據(jù)庫(kù)文件:
How to Restore the Database Using AMDU after Diskgroup Corruption (文檔 ID 1597581.1)
1. Create pfile of lost database , from database alert.log startup messages. 2. Startup database in nomount 3. Get the controlfile number from db alert log , it will show while starting the database here in this eg. its 256 eg., control_files='+DATA/orcl/controlfile/current.256.709676643' If you have controlfile backup already in non-asm location edit the pfile to point to location of non-asm and then mount the database If you dont have controlfile backup then go to step 4 after determining the file# from step 3 4. $ amdu -diskstring <asm_diskstring> -extract DATA.256 5. shutdown the database and change the control_file location to point to the extracted file location 6. startup mount the database 7. once mounted, get the datafile file numbers using "select name from v$datafile" And get online redo logfile from "select * from v$logfile". 8. Extract all datafiles and redolog files in similar manner 9. alter database rename <datafile 1> to < newly extracte location> 10. open the database
實(shí)際可以做實(shí)驗(yàn)去驗(yàn)證下MOS這個(gè)步驟的可行性:
1.創(chuàng)建參數(shù)文件
2.啟動(dòng)數(shù)據(jù)庫(kù)到nomount狀態(tài)
3.獲取到控制文件的number
4.抽出控制文件
5.關(guān)閉數(shù)據(jù)庫(kù),修改control_file值
6.啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)
7.獲取到數(shù)據(jù)文件、日志文件的number
8.抽取數(shù)據(jù)文件和redo日志文件
9.重命名數(shù)據(jù)庫(kù)文件到新位置
10.打開數(shù)據(jù)庫(kù)
總結(jié)
以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,如果有疑問(wèn)大家可以留言交流,謝謝大家對(duì)腳本之家的支持。
相關(guān)文章
Oracle DATABASE LINK(DBLINK)創(chuàng)建與刪除方法
這篇文章主要介紹了Oracle DATABASE LINK(DBLINK)創(chuàng)建與刪除方法,需要的朋友可以參考下2016-02-02
Oracle數(shù)據(jù)庫(kù)添加/刪除/修改表字段超詳細(xì)指南
這篇文章主要給大家介紹了關(guān)于Oracle數(shù)據(jù)庫(kù)添加/刪除/修改表字段的超詳細(xì)指南, 本文主要是關(guān)于Oracle數(shù)據(jù)庫(kù)表中字段的增加、刪除、修改和重命名的操作,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下2024-01-01
Oracle數(shù)據(jù)泵的導(dǎo)入與導(dǎo)出實(shí)例詳解
這篇文章主要給大家介紹了關(guān)于Oracle數(shù)據(jù)泵的導(dǎo)入與導(dǎo)出的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-11-11
重新編譯PLSQL中的無(wú)效對(duì)象或者指定的對(duì)象 的方法
重新編譯PLSQL中的無(wú)效對(duì)象或者指定的對(duì)象 的方法...2007-04-04
Oracle聯(lián)機(jī)日志文件與歸檔文件詳細(xì)介紹
這篇文章主要介紹了Oracle聯(lián)機(jī)日志文件與歸檔文件,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧2022-11-11
使用zabbix監(jiān)控oracle表數(shù)據(jù)的方法
有時(shí)候我們需要對(duì)表中的數(shù)據(jù)進(jìn)行監(jiān)控,比如筆者的這種場(chǎng)景:?微服務(wù)自己實(shí)現(xiàn)了定時(shí)任務(wù),定時(shí)任務(wù)的執(zhí)行結(jié)果會(huì)記錄到某張日志表中,如果定時(shí)任務(wù)執(zhí)行失敗將會(huì)對(duì)業(yè)務(wù)產(chǎn)生影響,所以筆者用zabbix+python進(jìn)行了監(jiān)控,當(dāng)任務(wù)失敗時(shí)?進(jìn)行告警,需要的朋友可以參考下2024-04-04
Oracle數(shù)據(jù)庫(kù)中通用的函數(shù)實(shí)例詳解
OracleSQL提供了用于執(zhí)行特定操作的專用函數(shù),這些函數(shù)大大增強(qiáng)了SQL語(yǔ)言的功能,下面這篇文章主要給大家介紹了關(guān)于Oracle數(shù)據(jù)庫(kù)中通用函數(shù)的相關(guān)資料,需要的朋友可以參考下2022-03-03

