一:针对可以 OFFLINE 的表空间
1:create tablespace boncdel datafile '/oracle/oradata/boncbi/users03.dbf'
size 5m extent management local autoallocate
2:alter tablespace boncdel offline;
3:在操作系统上修改数据文件的名字
4:alter tablespace boncdel rename datafile '/oracle/oradata/boncbi/users03.dbf'
to '/oracle/oradata/boncbi/users003.dbf';
5:alter tablespace boncdel online;
二如果系统表空间或者临时表空间使用的数据文件需要改名
1:shutdown IMMEDIATE
2:startup MOUNT
3:操作系统上对文件改名
4:ALTER DATABASE RENAME FILE '/oracle/oradata/boncbi/system01.dbf' TO '/oracle/oradata/boncbi/system001.dbf';
5:ALTER DATABASE OPEN;
扩展,如果日志文件或者控制文件丢失,或者坏了,导致系统无法启动
报类似以下错误
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/oracle/oradata/boncbi/system01.dbf'
都可以通过备份的控制文件,或者日志文件来恢复数据库
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16313746/viewspace-1029384/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16313746/viewspace-1029384/