Oracle RMAN 大端到小端
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3811417/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle RMAN big-endian to little-endian
提问by A. Murray
I have an Oracle RMAN backup that was created on a Solaris SPARC box and is therefore in big-endian format. I wish to restore this backup to a Windows x86-64 based machine but have hit a roadblock due to the endianness issue.
我有一个 Oracle RMAN 备份,它是在 Solaris SPARC 机器上创建的,因此采用大端格式。我希望将此备份恢复到基于 Windows x86-64 的机器,但由于字节顺序问题遇到了障碍。
I have read on Wikipedia http://en.wikipedia.org/wiki/Endianness#Endianness_in_files_and_byte_swapthat it's not possible to do a generic conversion of the endianness of a file as the legnth of the variables stored in the binary file are not known, which I can understand.
我在维基百科http://en.wikipedia.org/wiki/Endianness#Endianness_in_files_and_byte_swap上读到,不可能对文件的字节序进行通用转换,因为存储在二进制文件中的变量的长度未知,我能理解。
I have discovered that RMAN will convert the endianness of datafiles or tablespaces using the CONVERT command, however to get this far I have to have the datafiles in place which means restoring from the control file has to have already taken place (which is in big-endian so can't even do that). The following seems to suggest that it's not possible http://arjudba.blogspot.com/2008/08/rman-06172-no-autobackup-found.htmland that I must have the control file in the correct endian to begin with.
我发现 RMAN 将使用 CONVERT 命令转换数据文件或表空间的字节序,但是要做到这一点,我必须将数据文件放置到位,这意味着必须已经从控制文件中恢复(这是大字节序所以甚至不能这样做)。以下似乎表明不可能http://arjudba.blogspot.com/2008/08/rman-06172-no-autobackup-found.html并且我必须以正确的字节序开始控制文件。
I know that I can import the above RMAN backup onto a Solaris SPARC machine then do an exp/imp process but I'm really interested in getting a one-machine restore process in place.
我知道我可以将上述 RMAN 备份导入到 Solaris SPARC 机器上,然后执行 exp/imp 过程,但我真的很想获得一个单机还原过程。
Can anyone suggest a route to achieve what I'm looking for? - which is; a big-endian RMAN backup from a Solaris SPARC system restored to a little-endian Win32 x86-64 platform?
谁能建议一条路线来实现我正在寻找的东西?- 即;从 Solaris SPARC 系统恢复到小端 Win32 x86-64 平台的大端 RMAN 备份?
采纳答案by A. Murray
I've read chapter 15 of the Oracle Database Backup and Recovery Advanced User's Guide and nothing jumps out as a viable option. The CONVERT DATAFILE command seems like the most appropriate but this assumes you have access to the datafiles to begin with, which as I had stated are wrapped in an RMAN backup, so they are in multiple backup 'pieces'. Given this, the other option that springs to mind is to do an RMAN restore on the windows machine then convert the resulting datafiles, but the control file is not recognised by RMAN as I suspect it's a big-endian format.
我已经阅读了 Oracle 数据库备份和恢复高级用户指南的第 15 章,没有什么是可行的选择。CONVERT DATAFILE 命令似乎是最合适的,但前提是您可以访问数据文件,正如我所说,这些文件包含在 RMAN 备份中,因此它们位于多个备份“部分”中。鉴于此,我想到的另一个选项是在 Windows 机器上进行 RMAN 还原,然后转换生成的数据文件,但 RMAN 无法识别控制文件,因为我怀疑它是大端格式。
It would appear that restoring databases/datafiles from a CONVERT DATAFILES command results in a new control file being created on the destination host which means restoring from future RMAN backups from the same source is not possible.
似乎从 CONVERT DATAFILES 命令恢复数据库/数据文件会导致在目标主机上创建一个新的控制文件,这意味着从同一源的未来 RMAN 备份恢复是不可能的。
Given all of the above and unless anyone else can correct me, RMAN restores on a platform of a different endian to that of the source platform are not possible.
鉴于上述所有情况,除非其他人可以纠正我,否则 RMAN 在与源平台不同端的平台上还原是不可能的。
回答by Dave Costa
Check out chapter 15, "RMAN Cross-Platform Transportable Databases and Tablespaces", of the Oracle? Database Backup and Recovery Advanced User's Guide.
查看 Oracle 的第 15 章“RMAN 跨平台可传输数据库和表空间”?数据库备份和恢复高级用户指南。
It appears CONVERT is the tool you are looking for, but you need to use it in conjunction with transportable tablespaces.
看起来 CONVERT 是您正在寻找的工具,但您需要将它与可传输表空间结合使用。
回答by klayme
Have you tried restoring the controlfile using an RMAN catalog? This way, you'll be able to restore the controlfile with the convert option. Also, the catalog will allow you to access the backupsets to restore the datafiles, again with the convert option. To do this, you'll have to register and synchronize your database in the rman catalog, so it has the information of the backups taken.
您是否尝试过使用 RMAN 目录恢复控制文件?这样,您就可以使用转换选项恢复控制文件。此外,目录将允许您访问备份集以恢复数据文件,再次使用转换选项。为此,您必须在 rman 目录中注册和同步您的数据库,因此它具有所采取的备份信息。