Datafile name error
Oracle -184.108.40.206 64bit
My query goes like this.
a fellow dba has added a datafile to oracle database but when i query the name of datafile through views i get vierd characters
At oS level > /oracle/db/data10.dbf
At oracle SQL PROMPT on server > /oracle/db/data10^?^?.dbf
Through a other os via client > /oracle/db/data10.dbf=
nOW I WANT TO rename it . I cant take tablespace offline and do a rename because the name doesnt match if i copy. i tried to copy file by command
cp /oracle/db/data10.dbf /oracle/db2/data10.dbf
i get error >> no such file exists
if i use
cp /oracle/db/data10* /oracle/db2/data10.dbf
then it gets copied.
Now what the only option i think would be create a new controlfile and it wud a downtime..... which i strictly want to avoid.....
cant u advice me the best possible soln ......
Data file can be renamed or moved via 2 methods:
1. alter database command
do copy at os level
alter database rename file 'old' to 'new';
alter database open;
2. alter tablespace command
Take the tablespace offline;
(in another session move or rename the old datafile)
alter tablespace tablespace_name rename datafile 'old' to 'new' ;
alter tablespace tablespace_name online;
But my problem is that when i query i get the filename different in putty/at server/through a different machine....... so i fear that when i do a rename file "old" as "new" won't that give an error for file does not exists
when i took a controlfile trace it gives me the right name w/o junk characters ... so i thought that recreating controlfile wud do the trick.
If it gives an error, you can use the file number instead of file name
select file#,name from v$datafile
alter database rename file THE FILE# FROM THE PREVIOUS QUERY to THE NEW NAME
That cannot be mistaken
problem is, you've got non-printable characters in your file name. You could try using ctrl+v backspace to list out your files, but will be tedious to find the right combination.
IMHO, I'd just create a new tablespace, move the objects from DATA to it, slap the other DBA on the head, and forget about it.
Thanks for the Laugh!
Originally Posted by marist89
Click Here to Expand Forum to Full Width