Can not rename datafile in open mode !!! is it 11g ???
743412Jul 20 2010 — edited Jul 21 2010hi guys
i had some trouble renaming datafiles ...
i thought we can take tbs offline
copy file over the file system
rename datafile by alter tablespace command
put tbs online again but it stuck at atler tablespace command only ???
here is the result
====================================
SYS@TEST11 SQL>select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
SYS@TEST11 SQL>SELECT FILE_NAME FROM DBA_dATA_FILES;
FILE_NAME
--------------------------------------------------------------------------------
/u01/TEST11/sysaux11.dbf
/u01/TEST11/sysaux011.dbf
/u02/TEST11/undotbs11.dbf
/u02/TEST11/users11.dbf
/u01/TEST11/AKI1_perfstat1.dbf
SYS@TEST11 SQL>set time on
22:48:19 SYS@TEST11 SQL>alter tablespace users offline;
Tablespace altered.
=================================
test11gs-> pwd
/u02/TEST11
test11gs-> cp users11.dbf /u01/TEST11/
test11gs-> cd /u01/TEST11/
test11gs-> ll
total 1611296
drwxr-xr-x 6 oracle dba 4096 Jul 5 01:16 ..
-rw-r----- 1 oracle oinstall 104865792 Jul 20 22:33 AKI1_perfstat1.dbf
-rw-r----- 1 oracle oinstall 20979712 Jul 20 22:46 temp11.dbf
-rw-r----- 1 oracle oinstall 640884736 Jul 20 22:47 sysaux011.dbf
-rw-r----- 1 oracle oinstall 723525632 Jul 20 22:48 sysaux11.dbf
drwxr-xr-x 2 oracle dba 4096 Jul 20 22:49 .
-rw-r----- 1 oracle oinstall 174006272 Jul 20 22:49 users11.dbf
test11gs-> pwd
/u01/TEST11
test11gs->
test11gs-> ll grep /u01/TEST11/users*
-rw-r----- 1 oracle oinstall 174006272 Jul 20 22:49 /u01/TEST11/users11.dbf
==============================
*22:48:29 SYS@TEST11 SQL>ALTER TABLESPACE USERS RENAME DATAFILE '/u02/TEST11/users11.dbf' TO '/u01/TEST11/users11.dbf';*
ALTER TABLESPACE USERS RENAME DATAFILE '/u02/TEST11/users11.dbf' TO '/u01/TEST11/users11.dbf'
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 4 cannot be read at this time
ORA-01110: data file 4: '/u02/TEST11/users11.dbf'
ORA-06512: at line 912
ORA-00376: file 4 cannot be read at this time
ORA-01110: data file 4: '/u02/TEST11/users11.dbf'
22:50:38 SYS@TEST11 SQL>archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u02/TEST11/arch
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
22:50:52 SYS@TEST11 SQL>alter tablespace users online;
alter tablespace users online
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 4 cannot be read at this time
ORA-01110: data file 4: '/u02/TEST11/users11.dbf'
ORA-06512: at line 912
ORA-00376: file 4 cannot be read at this time
ORA-01110: data file 4: '/u02/TEST11/users11.dbf'
22:50:59 SYS@TEST11 SQL>
=================
ALERT LOG ,,,,
Thread 1 advanced to log sequence 6
Current log# 3 seq# 6 mem# 0: /u00/TEST11/redo/redo03.log
Tue Jul 20 22:44:43 2010
Thread 1 advanced to log sequence 7
Current log# 1 seq# 7 mem# 0: /u00/TEST11/redo/redo01.log
Tue Jul 20 22:48:28 2010
alter tablespace users offline
Completed: alter tablespace users offline
any idea guys ....Can you help me correct this please ????