Forum OpenACS Q&A: Moving Oracle to a new server
Hello Oracle gurus
We have our current database server (a Sun E220R) and a new server (a faster E480R). The DBA at our hosting company proposed to do an export and then import in the new oracle instance. I am a bit sceptical at this approach because this means that it takes a lot of time to do this (our DB is now 5GB) and this caused some problems with interMedia as well (since the interMedia objects are owned -at least some of them- by ctxsys).
I have seen, at least 3 years ago, an Oracle consultant copy the files from the first server into the second one (since both are the same architecture and oracle version) and then just move the datafiles (and change the references in oracle to them). If my memory is not betraying me, this seems like a better approach, right? How would you recommend doing this? Does the export/import approach seems like a good one?
Any comment/suggestion is welcome! 😊
Thank you in advance.
Other than that, if you have the normal installation that OpenACS recommends (installing everything in one directory), then you can copy over the whole directory (this is what we ususally do). No problems so far. Same is true if you use multiple mount points aso. It does not hold true though if you use RAW devices. In this case you can only use the copy trick if you have LVM.
Beware that exports is not consistent unless you open your database in restrict mode.
An import of 5gb will take forever... (beware the size of the redo logs during import to avoid too many log switches).
Do you have your own database instance on the new server ? If yes, then do as you would for a full cold backup : stop the database, and copy the datafiles, control files, redo logs, parameter file to the new server.
Then edit the parameter file to reflect the new path to the control files (and path to the archived redo logs if needed). Open mount your database and specify the new path to all the datafiles and redo logs with "alter database rename file '/myfile.dbf' to '/newfolder/myfile.dbf'" instructions.
If you share your instance with other users, then you are doomed to use exp/imp.
I should note that I don't really recommend moving the entire installation because it's a PITA. You have to go through and edit a bunch of files which reference the system name and/or the SID (which I tie to the system name). I did it because it took *forever* to run the instsallation GUI over our old 56K frame relay. Now that we have a T1 I don't worry about such things anymore. :)
Test it out once or twice before going live, of course. 😊