标签:rup disk 环境变量 log 打开 new amd 状态 already
环境:OEL 5.7 + Oracle 10.2.0.5 RAC
需求:实验在Oracle 10g环境使用amdu抽取数据库文件
本文主要目的是介绍3个知识点:
在Oracle 10g环境,并没有自带amdu工具,需要自行去下载:
具体可以参考MOS文档:
> $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平台,则对应的是设置LIBPATH环境变量。我这里是Linux,所以设置LD_LIBRARY_PATH环境变量:
unzip /tmp/amdu_X86-64.zip
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`
export PATH=$PATH:`pwd`
在Oracle 10g环境kfed需要编译:
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
在ASM磁盘组损坏时,如何使用amdu工具来抽取数据库文件:
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
实际可以做实验去验证下MOS这个步骤的可行性:
1.创建参数文件
2.启动数据库到nomount状态
3.获取到控制文件的number
4.抽出控制文件
5.关闭数据库,修改control_file值
6.启动数据库到mount状态
7.获取到数据文件、日志文件的number
8.抽取数据文件和redo日志文件
9.重命名数据库文件到新位置
10.打开数据库
标签:rup disk 环境变量 log 打开 new amd 状态 already
原文地址:https://www.cnblogs.com/jyzhao/p/10100032.html