[20131113]移植11G的amdu到10g.txt

[20131113]移植11G的amdu到10g.txt

AMDU是ORACLE针对ASM开发的源数据转储工具,其全称为ASM Metadata Dump Utility(AMDU).AMDU是11g才发布的工具,但是实际对10g的ASM 也有效。metalink下10g应该也有下载。
理论讲11G的asm应该与10的asm保存格式应该一样。自己看看以否可以把amdu移植到10g下使用。自己做一些尝试。

$ ldd `which amdu`
        linux-vdso.so.1 =>  (0x00007fff0adfc000)
        libasmclnt11.so => /u01/app/oracle/product/11.2.0/grid/lib/libasmclnt11.so (0x00002b8636470000)
        libcell11.so => /u01/app/oracle/product/11.2.0/grid/lib/libcell11.so (0x00002b86365f2000)
        libskgxp11.so => /u01/app/oracle/product/11.2.0/grid/lib/libskgxp11.so (0x00002b8636749000)
        libhasgen11.so => /u01/app/oracle/product/11.2.0/grid/lib/libhasgen11.so (0x00002b8636902000)
        libskgxn2.so => /u01/app/oracle/product/11.2.0/grid/lib/libskgxn2.so (0x00002b8636e40000)
        libnnz11.so => /u01/app/oracle/product/11.2.0/grid/lib/libnnz11.so (0x00002b8636f43000)
        libocr11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocr11.so (0x00002b863730b000)
        libocrb11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocrb11.so (0x00002b86374a5000)
        libocrutl11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocrutl11.so (0x00002b8637640000)
        libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 (0x00002b863774b000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003f5ee00000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003f5f200000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003f5f600000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003f68400000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003f5ea00000)
        libaio.so.1 => /usr/lib64/libaio.so.1 (0x0000003f5e600000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003f5e200000)

--说明需要除了amdu外,需要拷贝grid/lib/目录下一些库文件。

$ ldd `which amdu`| grep -i grid
        libasmclnt11.so => /u01/app/oracle/product/11.2.0/grid/lib/libasmclnt11.so (0x00002ba49752a000)
        libcell11.so => /u01/app/oracle/product/11.2.0/grid/lib/libcell11.so (0x00002ba4976ac000)
        libskgxp11.so => /u01/app/oracle/product/11.2.0/grid/lib/libskgxp11.so (0x00002ba497803000)
        libhasgen11.so => /u01/app/oracle/product/11.2.0/grid/lib/libhasgen11.so (0x00002ba4979bc000)
        libskgxn2.so => /u01/app/oracle/product/11.2.0/grid/lib/libskgxn2.so (0x00002ba497efa000)
        libnnz11.so => /u01/app/oracle/product/11.2.0/grid/lib/libnnz11.so (0x00002ba497ffd000)
        libocr11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocr11.so (0x00002ba4983c5000)
        libocrb11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocrb11.so (0x00002ba49855f000)
        libocrutl11.so => /u01/app/oracle/product/11.2.0/grid/lib/libocrutl11.so (0x00002ba4986fa000)
        libclntsh.so.11.1 => /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 (0x00002ba498805000)

--使用scp命令拷贝到10g的机器,目录名为amdu。

$ ls -l
total 147328
-rwxr-x--x 1 oracle oinstall 25580740 Nov 13 10:55 amdu
-rw-r--r-- 1 oracle oinstall   703495 Nov 13 11:03 libasmclnt11.so
-rw-r--r-- 1 oracle oinstall   460569 Nov 13 11:07 libcell11.so
-rwxr-xr-x 1 oracle oinstall 48724689 Nov 13 10:55 libclntsh.so.10.1.xxx
-rwxr-xr-x 1 oracle oinstall 48724689 Nov 13 10:54 libclntsh.so.11.1
-rw-r--r-- 1 oracle oinstall 12820762 Nov 13 11:08 libhasgen11.so
-rw-r--r-- 1 oracle oinstall  7899997 Nov 13 10:56 libnnz11.so
-rw-r--r-- 1 oracle oinstall  1493029 Nov 13 11:08 libocr11.so
-rw-r--r-- 1 oracle oinstall  3217927 Nov 13 11:09 libocrb11.so
-rw-r--r-- 1 oracle oinstall   150756 Nov 13 11:09 libocrutl11.so
-rw-r--r-- 1 oracle oinstall    12771 Nov 13 15:15 libskgxn2.so
-rw-r--r-- 1 oracle oinstall   851253 Nov 13 10:55 libskgxp11.so

2.使用asmcmd查看:

> ls -l tools*
Type      Redund  Striped  Time             Sys  Name
DATAFILE  UNPROT  COARSE   NOV 10 03:00:00  Y    TOOLS.4927.772739245
--取出tools数据文件看看。

--修改环境变量LD_LIBRARY_PATH。
export LD_LIBRARY_PATH=/home/oracle/amdu:$LD_LIBRARY_PATH

$ ./amdu -diskstring '/dev/raw/raw1' -extract g0.4927
amdu_2013_11_13_15_21_13/
AMDU-00204: file not found; arguments: [1] [G0]
LEM-00031: Error encountered in lempgmh after calling lmserr.
--奇怪!出现错误,看目录数据文件已经取出。

$ dbv file=G0_4927.f
DBVERIFY: Release 10.2.0.4.0 - Production on Wed Nov 13 11:27:46 2013
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
DBVERIFY - Verification starting : FILE = G0_4927.f
DBVERIFY - Verification complete

