Experiment: Oracle Direct copy physical storage file Migration

Source: Internet
Author: User

Experimental Purpose: Oracle Direct copy physical file migration, production library has similar construction requirements, so in the experimental environment simple verification. Lab Environment:a host: 192.168.1.200 Solaris10 + Oracle 11.2.0.1B Host: 192.168.1.186 SOLARIS10 1. Back up the ORACLE installation package ($ORACLE _base directory)
Tar cvf Oracle.tar Oracle
2. Close the library, backup parameter files, control files, data files, temporary files, log filesto view the storage paths for each file:
Sql> Show parameter pfilename TYPE VALUE---------------------------------------                                                 --------------------------------------SPFile string/u01/app/oracle/product/11.2.0                                 /db_1/dbs/spfileprod.orasql> Show parameter Control NAME TYPE VALUE-----------------------------------------------------------------------------Control_fi                                                 Le_record_keep_time integer 7control_files string/u01/app/oracle/oradata/prod/c                                                 Ontrol01.ctl,/u01/app/oracle/       Flash_recovery_area/prod/contr ol02.ctlcontrol_management_pack_access    String diagnostic+tuningsql> set Linesize 160sql> col member for a70sql> select * from V$logfile; group# STATUS TYPE MEMber is_-----------------------------------------------                                --------------------------------------------------3 online/u01/app/oracle/oradata/prod/redo03.log                                NO 2 Online/u01/app/oracle/oradata/prod/redo02.log NO 1 online/u01/app/oracle/oradata/prod/redo01.log nosql> Select Name from V$datafile; NAME--------------------------------------------------------------------------------------------------------------------- ---/u01/app/oracle/oradata/prod/system01.dbf/u01/app/oracle/oradata/prod/sysaux01.dbf/u01/app/oracle/oradata/ Prod/undotbs01.dbf/u01/app/oracle/oradata/prod/users01.dbf/u01/app/oracle/oradata/prod/dbs_d_wrnophq.dbfsql > select name from V$tempfile; NAME--------------------------------------------------------------------------------/u01/app/oracle/oradata/ Prod/temp01.dBfsql>  

This experimental environment parameter files, control files, data files, online redo log files, all in the $oracle_base directory, do not have a separate backup, the actual production situation, is generally certainly not in the path of $oracle_base, at this time need to record the path and back up these files separately.

 3. Backup of the installation package and all files transferred to the target machine 186
SCP Oracle.tar 192.168.1.186:/u01/app/tar XVF Oracle.tar
4. Wait for the transmission and decompression process can be configured for the new host4.1 New Oracle Users and Groups
Groupadd oinstallgroupadd dbauseradd-g oinstall-g dba-d/export/home/oracle-m-s/usr/bin/bash-c "Oracle User" Oracle

4.2 Configuring Environment Variables VI ~/.profile

Oracle_base=/u01/app/oracleoracle_home= $ORACLE _base/product/11.2.0/db_1oracle_sid=prodpath= $PATH: $ORACLE _home/ Binexport oracle_base oracle_home Oracle_sid PATH
make environment variables effective
4.3root User Modified/etc/system, add:
Set shmsys:shminfo_shmmax=4294967295     //Shared memory bytes (typically set to half of physical memory) set Shmsys:shminfo_shmmin=1set Shmsys:shminfo_ Shmmni=200set shmsys:shminfo_shmseg=200set semsys:seminfo_semmap=1024set semsys:seminfo_semmns=2048set Semsys: Seminfo_semmni=2048set Semsys:seminfo_semmsl=2048set Semsys:seminfo_semmnu=2048set Semsys:seminfo_semume=200set Semsys:seminfo_semopm=100set semsys:seminfo_semvmx=32767

Restart host active configuration

