DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: move an oracle database from one drive to another

  1. #1
    Join Date
    Nov 2005
    Posts
    4

    move an oracle database from one drive to another

    Hi,
    I have been searching for a example of how to move a database from one server to another. The database is pretty big (15 2gb data files and 10 more 2gb index files) and I would rather not have to .dmp it out and reload it. Its a development db so the performance hit of it being on a network drive is not much of a concern to me.

    I am not very skilled in the way of oracle so please be detailed. Thanks in advance for your help

    Heres the skinny.

    Both computers are windows. The database server is oracle 9i and is on box 'A' for simpicity sake. I want to move the db files to box 'B' and just map a drive from box A to box B

    Currently it looks like this

    Box A

    C:\oracle\oradata\theDatabase\

    I want to move theDatabase directory to Box B

    Example

    Q:\myDatabases\theDatabase

    How do I go about doing that?

    Thanks again for your help.

    Sean
    Last edited by seanmmcc; 11-04-2005 at 03:44 PM. Reason: added more detail.

  2. #2
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Quote Originally Posted by seanmmcc
    Hi,

    Both computers are windows. The database server is oracle 9i and is on box 'A' for simpicity sake. I want to move the db files to box 'B' and just map a drive from box A to box B

    Currently it looks like this

    Box A

    C:\oracle\oradata\theDatabase\

    I want to move theDatabase directory to Box B

    Example

    Q:\myDatabases\theDatabase
    Shutdown immediate;
    startup mount;
    ##move your db files from A to B physically##
    ALTER DATABASE RENAME FILE 'C:\oracle\oradata\theDatabase\
    ' to 'Q:\myDatabases\theDatabase';#rename all the moved files
    alter database open;
    Alter database backup controlfile to '/...../..../../';
    Alter database backup controlfile to trace;
    ## take a complete backup(if archive log mode)hot/RMAN, or shutdown again and take a cold backup if no archive log mode##
    Startup

    Goodluck
    "What is past is PROLOGUE"

  3. #3
    Join Date
    Nov 2005
    Posts
    4
    thank alot! can you just clarify one thing here:

    what am susposed to be doing with this line?

    Alter database backup controlfile to '/...../..../../';

    thanks!

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    that method before was log and error prone, try this.

    1) take a backup
    2) create a service on the new windows box and start it
    3) alter database backup controlfile to trace;
    4) shutdown the original db
    5) move it to the new box in the locations you want
    6) edit the pfile with the parameters for the control file locations / dump directories
    7) take the trace file made before, remove all the crap and change the locations of all files using find / replace
    8) run the file in sqlplus
    9) live long and enjoy

    That will save you a lot of time instead of manully moving all files in the data dictionary

  5. #5
    Join Date
    Jul 2002
    Posts
    205

  6. #6
    Join Date
    Nov 2005
    Posts
    4
    thanks for all your responses but im still not following the process.

    davey23uk, i want to keep the oracle server on box 'A' i just want to move all the files to a directory on box 'B'. And then tell oracle on box 'A' that all the files have moved.

    what exactly is going on with these steps?

    Alter database backup controlfile to '/...../..../../';
    Alter database backup controlfile to trace;

  7. #7
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    Alter database backup controlfile to '/...../..../../'; isnt needed
    Alter database backup controlfile to trace; creates a screipt to recreate the control file

    my steps above dont stop you running the database on the original host

  8. #8
    Join Date
    Nov 2005
    Posts
    4
    2) create a service on the new windows box and start it

    what is the service that i am creating? the box b that im putting the files on isnt running oracle

    6)edit the pfile with the parameters for the control file locations / dump directories

    is the pfile a physical file in oracle?

    7)take the trace file made before, remove all the crap and change the locations of all files using find / replace

    where does the trace get written to?

    thanks again for helping me. sorry if this is really simple stuff. just not things i reguarlly do.

  9. #9
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    oracle needs a window service to run, so install the softare and use oradim to create a service

    a pfile is a parameter file, hold details of where the controls files are / memory setting / trace directories

    so "show parameter user_dump" in sqlplus on box A and it will tell you where the trace file is, it will be the newwest file in the directory and will have a create control file statement in there

  10. #10
    Join Date
    Sep 2001
    Posts
    200
    it appears you guys are responding without having having understood what he wants..here is it as he states it...
    "davey23uk, i want to keep the oracle server on box 'A' i just want to move all the files to a directory on box 'B'. And then tell oracle on box 'A' that all the files have moved."
    -he only wants to move oracle files to box B.
    -then link/tell Oracle that the files are on box B
    -there is no oracle software on box B
    -he doesn't want to intall oralce on box B

    I don't see how he would do this....I'm afraid its not possible?
    Life is what is happening today while you were planning tomorrow.

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