数据库教程:Oracle 10g利用amdu抽取数据文件的方法教程

前言 本文主要给大家介绍的是关于oracle 10g利用amdu抽取数据文件的相关内容,下面话不多说了,来一起看看详细的介绍吧 环境:oel 5.7 + oracle

前言

数据库技术:Oracle 10g利用amdu抽取数据文件的方法教程主要给大家介绍的是关于oracle 10g利用amdu抽取数据文件的相关内容,下面话不多说了,来一起看看详细的介绍吧

环境:oel 5.7 + oracle 10.2.0.5 rac

需求:实验在oracle 10g环境使用amdu抽取数据库文件

数据库技术:Oracle 10g利用amdu抽取数据文件的方法教程主要目的是介绍3个知识点:

1.使amdu可以在oracle 10g环境中使用

2.使kfed可以在oracle 10g环境中使用

3.amdu如何抽取损坏的asm磁盘组数据

1.使amdu可以在oracle 10g环境中使用

在oracle 10g环境,并没有自带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平台,则对应的是设置libpath环境变量。我这里是linux,所以设置ld_library_path环境变量:

  unzip /tmp/amdu_x86-64.zip   export ld_library_path=$ld_library_path:`pwd`   export path=$path:`pwd`

2.使kfed可以在oracle 10g环境中使用

在oracle 10g环境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磁盘组数据

在asm磁盘组损坏时,如何使用amdu工具来抽取数据库文件:

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

实际可以做实验去验证下mos这个步骤的可行性:

1.创建参数文件

2.启动数据库到nomount状态

3.获取到控制文件的number

4.抽出控制文件

5.关闭数据库,修改control_file值

6.启动数据库到mount状态

7.获取到数据文件、日志文件的number

8.抽取数据文件和redo日志文件

9.重命名数据库文件到新位置

10.打开数据库

总结

以上就是这篇文章的全部内容了,希望数据库技术:Oracle 10g利用amdu抽取数据文件的方法教程的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对<计算机技术网(www.ctvol.com)!!>的支持。

需要了解更多数据库技术:Oracle 10g利用amdu抽取数据文件的方法教程,都可以关注数据库技术分享栏目—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/dtteaching/798773.html

(0)
上一篇 2021年9月12日
下一篇 2021年9月12日

精彩推荐