Total Pages Examined         : 8192
Total Pages Processed (Data) : 220
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 69
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 7259
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 644
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Highest block SCN            : 3292304874 (0.3292304874)

--看看spfile文件copy备份。
RMAN> backup as copy spfile format '+g0';

Starting backup at 2013-11-13 11:23:35
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1049 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 2013-11-13 11:23:40
channel ORA_DISK_1: finished piece 1 at 2013-11-13 11:23:47
piece handle=+G0/XXXX/backupset/2013_11_13/nnsnf0_tag20131113t112338_0.21314.831381821 tag=TAG20131113T112338 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 2013-11-13 11:23:47

Starting Control File and SPFILE Autobackup at 2013-11-13 11:23:50
piece handle=+G0/XXXX/autobackup/2013_11_13/s_831381832.16735.831381837 comment=NONE
Finished Control File and SPFILE Autobackup at 2013-11-13 11:24:18

./amdu -diskstring '/dev/raw/raw1' -extract g0.21314
amdu_2013_11_13_11_25_42/
AMDU-00204: file not found; arguments: [1] [G0]
LEM-00031: Error encountered in lempgmh after calling lmserr.
--依旧报错!

$ strings G0_21314.f
}|{z
ICARE
TAG20131113T112338
*.__db_cache_size=1258291200
xxxx.__db_cache_size=1946157056
*.__java_pool_size=16777216
xxxx.__java_pool_size=16777216

--结果还是正确的。使用还是要小心。不要生产系统做这种测试!!!!

时间: 2024-11-15 00:27:03

[20131113]移植11G的amdu到10g.txt的相关文章

[20170821]使用oradebug模拟CBC(10g).txt

[20170821]使用oradebug模拟Cache Buffers chains(10g).txt --//上午测试了在读读模式下,不会出现Cache Buffers chains等待时间,链接http://blog.itpub.net/267265/viewspace-2143880/ --//下午在10g下使用oradebug模拟看看是否会出现Cache Buffers chains. 1.环境: SCOTT@test> @ &r/ver1 PORT_STRING          

[20171208]ORA-16014(10G).txt

[20171208]ORA-16014(10G).txt --//别人配置dg遇到的问题,当时没有记录.在自己的环境做一个演示.这个问题相对隐藏很深.主要是自己不注意这些细节. 1.环境: SYS@orcl> @ &r/ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- ----------------------------------

[20120803]11G SPM的学习1.txt

[20120803]11G SPM的学习1.txt     开始学习SQL Plan Management(SPM) ,11G开始提供SPM,在10g下我经常使用sql profile看一些bad sql语句,sql profile我觉得已经做的很好,有时候能够提供很好的建议.我开始学习SPM的时候感觉不习惯(也许是因为在toad下使用sql profile很简单)为什么oracle还有搞出SPM来,慢慢看资料,才明白其中一些细节.     我看过别人在从8i升级到9i的时候,出现性能波动,里面

[20141014]11G长时间分析问题.txt

[20141014]11G长时间分析问题.txt http://www.itpub.net/thread-1495845-1-1.html http://space.itpub.net/267265/viewspace-723066 http://blog.itpub.net/267265/viewspace-752117/ --我以前看到这条sql语句,我做了一些简单修改. 1. 问题提出: SCOTT@test> @ver1 PORT_STRING                    VE

[20170620]11G 12c expand sql text.txt

[20170620]11G 12c expand sql text.txt --//原来写的脚本只能分别在11g,12c单独使用.上午花一点点时间.把两者整合起来. --//讨论链接:http://www.itpub.net/thread-2088981-1-1.html --//再次感谢solomon_007的指点: set long 20000 set serveroutput on declare     L_sqltext clob := null;     l_version varc

[20161208]11g直方图与char数据类型.txt

[20161208]11g直方图与char数据类型.txt --以前看tom大师的书提到过不要使用char数据类型,哪怕是char(1)也不要使用,最近看了几篇blob里面都提到了11g升级后会出现char数 --据类型直方图统计发生了变化,我重复别人的例子来说明.再次强调不要生产环境使用char类型. --参考链接:http://blog.dbi-services.com/histograms-on-character-strings-between-11-2-0-3-and-11-2-0-4

[20171120]11G关闭直接路径读.txt

[20171120]11G关闭直接路径读.txt --//今天做filesystemio_options参数测试时,遇到一个关于直接路径读的问题. --//如果看以前的博客介绍,设置"_serial_direct_read"=never或者events '10949 trace name context forever';就可以关闭直接路径读. --//我的测试在11GR2下set events '10949 trace name context forever';不行. --//通过

[20170518]11G审计日志清除3.txt

[20170518]11G审计日志清除3.txt --//以前写的链接:http://blog.itpub.net/267265/viewspace-2133145/ --//我当时写存在许多问题,仅仅清除sys.aud$内容,参数audit_file_dest目录的文件不清除,而这里参数大量的aud文件,重新测试看看. 1.环境: SYS@book> @ &r/ver1 PORT_STRING                    VERSION        BANNER -------

[20150504]11G口令不对的问题.txt

[20150504]11G口令不对的问题.txt --前一阵子,遇到用户口令不对,导致登录缓慢的问题,主要11G加入密码错误验证延迟导致的.(哎现在看文档才知道) http://blog.itpub.net/267265/viewspace-1479718/ Preventing passwords from being broken. If a user tries to log in to Oracle Database multiple times using an incorrect p