window2012 Oracle Migration CENTOS6 Oracle

Source: Internet
Author: User

Purpose of this article:

Oracle is a large database The age and version and the environment are older, performance affected the business is normal, recently the company needs to migrate data from Oracle Server Windows2003 32bit to Windows2012/linux Redhat 64bit Oracle, it involves a transcoding

Oracle Architecture:

  Oracle Server = instance + Database (Instance and database are independent of each other)

Operating principle:

Let's take a look at how Oracle RDBMS works

      1. User submits a request before accessing Oracle server (including information such as db_name, instance_name, username, password, etc.), and Oracle server receives the request and passes the validation of the password file , allocate the SGA memory pool, and start the background process to create and launch the instance at the same time.
      2. After launching the instance, user process establishes connect with the server process.
      3. Build sesscion through server process and Oracle instance.
      4. The user executes the SQL statement that is received by the server process and interacts directly with Oracle.
      5. The SQL statement arrives at Oracle Instance through the server process, and then loads SQL into the database buffer.
      6. The Server process notifies Oracle database to load a copy of the data block associated with the SQL statement into the buffer.
      7. Executes the SQL statement in the database buffer and produces a "dirty buffer".
      8. The CKPT checkpoint process checks to the "dirty buffer" and calls the DBWN database write process, but before Dbwn executes, the original state of the data file, the change of the database, and so on should be recorded to redo log files prior to execution by LGWR.
      9. Writes the updated content to a data file on disk.
      10. Returns the result to the user

Specific also do not dwell on; details can be consulted http://blog.csdn.net/Jmilk/article/details/51583799

First, configure the migration target Linux server parameters.

Confirm:

SELinux, Iptables, Sysctl, limits.conf, etc.

SPOOL c:test.sql             //C:test.sql  This is the location where the file is saved, starting from the SPOOL all operations record to SPOOL off Select  *fromOFF 

1. Create a test table (Windows)

 create  table  pp (num int  );          begin  for  J 1 .. 100   loop  insert  into  pp values           (J);          end   loop;  commit   end   / 

2. Create an Rman user (Windows)

SQL Sysdba Create ' E:\app\rman.dat '  on Next  Createuserbydefault grant to  Grant to
rman Connect Catalog Rman /  Create  Catalog;rman catalog Rman/rman@orcl target sys/ password @ Network connection service name  Database

3. Go to read-only

Run {SelectPlatform_name fromv$Database;SelectPlatform_name,endian_format fromV$transportable_platformOrder  by 1,2;shutdownImmediatestartup MountAlter Database Open Read  only;SetServeroutput onDeclareV_check Boolean;beginV_check:=dbms_tdb.check_db ('Linux x86 64-bit', dbms_tdb.skip_none);End;/DeclareV_ext Boolean;beginV_ext:=dbms_tdb.check_external;End;/}

4. Go to Rman backup transcoding (Windows)

/ Convert Database Database ' ORCL ' ' E:\bak\trans.sql '  to ' Linux x86 64-bit ' ' E:\APP\ADMINISTRATOR\ORADATA\ORCL ' ' E:\bak ';

5. Export the Backup to

All data under E:\bak and Init_00sduaam_1_0.ora files are uploaded to the respective locations/HOME/ORACLE/APP/ORADATA/ORCL and INIT_00SDUAAM_1_0 of the Linux server. Ora corresponds to the directory below
Modify the path and memory size in the Init_00sduaam_1_0.ora file

6. Importing data (Linux)

Sqlplus/  assysdbastartup nomount PFILE='Init_00sduaam_1_0.ora'CreateSPFile fromPfile='Init_00sduaam_1_0.ora'; startup Force NomountCREATEControlfile ReuseSET DATABASE"ORCL" Resetlogs noarchivelog maxlogfiles -maxlogmembers3Maxdatafiles -maxinstances8maxloghistory292LOGFILEGROUP 1 '/home/oracle/app/oradata/orcl/redolog01.log'SIZE 50M,GROUP 2 '/home/oracle/app/oradata/orcl/redolog02.log'SIZE 50M,GROUP 3 '/home/oracle/app/oradata/orcl/redolog03.log'SIZE 50MDATAFILE'/home/oracle/app/oradata/orcl/system01. DBF',    '/home/oracle/app/oradata/orcl/undotbs01. DBF',    '/home/oracle/app/oradata/orcl/sysaux01. DBF',    '/home/oracle/app/oradata/orcl/users01. DBF',    '/home/oracle/app/oradata/orcl/example01. DBF'CHARACTER SETZHS16GBK;ALTER DATABASE OPENresetlogs;ALTERTablespaceTEMP ADDTempfile'/home/oracle/app/oradata/orcl/temp01.dbf'SIZE20971520Autoextend on;SHUTDOWNIMMEDIATE STARTUP UPGRADE @?/Rdbms/Admin/Utlirp.sql

7. Authentication (Linux)

/  as Sysdbastartupconn Mologa / Mologa Select *  from tab; Select *  from PP;

window2012 Oracle Migration CENTOS6 Oracle

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.