Moving datafiles to new drive
Hi, i wanted to move datafile from one drive to another . For that i have done following steps:
1) alter tablespace tablespace_name offline.
2) Then i've manually copied that perticular datafile to new drive ,suppose from c: to d: drive.
3) Alter tablespace tablespace_name rename datafile
'c:\...filenameo1.dbf' to d:\...filename01.dbf'
4) alter tablespace tablespace_name online.
After this i fired query select * from dba_data_files ,then it shows new position.
Now i wanted to delete the data file at C: drive(previous position) ,but while deleting it shows:
Can't delete file, there has been a sharing violation. Source or destination file may be in use?
Can u pls tell why did it happen? Does it mean that file didn't get properly moved and it contain any data inside? Whether it will cause any problem to database? Now how to delete that datafile at previous position?
Thanks in advance.
the database will still have it open until you bounce the instance
Yea, get everyone out of the pool or just use you magical powers...
..some thread or process is still hanging on to the file...
After moving datafile on one day ,I tried to delete that file on the next day ,then it got deleted. But some other files (older) r not deleted (as per my knowlege oracle takes time even some hrs or days to free up space from older files) .Is this so?
As u tell me to bounce the instance ,now i've to move the datafiles from index tablespace to new location ,Can i go for following steps:
2)copy files to new location.
3) startup mount
4) alter database rename file .
5)alter database open
After doing this whether i will be able to delete the files on older loactions .Also can i delete the files those yet not deleted?
Or will go for the same process of offlining the tablespace and then copying and renaming datafiles?
Please give me solution for this.
Thanks for your time.
why not try it, see what works bst for yuo
Click Here to Expand Forum to Full Width