1.发现数据库的数据文件有特殊字符:
2.尝试在sqlplus下用将tablespace offline后修改
SQL> alter tablespace WST_DATA rename datafile 'D:\oracle11\oradata\teblespace\WST_DATA .DBF' TO 'D:\oracle11\oradata\te
blespace\WST_DATA.DBF' ;
alter tablespace WST_DATA rename datafile 'D:\oracle11\oradata\teblespace\WST_DATA .DBF' TO 'D:\oracle11\oradata\teblesp
ace\WST_DATA.DBF'
*
ERROR at line :
ORA-: error in renaming data files
ORA-: error renaming data file - new file 'D:\oracle11\oradata\teblespace\WST_DATA.DBF' not found
ORA-: data file : 'D:\ORACLE11\ORADATA\TEBLESPACE\WST_DATA .DBF'
ORA-: unable to open file
OSD-: unable to open file
O/S-Error: (OS ) 系统找不到指定的文件。 SQL> alter tablespace WST_DATA rename datafile TO 'D:\oracle11\oradata\teblespace\WST_DATA.DBF' ;
alter tablespace WST_DATA rename datafile TO 'D:\oracle11\oradata\teblespace\WST_DATA.DBF'
*
ERROR at line :
ORA-: invalid file name
3.利用RMAN修改
G:\oraclebackup\InstanceNames>rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 10 14:50:09 2015 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORA11 (DBID=723822444) RMAN> shutdown immediate; using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down RMAN> startup mount; connected to target database (not started)
Oracle instance started
database mounted Total System Global Area 1071333376 bytes Fixed Size 1375792 bytes
Variable Size 738197968 bytes
Database Buffers 327155712 bytes
Redo Buffers 4603904 bytes RMAN> copy datafile 6 to 'D:\oracle11\oradata\teblespace\WST_DATA.DBF'; Starting backup at 10-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00006 name=D:\ORACLE11\ORADATA\TEBLESPACE\WST_DATA .DBF
output filename=D:\ORACLE11\ORADATA\TEBLESPACE\WST_DATA.DBF tag=TAG20150210T145554 recid=1 stamp=871311470
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:56
Finished backup at 10-FEB-15 RMAN>run{
2> set newname for datafile 6 to 'D:\oracle11\oradata\teblespace\WST_DATA.DBF';
3> switch datafile 6;
4> } executing command: SET NEWNAME datafile 6 switched to datafile copy
input datafile copy recid=1 stamp=871311470 filename=D:\ORACLE11\ORADATA\TEBLESPACE\WST_DATA.DBF RMAN> alter database open; database opened RMAN> exit Recovery Manager complete.
4.查看修改情况
G:\oraclebackup\InstanceNames>sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 10 15:01:41 2015 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> col name format a60;
SQL> set linesize 180;
SQL> select file#,status,name from v$datafile; FILE# STATUS NAME
---------- ------- ------------------------------------------------------------
1 SYSTEM D:\ORACLE11\ORADATA\ORA11\SYSTEM01.DBF
2 ONLINE D:\ORACLE11\ORADATA\ORA11\SYSAUX01.DBF
3 ONLINE D:\ORACLE11\ORADATA\ORA11\UNDOTBS01.DBF
4 ONLINE D:\ORACLE11\ORADATA\ORA11\USERS01.DBF
5 ONLINE D:\ORACLE11\ORADATA\TEBLESPACE\WSTJFX_DATA.DBF
6 OFFLINE D:\ORACLE11\ORADATA\TEBLESPACE\WST_DATA.DBF
7 ONLINE D:\ORACLE11\ORADATA\TEBLESPACE\WSXXZB_DATA.DBF
8 ONLINE D:\ORACLE11\ORADATA\TEBLESPACE\TESTBIRPT.DBF
9 ONLINE D:\ORACLE11\ORADATA\TEBLESPACE\WFGS.DBF
10 ONLINE D:\ORACLE11\ORADATA\TEBLESPACE\ZDJWBI.DBF
11 ONLINE E:\DATA\GYBANK\KHFX.DBF