Use cold backup technology to quickly migrate databases to new machines

Source: Internet
Author: User

Use cold backup technology to quickly migrate databases to new machines

Note:
1. Test Environment
SYS @ ocp> show rel
VPC: release 1102000100
$ Uname-r 2.6.18-164. el5xen
Database log mode: No Archive Mode
Mv or cp after shutdown immediate
2. Cold backup is generally applicable when the data volume is small.
3. This method is not applicable to migration between machines of different sizes.
4. The test results are as follows. Please add or correct them.
5. Supplement:

Case 1: All paths remain unchanged
1. Install software in the same path
2. Copy five types of files to the same path:
Data files, REDO files, control files, parameter files, and password files

Case 2: app and parameter file path change
1. path on the old machine
/U01/app/Oracle/product/11.2.0/dbhome_1/dbs
2. Path on new machine
Reinstall software to/oracle/dbhome_1/dbs
3. View spfile $ SID. ora under ORACLE_HOME according to. bash_profile.
Export ORACLE_HOME =/oracle/dbhome_1
Export ORACLE_SID = ocp

Case 3: control file path change
1. original path
Show parameter control_files
Select name from v $ controlfile;
2. shutdown immediate
3. migrate to a new location
Host mv/data/ocp/*. ctl/tmp
4. startup nomount
Alter system set control_files = '/tmp/control01.ctl', '/tmp/control02.ctl' scope = spfile;
Startup force

Case 4: REDO path change (optimized: can be moved to SSD)
1. select member from v $ logfile;
2. shutdown immediate
3. host mv/data/ocp/*. log/tmp
3. startup mount
Alter database rename file '/data/ocp/redo01.log' to '/tmp/redo01.log ';
Alter database rename file '/data/ocp/redo02.log' to '/tmp/redo02.log ';
Alter database rename file '/data/ocp/redo03.log' to '/tmp/redo03.log ';
4. startup force
Select member from v $ logfile;

Case 5: Move temporary files (optimized: Separate storage to make permanent data files more continuous)
1. Temporary files are automatically generated without cp
Select file_name from dba_temp_files;
Shutdown immediate
Host rm-f/data/ocp/temp01.dbf
Startup mount
Alter database rename file '/data/ocp/temp01.dbf' to '/tmp/temp01.dbf ';
Alter database open;
Select file_name from dba_temp_files;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.