DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Moving datafiles to new drive

  1. #1
    Join Date
    Jun 2006
    Posts
    40

    Exclamation 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.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    the database will still have it open until you bounce the instance

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Yea, get everyone out of the pool or just use you magical powers...
    sqlplus>Startup force

    ..some thread or process is still hanging on to the file...
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #4
    Join Date
    Jun 2006
    Posts
    40
    hi,
    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:
    1)Shutdown immediate
    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.

  5. #5
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    why not try it, see what works bst for yuo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width