如何从备份文件(ora 文件)重新创建 oracle 9i 数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/296736/
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
How to recreate an oracle 9i database from backup files (ora files)
提问by user38341
I'm a developer so I'm a little lost in the DBA world. Our systems guys have given me a backup of an Oracle 9i database. I have installed oracle 9i on my pc and am now trying to 'import' the backup files so I have a normal database to work with.
我是一名开发人员,所以我对 DBA 世界有点迷茫。我们的系统人员给了我一个 Oracle 9i 数据库的备份。我已经在我的电脑上安装了 oracle 9i,现在我正在尝试“导入”备份文件,所以我有一个普通的数据库可以使用。
The backup folder has on SNCF[SID].ora file and around 150 [SID]-[Date]-[counter]-[soemnumber].ora files. The question is, how do I get this data into oracle so I can query it through sql?
备份文件夹中有 SNCF[SID].ora 文件和大约 150 个 [SID]-[Date]-[counter]-[soemnumber].ora 文件。问题是,如何将这些数据放入oracle,以便我可以通过sql进行查询?
I have gotten as far as creating a database which matches the SID of the backed up database. Google tells me that I need to go into rman and run "database restore." But how does it know where the backfiles are located?
我已经创建了一个与备份数据库的 SID 匹配的数据库。Google 告诉我,我需要进入 rman 并运行“数据库还原”。但是它怎么知道回溯文件的位置呢?
Any ideas? Thanks.
有任何想法吗?谢谢。
I...don't...know. Seriously, the Oracle data we backed up is part of a very old application which is being phased out. No one really owns the database, and we have no DBAs on hand...so it falls on me, the only developer. I can try to get more details for you tomorrow.
我不知道。说真的,我们备份的 Oracle 数据是正在逐步淘汰的非常旧的应用程序的一部分。没有人真正拥有数据库,而且我们手头也没有 DBA ……所以这落在了我这个唯一的开发人员身上。我明天可以试着为你了解更多细节。
In the mean time, the original database runs on a windows machine and is some version of 9i. I installed Oracle 9i (9.2.0.1.0) on my Windows XP box (I installed this older version specifically so I could recreate the database from the backed up files).
同时,原始数据库在 Windows 机器上运行,并且是 9i 的某个版本。我在我的 Windows XP 机器上安装了 Oracle 9i (9.2.0.1.0)(我专门安装了这个旧版本,以便我可以从备份文件重新创建数据库)。
The backup was done specifically so I could try to recreate it on my pc (so we wouldn't mess with production). We only have one window of a few hours a week, so it is not easy to just redo the backup differently.
备份是专门完成的,所以我可以尝试在我的电脑上重新创建它(这样我们就不会干扰生产)。我们每周只有几个小时的一个窗口,因此以不同的方式重做备份并不容易。
A DBA friend advised that we export the database rather than doing a full backup; however, the systems guys had a problem with the export so now I have this full backup.
一位 DBA 朋友建议我们导出数据库而不是做完整备份;但是,系统人员在导出时遇到了问题,所以现在我有了完整的备份。
As far as control files are concerned, it looks like there is an SNCF[SID].ORA file, about 2.2 megs, which is apparently the control file. All other files (a little over 150) are around half a gig, also with ORA endings. I'm guessing those are the actual data files.
就控制文件而言,看起来有一个SNCF[SID].ORA文件,大约2.2兆,显然是控制文件。所有其他文件(略超过 150 个)大约是半个演出,也有 ORA 结尾。我猜这些是实际的数据文件。
I'll get the exact oracle and windows versions soon.
我很快就会得到准确的 oracle 和 windows 版本。
回答by Justin Cave
OK, first things first. Exactly what version of Oracle was the backup taken from? 9i is a marketing label-- we need the full 4 digit version number (i.e. 9.2.0.4). Is your PC running exactly the same version of Oracle? Is your PC running exactly the same operating system?
好的,第一件事。备份究竟取自哪个版本的 Oracle?9i 是一个营销标签——我们需要完整的 4 位版本号(即 9.2.0.4)。您的 PC 是否运行完全相同的 Oracle 版本?您的 PC 是否运行完全相同的操作系统?
How was the backup done? Are you looking at a consistent cold backup of a database?
备份是怎么做的?您是否正在考虑对数据库进行一致的冷备份?
Do you not have any control files (normally .ctl)?
你没有任何控制文件(通常是 .ctl)吗?
SNCF[SID].ORA sounds like a parameter file, not a control file. You would need a control file to be able to restore the database.
SNCF[SID].ORA 听起来像一个参数文件,而不是一个控制文件。您需要一个控制文件才能恢复数据库。
If the database is actually up and running somewhere, I'm going to wager that you'll go through far less pain and agony overall if you work on figuring out why using the export utility didn't work and fixing that problem than in trying to recover the database from a cold backup, particularly if there is any sort of confusion over how the backup was taken.
如果数据库实际上已在某处启动并运行,我敢打赌,如果您努力弄清楚为什么使用导出实用程序不起作用并解决该问题,那么总体上您会经历更少的痛苦和痛苦,而不是尝试从冷备份中恢复数据库,特别是如果对备份的方式有任何混淆时。
回答by Osama Al-Maadeed
.ora files??? That's usually the extension for a pfile (in 9i you would prefer having an spfile instead).
.ora 文件???这通常是 pfile 的扩展名(在 9i 中,您更喜欢使用 spfile)。
No idea about the dated/numbered files. Maybe they're alert logs? or are they exp dumps with a weird extension. or are they part of an rman backup?
不知道有日期/编号的文件。也许他们是警报日志?或者它们是带有奇怪扩展名的 exp dumps。或者它们是 rman 备份的一部分?
You say "The backup was done specifically so I could try to recreate it on my pc", so why don't you have specific instructions to restore it?
你说“备份是专门做的,所以我可以尝试在我的电脑上重新创建它”,那么为什么你没有具体的说明来恢复它?
Sorry I have more questions than answers here. But I suggest you get expert help from a real DBA.
抱歉,我的问题多于答案。但我建议您从真正的 DBA 那里获得专家帮助。
Your systems guys are a good bet. ask them for help, they created this mess.
你的系统人员是一个不错的选择。向他们寻求帮助,他们制造了这个烂摊子。