The Toolkit for Online Communities
18821 Community Members, 1 member online, 1970 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Moving Oracle to a new server

Forum OpenACS Q&A: Moving Oracle to a new server

Icon of envelope Request notifications

Posted by Bruno Mattarollo on

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.

Posted by Malte Sussdorff on
This why I like LVM's, I'd have just moved the LVM over to the new server and voila, there you go.

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.

Posted by Malte Sussdorff on
If you are lucky enough to have your Oracle installation (or at least the data files) on special harddisks (RAID or normal), think about taking the harddisks to the new server. Reduces downtime considerably.
Posted by jerry arns on

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.

Posted by Janine Ohmer on
Yes, I have done this. I actually moved the entire installation, not just the .dbf files, so I don't know exactly what your steps would be to get Oracle to see the data, but I'm sure it can be done.  Probably just making sure that you replace *all* the .dbf files, so you get the data dictionary, not just the ones you created for your data.

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. :)

Posted by Jade Rubick on
Just another vote for moving the whole /ora8 directory over. There are other files necessary too, so I usually begin the Oracle install on the new computer, and then move the /ora8 directory over to complete things. It works well, no major problems I've noticed in the last three years of doing this.

Test it out once or twice before going live, of course. :-)

Posted by Brian Fenton on
I recently cloned a database using this Metalink article. It took less than 15 minutes! It's probably more that you need, but it should be useful... Note:18070.1 Subject: How to Make a Copy of a Database on the Same Unix Machine http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=18070.1
Posted by Andrew Grumet on
I haven't tried the file copy approach, so can't make any comparative statements, but I have used the exp/imp approach numerous times with success. About two weeks ago we did this for a database with a 17GB dbf file. The export and network file transfer were fast compared to the import, which took about 10 hours on a Sun Ultra-4 with 4GB ram. The web site in question doesn't rely heavily on Intermedia, but I have also had success in the past with Intermedia objects. It sounds from your post like you tried it and it failed. Perhaps exporting in full database mode would help.
Posted by Bruno Mattarollo on
Thank you all for your suggestions and experience ... it's really useful. The DBA at the hosting company will proceed with exp/imp and if this fails (for any reason) we will do the file copy approach.

Thanks again!