Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use cold backup technology to quickly migrate DB to a new machine

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to use cold backup technology to quickly migrate DB to a new machine, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Description:

1. Test environment

SYS@ocp > show rel

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 suitable for use when the amount of data is small.

3. This method is not suitable for migration between machines with different sizes.

4. The test results are as follows. Additions and corrections are welcome.

5. Supplement:

Case 1: all paths remain the same

1. Install software to the same path

2. Copy five types of files to the same path:

Data files, REDO files, control files, parameter files, password files

Case 2:app and parameter file path change

1. The path on the old machine

/ u01/app/oracle/product/11.2.0/dbhome_1/dbs

2. The path on the new machine

Reinstall software to / oracle/dbhome_1/dbs

3. View the 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. Move 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 (optimization: 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: moving temporary files (optimization: separate storage to make permanent data files more continuous)

1. Temporary files are generated automatically without the need for 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

Zcs0237

2014.09.10

More cleaner and more efficient!

After reading the above, have you mastered how to quickly migrate DB to a new machine using cold backup technology? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report