Integrated physical migration of Oracle database on Linux and platform

Source: Internet
Author: User

Overall physical migration of Linux with platform database
Requirement: A machine is no longer used, to migrate Oracle a machine to machine B.
Previous articles on similar requirements: http://www.linuxidc.com/Linux/2015-05/117556.htm
The purpose of this article is to use the integrated script of automation to realize the whole migration of the same platform database.
1.A Machine operation

2.B Machine operation

A machine operation

0. System version:
[Email protected] tmp]# uname-a
Linux db-a 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 11:47:41 EST x86_64 x86_64 x86_64 gnu/linux
[Email protected] tmp]# cat/etc/issue
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel \ r on an \m

1.A Database Current Information
Select Status from v$instance UNION ALL
Select Open_mode from V$database UNION ALL
SELECT * from v$version where rownum = 1;

2. Confirm the location of the parameter file and control file
Show Parameter Pfile
Show Parameter Control_files

You need to create a pfile file based on the current SPFile, which is used later.
Create Pfile from SPFile;

3. Location of data files, temporary files, redo log files
Set Linesize pagesize 100
Select name from V$datafile UNION ALL
Select name from V$tempfile UNION ALL
Select member from V$logfile;

4. Clean Shutdown Database:
Shutdown immediate;

5. Identify the Oracle software catalog and package it to B machine
Echo $ORACLE _base
/ora/app/oracle
Tar-zcvf/tmp/oracle.tar.gz/ora/app/oracle

Copy the packaged Oracle software catalog and all the parameter files, control files, data files, temporary files, and redo log files to the B machine.

B Machine Operation

0. System version:
[Email protected] irnop]# uname-a
Linux db-b 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 22:19:54 EST x86_64 x86_64 x86_64 gnu/linux
[Email protected] irnop]# cat/etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \ r on an \m

1. Installing dependency packages and adjusting system parameters

Slightly. Refer to: http://www.linuxidc.com/Linux/2015-05/117559.htm

2. Unzip the oracle_home to the B machine planning Software installation directory:/u01/app/oracle
Tar zxvf oracle.tar.gz

Extracted Oracle Directory direct MV to/u01/app

3. Modify the parameter file Pfile and start the database to Nomount

Modify the memory value of the database according to the actual condition of the B machine and confirm that the path written in the parameter file exists.
Startup Nomount pfile= ' $ORACLE _home/dbs/initirnop.ora '
sql> startup Nomount pfile= ' $ORACLE _home/dbs/initirnop.ora '
ORACLE instance started.

Total System Global area 2.3717E+10 bytes
Fixed Size 2239176 bytes
Variable size1.3153e+10 bytes
Database buffers 1.0536E+10 bytes
Redo buffers 25612288 bytes

4. Boot to mount
Sql> ALTER DATABASE Mount;

Database altered.

5. Rename redirection of data files, temporary files, log files
Set Linesize pagesize 100
Select ' ALTER DATABASE rename file ' | | name| | ' to '/xxx ' | | name| | '; ' from V$datafile UNION ALL
Select ' ALTER DATABASE rename file ' | | name| | ' to '/xxx ' | | name| | '; ' from V$tempfile UNION ALL
Select ' ALTER DATABASE rename file ' | | member| | ' to '/xxx ' | | member| | '; ' from V$logfile;

Replace Old_name with new_name according to the actual situation
Old_name:/xxx/oradata
New_name:/new/oradata

Then execute the redirect SQL to check that the current path is correct:
Select name from V$datafile UNION ALL
Select name from V$tempfile UNION ALL
Select member from V$logfile;

To modify the system's directory permissions:
Chown-r Oracle:oinstall/new/oradata

6. Open the database:
sql> ALTER DATABASE open;

Integrated physical migration of Oracle database on Linux and platform

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.