注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 子域部署Exchange服务器详..
 帮助

ORA的数据文件更改存储路径


2008-06-27 14:01:08
 标签:数据库   [推送到技术圈]

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://xcgatx.blog.51cto.com/369305/84339
sqlplus "/ as sysdba"
查看数据库模式
archive log list;

查看数据文件
select name from v$datafile;

1、将数据文件offline:
alter database datafile 'D:\Oracle\PRODUCT\10.2.0\DBFILES\DSBI\DS.ORA' offline
注:如提示正在使用,重启数据库再进行此操作。
2、copy数据文件(DS.ORA)到新的目录文件
3、alter database datafile 'D:\Oracle\PRODUCT\10.2.0\DBFILES\DSBI\DS.ORA' online
此时可能提示错误:
ORA-01113: 文件 5 需要介质恢复
ORA-01110: 数据文件 5: 'D:\Oracle\PRODUCT\10.2.0\DBFILES\DSBI\DS.ORA'
--4、set autorecovery on
5、recover datafile 5;这个5就是3中提到的数据文件 5
提示:完成介质恢复
6、alter database datafile 'D:\Oracle\PRODUCT\10.2.0\DBFILES\DSBI\DS.ORA' online
7、the end。
 
 
1.alter tablespace gazh_pic offline;

2.alter tablespace gazh_pic rename datafile 'D:\DATAFILE\TEST\GAZH_PIC_01.ORA'to 'D:\DATAFILE\GAZH_PIC_01.ORA
3.alter tablespace gazh_pic online;
4.set autorecovery on
5.recover datafile 5 数据文件
重复3

本文出自 “xcgatx” 博客,请务必保留此出处http://xcgatx.blog.51cto.com/369305/84339



 下一篇 ORA闪回技术简介



    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: