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

Thread: need to move datafile

  1. #1
    Join Date
    Aug 2000
    Location
    Alberta
    Posts
    82
    One of our databases is running on an unsupported version of AIX, and I have to move a datafile to free up some space in one of the volumes because the volume can't be resized. There are 3 datafiles in the volume, the biggest being the rollback datafile.

    Before I boldly go ahead with moving this, thought I'd better double check...

    shutdown the database
    do an cp of the file to it's new destination
    start the database up in nomount mode
    alter database rename file "old" to "new"
    shut the database down & restart
    check dba_data_files & make sure file is in new location
    delete the old datafile




  2. #2
    Join Date
    Feb 2001
    Posts
    15
    Go ahead...! Cool... Take a backup before you do any changes. After moving datafile take a backup of control file.

  3. #3
    Join Date
    Jun 2000
    Location
    san francisco,ca,usa
    Posts
    10
    you can do in this way too

    shutdown
    copy the file to new location
    startup mount
    alter database rename file 'old location' to 'new location';
    alter database open;
    Take a backup of controlfile
    remove the existing one from o/s

    -Syed

  4. #4
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    All your steps are correct except number 3 where you start the database in NOMOUNT.
    It shiuld be opened in MOUNT stage so that Control file is open to be updated with the new file location.

    Rajeev Suri

  5. #5
    Join Date
    Aug 2000
    Location
    Alberta
    Posts
    82

    Exclamation

    Right rsuri - just noticed that, it can't be open, mounted is ok.

    Reading a bit further I found you can do the same thing bt taking the tablespace offline, doing an alter tablespace rename datafile command, & putting the tablespace back online - assuming of course that you have already copied the datafile over with the OS to its new location.

    Or is it the same as using alter database??? Whats the difference?, the alter tablespace method seems simpler in that you dont need to shutdown & restart the database.


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