5. At this point, all files have been copied to the new host5.1 Try to start the database
[[Email protected]:/export/home/oracle]$ sqlplus/as sysdbasql*plus:release 11.2.0.1.0 Production on Sun June 15 10:17:24 2014Copyright (c) 1982, Oracle.  All rights reserved. Connected to an idle instance. Sql> Startuporacle instance started. Total System Global area  405020672 bytesfixed size                  2211488 bytesvariable size             234881376 bytesdatabase Buffers          163577856 Bytesredo buffers                4349952 bytesdatabase mounted. Ora-00600:internal error code, arguments: [KCRATR_SCAN_LASTBWR], [], [], [],[], [], [], [], [], [], [], []sql> Select status from V$instance; STATUS------------Mounted
5.2 Trying to recover a database
sql> Recover database; Media recovery complete.
track the alarm log of the recover process
Sun June 10:33:00 2014db_recovery_file_dest_size of 3882 MB is 1.89% used. This was auser-specified limit on the amount of space that would be used by Thisdatabase for recovery-related files, and Doe s not reflect the amount ofspace available in the underlying filesystem or ASM DiskGroup.  Sun June 10:50:15 2014ALTER database RECOVER  database  media Recovery startserial Media Recovery startedrecovery of Online Redo log:thread 1 Group 1 Seq 4 Reading mem 0  mem# 0:/u01/app/oracle/oradata/prod/redo01.logmedia Recover Y Complete (PROD) completed:alter database RECOVER  Database  
5.3 Try to open the database normally
keep track of the open library's alarm log, no problem.
Sun June 10:50:28 2014alter database openbeginning crash Recovery of 1 threadsstarted redo scancompleted Redo Scanread 5 KB Redo, 0 data blocks need recoverystarted Redo application Atthread 1:logseq 4, block 3095Recovery of Online redo Lo G:thread 1 Group 1 Seq 4 Reading mem 0 mem# 0:/u01/app/oracle/oradata/prod/redo01.logcompleted Redo Application of 0.00 mbcompleted Crash Recovery Atthread 1:logseq 4, Block 4288, SCN 13022250 data blocks read, 0 data blocks written, 596 red o k-bytes readsun June 10:50:29 2014lgwr:starting ARCH processessun June 10:50:29 2014arc0 started with pid=20, OS ID =1944 arc0:archival startedlgwr:starting Arch PROCESSES completearc0:starting Arch Processessun June 10:50:30 2014ARC  1 started with pid=21, OS id=1946 Sun June 10:50:30 2014arc2 started with pid=22, OS id=1948 arc1:archival startedARC2: Archival Startedsun June 10:50:30 2014arc3 started with pid=23, OS id=1950 arc1:becoming the ' no FAL ' Archarc1:becomi ng the ' no SRL ' ARCHARC2: Becoming the heartbeat archthread 1 advanced to log sequence 5 (thread open) thread 1 opened at log sequence 5 current L og# 2 seq# 5 mem# 0:/u01/app/oracle/oradata/prod/redo02.logsuccessful Open of Redo Thread 1MTTR advisory is disabled Beca Use Fast_start_mttr_target are not Setsun June 10:50:30 2014smon:enabling Cache recoveryarchived Log entry added for Thread 1 sequence 4 ID 0xf4f6282 dest 1:arc3:archival startedarc0:starting ARCH PROCESSES completesuccessfully onlined U Ndo tablespace 2.Verifying file header compatibility for 11g tablespace encryption.  Verifying 11g file Header compatibility for tablespace encryption completedsmon:enabling TX recoverydatabase Characterset is we8mswin1252no Resource Manager plan Activesun June 10:50:39 2014replication_dependency_tracking turned off (no Asyn c multimaster replication found) starting background process Qmncsun June 10:50:42 2014QMNC started with pid=24, OS id=19 The Sun June 10:50:51 2014completed:alter database Opensun JUN 10:50:59 2014Starting background process Cjq0sun June 10:50:59 2014cjq0 started with pid=30, OS id=1988 Setting Re Source Manager Plan scheduler[0x3009]:D Efault_maintenance_plan via SCHEDULER windowsetting Resource Manager plan DEFAULT _maintenance_plan via Parametersun June 10:51:04 2014Starting Background process Vkrmsun June 10:51:05 2014VKRM Starte D with Pid=28, OS id=1991 Sun June 10:51:22 2014Begin automatic SQL Tuning Advisor run for special Tuning task "Sys_aut O_sql_tuning_task "Sun June 10:51:47 2014End automatic SQL TUNING Advisor run for special TUNING TASK" Sys_auto_sql_tuni Ng_task "Sun June 10:55:47 2014Starting Background process Smcosun June 10:55:49 2014SMCO started with pid=32, OS id=20  27
6. The actual production environment of the construction, and did not encounter any problems, very smooth the need to fix this.
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.