Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

how to copy database

Frequent Advisor

how to copy database

Hi,iam new to this topic, how to copy database from one server to another i have two servers ServerA and ServerB. please tell me the procedure for this.

Thank you,
Acclaimed Contributor

Re: how to copy database

It depends on the database engine/vendor.

Each has some tools to export/import the data out/in.
You can transfer the exported data from one server to another.

But there are many different db's and tools ...

Hope this helps!

There are only 10 types of people in the world -
those who understand binary, and those who don't.

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Honored Contributor

Re: how to copy database


I assume you have an Oracle RDBMS. The easiest way is to first create a plaintext export of your control files (ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '...'). Then shutdown the database and copy the generated script, configuration files, and datafiles using your preferred method (e.g. NFS, CIFS, NFS, tape). Arrange the datafiles as you see fit, and modify the script to reflect their new locations. Create necessary directory structures and place configuration files appropriately. Then make additional changes to the script as outlined here:

Don't forget to modify your init.ora file, if you also brought this over. The beauty of doing a cold backup is your database is consistent, so there are no archivelogs to apply after you do a startup.

Honored Contributor

Re: how to copy database


Method 1.
Shutdown the database and copy the files from server A to server B. Startup database on Server A and startup database on B. Assumptions, the filesystems are identical and the installation of the Oracle Software is the same.

Method 2.
Export the database using the EXP or EXPDP utility on server A and import in a clean database on server B.

if you need further assistance, please let us know

kind regards
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
A. Clay Stephenson
Acclaimed Contributor

Re: how to copy database

... and it can even be trivially easy if you can shutdown the database and do a cold backup. Shutdown the database and take a conventional backup using the utility of your choice (tar, cpio, fbackup, pax, Data Protector, ...). On the target system, create identical mount points/directories and restore the file files. The database copy should start right up (assuming you have also installed the executables and libraries). About the only thing you will need to do is change any database networking to reflect the new hostname. Since you didn't even bother to identify the database or OS, it's difficult to be very specific.
If it ain't broke, I can fix that.