I have two datafiles inRBS TABLESPACE.The name of one datafile is rbs01.dbf & the other one is .ora.How to rename the .ora to rbs02.dbf.Oracle 8.1.6 running in N/T.I tried to rename it by alter database rename file.But it gives an error
ora-01121cannot rename databse files which are in use or recovery.
What is the way i can rename the .ora file(Such a nonsense name)
Make sure that none of your RBS uses this file. Then try, it should work.
1. alter tablespace rbs offline
2. cp .ora rbs02.ora
3. alter database rename file '/u01/.ora' to '/u01/rbs02.ora'
4. alter tablespace rbs online
Please note, you should do this when nobody else is logged in.
This should work, just try to make sure there is little to no activity.
alter tablespace rbs offline normal
host copy /path/rbs02.ora /path/rbs02.dbf
alter database rename file '/path/rbs02.ora' to '/path/rbs02.dbf'
alter tablespace rbs online
These are the steps you need to follow :
1) Take your tablespace offline or shutdown the database and then MOUNT it, but do not open it yet
2) rename your file from the operating system level
3) issue the 'alter database' SQL stmt to rename the file
4) put your tablespace back online (or open the database,
depending on what you did in step 1.
Heh everyone replied at about the same time.
I think that's pretty much a concensus about what what you need to do!
Thanks.But when I am trying to take it offline the file I ma getting an error ORA-1145 OFFLINE IMMEDIATE DISALLOWED UNLESS MEDIA RECOVERY ENABLED.oNCE AGAIN i AM USING ORACLE 8.1.6. IN N/T
Did you try to 'offline normal' or 'offline immediate' ? You should use 'offline normal'
Click Here to Expand Forum to Full Width