在 Oracle 10g Release 2 中编辑控制文件
我尝试将一个 Oracle 数据库服务器克隆到另一个 Oracle 数据库服务器。 完成克隆后,当我尝试通过启动 SQL Plus 连接到数据库时 我收到以下错误:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/home/oracle/oradata/ccisv2/system01.dbf'
我发现在克隆原始数据库位置的控制文件时也被克隆。
现在在新服务器中,我的数据文件位于不同的位置。并且在控制文件中不受影响,这就是错误的原因。
简而言之,我需要将上述路径更改
/home/oracle/oradata/ccisv2/
为新路径,
/home2/oracle/oradata/ccisv2/
我不确定如何更改控制文件并编辑数据文件位置的路径。
无法更改数据文件的位置,因为我的空间较少 /home/oracle/oradata/..
有人可以帮我解决这个问题吗...
I tried to clone an oracle database server to another oracle database server.
After I completed the cloning, when I tried connecting to the database by starting SQL Plus
I got the following errors:
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/home/oracle/oradata/ccisv2/system01.dbf'
I found that while cloning the control file of the original database location also got cloned.
Now in the new server I have the data files located at a different location. and that is not affected in the control file, which is the reason for the error.
In short I need to change the above path
/home/oracle/oradata/ccisv2/
to a new path
/home2/oracle/oradata/ccisv2/
I am not sure how can I change the control file and edit the path of the data file location.
Changing of the location of datafiles is not possible as I have less space in/home/oracle/oradata/..
Can some one help me with this one...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要安装数据库(而不是打开它)并重新创建控制文件,在此过程中重命名数据文件(请参阅 CREATE CONTROLFILE 命令):
所有数据库文件都需要在控制文件中重新标识其新位置。
You'll need to mount the database (not open it) and re-create the controlfile, renaming the data files in the process (see the CREATE CONTROLFILE command):
All of your database files need to be re-identified in the controlfile with their new location.
最简单的方法是将数据文件重命名到新位置:
并对所有文件执行此操作。
通常我们会使用 rman 复制并使用 file_name 转换来为我们完成此操作。
重新创建控制文件也是一种选择,重命名文件更容易。
Easiest is to just rename the datafiles to the new locations:
and do this for all your files.
Normally we would use rman duplicate and use the file_name convert to do this for us.
re-creating the controlfile is also an option, renaming the files is easier.