error in renaming the datafile [message #61724] |
Thu, 20 May 2004 17:58 |
balu
Messages: 23 Registered: March 2001
|
Junior Member |
|
|
Hello,
I like to move the temp data file from one location to other location in HP-UX IPF box, here is the what I did and the error.
1) Copied the temp01.dbf file to the location where I wanted to copy using the CP command in unix operating system.
After caonnecting as admin in sqlplus I did the following
SQL> alter database rename file '/home/oracle/oradata/sid/temp01.dbf' to '/ora02/temp01.dbf';
alter database rename file '/home/oracle/oradata/sid/temp01.dbf' to '/ora02/temp01.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01516: nonexistent log file, datafile, or tempfile
"/home/oracle/oradata/sid/temp01.dbf"
But pretty sure..that I have the files at the correct location.
This happens in oracle9i, could some one give me an idea or solution.
Thanks,
-Balu.
|
|
|
Re: error in renaming the datafile [message #61725 is a reply to message #61724] |
Thu, 20 May 2004 20:56 |
Anatol Ciolac
Messages: 113 Registered: December 2003
|
Senior Member |
|
|
You can make this at 2 ways:
I)When database is down:
1)shutdown database
2)copy files to new location
3)startup mount
4)alter database rename file filename1.ora to filename2.ora(if it will not work then do alter database rename tempfile)
II)When database is up and in archivelog mode:
1)alter datafile filename.ora offline immediate
2)copy file to new location
3)alter database file filename.ora rename to filename.2ora
4)recover datafile filename2.ora
5)alter database file filename2 online;
P.S. I am ocupated with this thing many time age and possible that not indicated exact some points and advice to try at first on experimental database.
|
|
|
Re: error in renaming the datafile [message #61727 is a reply to message #61724] |
Fri, 21 May 2004 02:31 |
prashant
Messages: 122 Registered: September 2000
|
Senior Member |
|
|
Balu,
It looks like you have locally managed temporary tablespace.
and you are trying the renaming way of dictionary managed tablespace.
try this
create 1 more temporary tablespace (if u dont have) and make it default for the database by " alter database default temporary tablespace TEMP2;".
Drop the tempfile of the earlier (say TEMP1)and add a new one to the tablespace. Then remove the OS file.
SQL> alter database tempfile '/V90164/temp02.dbf' drop;
Database altered.
SQL> alter tablespace USER_TEMP_1 add tempfile '/V90164/temp03.dbf' size 2M;
Tablespace altered.
$ rm /V90164/temp02.dbf
In 9i, you can drop the tempfile and the OS file within the same statement:
SQL> alter database tempfile '/V901/temp02.dbf' drop including datafiles;
Database altered.
SQL> alter tablespace USER_TEMP_1 add tempfile '/V90164/temp03.dbf' size 2M;
Tablespace altered.
then bring back this temporary tablespace (TEMP1) to the default temporary tablespace by the same above statement and then , when it is done drop the 2nd TEMP2 temporary tablespace it self..
Thanks,
Prashant.
|
|
|