-
I made a really stupid mistake and now I can't figure out how to fix it.
I created a datafile wiith a space after the .dbf
alter tablespace data_01
add datafile
'/u02/oradata/ads02/df_ads02_data_01_3.dbf ' size 1024M;
Now there is some sort of special charecter at the end of .dbf
I copied the file to another file
cp df_ads02_data_01_3* df_test.dbf
That worked
Then when I tried the alter I get the fillowing error
I also tried it with a wildcard at the here also ie df_ads02_data_01_3%
1 alter tablespace data_01
2 rename datafile '/u02/oradata/ads02/df_ads02_data_01_3.dbf'
3* to '/u02/oradata/ads02/df_test.dbf'
SQL> /
alter tablespace data_01
*
ERROR at line 1:
ORA-01525: error in renaming data files
ORA-01522: file '/u02/oradata/ads02/df_ads02_data_01_3.dbf' to be renamed does
not exist
-
What version we are talking about. If its 7.x version time stamp should be same for the file you copied. You have to use 'cp -p' option to preseve the timestamp.
I think did you try saving the old file some where and renaming it using mv command ?
Just trying to give you the alternatives/possibilities..
-
version 8.1.6.2 I already figured out how to copy the file
the problem that I am having is in renaming the file in oracle.
-
You may try using a GUI tool like OEM's Storage Manager to rename it.
- Rajeev
-
You could write a pl/sql loop and fetch the data into a variable and then execute immediate (something like...):
declare
myFn varchar2(2000);
mySql varchar2(2000);
begin
select file_name into myFn from dba_data_files
where file_name like '%RBS%';
mySql := 'alter database rename file ''' || myFn || ''' to ''/new/file/name''';
dbms_output.put_line(mySql);
execute immediate mySql;
end;
/
(Watch single quotes)
[Edited by marist89 on 01-22-2001 at 05:28 PM]
Jeff Hunter
-
Jeff,
Is it that big deal with spaces, if at all happens. Good lesson before I hit that. I will keep an eye next time I play........
-
Thanks everyone I figured out how to do it. So obvious
that I'm almost ashamed to give the answer :)
All I did was to but a blank at the end of the .dbf ' file
in the alter rename statement. LOL
-
[QUOTE][i]Originally posted by sreddy [/i]
[B]Jeff,
Is it that big deal with spaces, if at all happens. Good lesson before I hit that. I will keep an eye next time I play........ [/B][/QUOTE]
Silly me, I figured that Joni already tried that. I was assuming that the character was a control character or an unprintable character...
Jeff Hunter
-
I think my prev. posting is void. Thats what I thought and assumed, Joni might have not done the mistake of not adding the space at the end of .dbf in the rename datafile syntax. But, Joni Right and My assumption was wrong.
** Happens Sometimes ** If it doen't work the way it suppose to be...it will worse...
[Edited by sreddy on 01-22-2001 at 05:52 PM]
-
It happened to me long back. And what I did was, I opened the file in OEM and then renamed it in GUI. Easy !!
Thanks
Kishore Kumar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|