Install a Windows 2008 Server 64 and Oracle, and then migrate the database to the Linux environment
Windows Server 2008-192.168.182.128 Oracle 11.2.0.3.0 ORACLE_SID = orcl
Oracle Enterprise Linux 5.8-192.168.182.131 Oracle 11.2.0.1.0 ORACLE_SID = ORCL
The process is the same as migrating a 10g Database to 11g. When modifying the control file script, you must modify the path and database name.
1 check information from PROD
On 128-windows oracle Server
Sqlplus/as sysdba
SYS @ orcl> select dbid from v $ database;
DBID
----------
1371889729
SYS @ orcl> create pfile = 'C: \ initorcl. ora 'from spfile;
File created.
SYS @ PROD1> alter database backup controlfile to trace;
Database altered.
SYS @ PROD1> show parameter user_dump
NAME TYPE VALUE
-----------------------------------------------------------------------------
User_dump_dest string C: \ oracle \ diag \ rdbms \ orcl
\ Trace
Cd C: \ oracle \ diag \ rdbms \ orcl \ trace
Copy the trc file to c: \ dbclone \ control.txt
And edit it:
From:
STARTUP NOMOUNT
Create controlfile reuse database "ORCL" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/app/oracle/oradata/ORCL/redo01.log' SIZE 50 m blocksize 512,
GROUP 2'/u01/app/oracle/oradata/ORCL/REDO02.LOG 'SIZE 50 m blocksize 512,
GROUP 3 '/u01/app/oracle/oradata/ORCL/redo03.log' SIZE 50 m blocksize 512
-- STANDBY LOGFILE
DATAFILE
'/U01/app/oracle/oradata/ORCL/system01.dbf ',
'/U01/app/oracle/oradata/ORCL/sysaux01.dbf ',
'/U01/app/oracle/oradata/ORCL/undotbs01.dbf ',
'/U01/app/oracle/oradata/ORCL/users01.dbf ',
'/U01/app/oracle/oradata/ORCL/example01.dbf'
Character set AL32UTF8
;
To:
STARTUP NOMOUNT
Create controlfile set database "ORCL" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/app/oracle/oradata/ORCL/redo01.log' SIZE 50 m blocksize 512,
GROUP 2'/u01/app/oracle/oradata/ORCL/REDO02.LOG 'SIZE 50 m blocksize 512,
GROUP 3 '/u01/app/oracle/oradata/ORCL/redo03.log' SIZE 50 m blocksize 512
-- STANDBY LOGFILE
DATAFILE
'/U01/app/oracle/oradata/ORCL/system01.dbf ',
'/U01/app/oracle/oradata/ORCL/sysaux01.dbf ',
'/U01/app/oracle/oradata/ORCL/undotbs01.dbf ',
'/U01/app/oracle/oradata/ORCL/users01.dbf ',
'/U01/app/oracle/oradata/ORCL/example01.dbf'
Character set AL32UTF8
;
2.2 cold backup tar-128 orcl
SYS @ orcl> select name from v $ dbfile;
NAME
--------------------------------------------------------------------------------
C: \ ORACLE \ ORADATA \ ORCL \ USERS01.DBF
C: \ ORACLE \ ORADATA \ ORCL \ UNDOTBS01.DBF
C: \ ORACLE \ ORADATA \ ORCL \ SYSAUX01.DBF
C: \ ORACLE \ ORADATA \ ORCL \ SYSTEM01.DBF
C: \ ORACLE \ ORADATA \ ORCL \ EXAMPLE01.DBF
SYS @ orcl> select member from v $ logfile;
MEMBER
--------------------------------------------------------------------------------
C: \ ORACLE \ ORADATA \ ORCL \ REDO03.LOG
C: \ ORACLE \ ORADATA \ ORCL \ REDO02.LOG
C: \ ORACLE \ ORADATA \ ORCL \ REDO01.LOG
SYS @ orcl> select name from v $ controlfile;
NAME
--------------------------------------------------------------------------------
C: \ ORACLE \ ORADATA \ ORCL \ CONTROL01.CTL
C: \ ORACLE \ RECOVERY_AREA \ ORCL \ CONTROL02.CTL
SYS @ orcl> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Cd C: \ ORACLE \ ORADATA \
Install the 7zip Software
Pack it into an orcl.zip package
Upload it to the 131 server and decompress it under the/u01/app/oracle/oradata directory, and change the directory name to ORCL in upper case.
Upload the previously generated "c: \ initorcl. ora" to/s01/app/oracle/product/11.2.0/db_1/dbs/of server 131 and change it to initORCL. ora.
And generate a password file under/s01/app/oracle/product/11.2.0/db_1/dbs/on server 131.
Orapwd file = orapwORCL password = oracle
Cd $ ORACLE_HOME/network/admin
Vi listener. ora
Add sid_list
Vi tnsnames. ora
Add connection string orcl
2.2 check path and SID
131->
Mkdir-p/u01/app/oracle/admin/ORCL/adump
Cd $ ORACLE_HOME/dbs
Vi initORCL. ora
ORCL. _ db_cache_size = 671088640
ORCL. _ Java _pool_size = 16777216
ORCL. _ large_pool_size = 16777216
ORCL. _ oracle_base = 'C: \ oracle '# ORACLE_BASE set from environment
ORCL. _ pga_aggregate_target = 704643072
ORCL. _ sga_target = 1023410176
ORCL. _ shared_io_pool_size = 0
ORCL. _ shared_pool_size = 285212672
ORCL. _ streams_pool_size = 16777216
*. Audit_file_dest = '/u01/app/oracle/admin/ORCL/adump'
*. Audit_trail = 'db'
*. Compatible = '11. 2.0.0.0'
*. Control_files = '/u01/app/oracle/oradata/ORCL/control01.ctl', '/u01/app/oracle/oradata/ORCL/control02.ctl'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_name = 'orcl'
*. Db_recovery_file_dest = '/home/oracle/flash'
*. Db_recovery_file_dest_size = 1G
*. Diagnostic_dest = '/u01/app/oracle'
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = ORCLXDB )'
*. Memory_target = 1717567488
*. Open_cursors = 300
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Undo_tablespace = 'undotbs1'
2.3 delete old control files
Cd/u01/app/oracle/oradata/ORCL/
Rm CONTROL01.CTL
2.4 create spfile from pfile-131 ORCL
[Oracle @ oelr5u8-1 ORCL] $ export ORACLE_SID = ORCL
[Oracle @ oelr5u8-1 ORCL] $ sqlplus/nolog
SQL * Plus: Release 11.2.0.1.0 Production on Sat Apr 5 19:50:29 2014
Copyright (c) 1982,200 9, Oracle. All rights reserved.
@> Connect sys/oracle as sysdba
Connected to an idle instance.
SYS @ ORCL> create spfile from pfile;
File created.
SYS @ ORCL> startup nomount
ORACLE instance started.
Total System Global Area 1724186624 bytes
Fixed Size 1337016 bytes
Variable Size 1040189768 bytes
Database Buffers 671088640 bytes
Redo Buffers 11571200 bytes
SYS @ ORCL> create controlfile set database "ORCL" RESETLOGS NOARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7. LOGFILE
8 GROUP 1'/u01/app/oracle/oradata/ORCL/REDO01.LOG 'SIZE 50 m blocksize 512,
9 GROUP 2'/u01/app/oracle/oradata/ORCL/REDO02.LOG 'SIZE 50 m blocksize 512,
10 GROUP 3'/u01/app/oracle/oradata/ORCL/REDO03.LOG 'SIZE 50 m blocksize 512
11 -- STANDBY LOGFILE
12 DATAFILE
13 '/u01/app/oracle/oradata/ORCL/system01.dbf ',
14'/u01/app/oracle/oradata/ORCL/sysaux01.dbf ',
15'/u01/app/oracle/oradata/ORCL/undotbs01.dbf ',
16'/u01/app/oracle/oradata/ORCL/users01.dbf ',
17 '/u01/app/oracle/oradata/ORCL/example01.dbf'
18 character set AL32UTF8
19;
Control file created.
SYS @ ORCL> alter database open resetlogs;
Alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure.
ORA-39700: database must be opened with UPGRADE option
Process ID: 6175
Session ID: 125 Serial number: 3
SYS @ ORCL> startup upgrade
The ORA-24324: service handle not initialized.
ORA-01041: internal error. hostdef extension doesn't exist
SYS @ ORCL> startup migrate
The ORA-24324: service handle not initialized.
ORA-01041: internal error. hostdef extension doesn't exist
SYS @ ORCL> alter database open upgrade;
ERROR:
ORA-03114: not connected to ORACLE
SYS @ ORCL> conn/as sysdba
Connected to an idle instance.
SYS @ ORCL> startup upgrade
ORACLE instance started.
Total System Global Area 1724186624 bytes
Fixed Size 1337016 bytes
Variable Size 1040189768 bytes
Database Buffers 671088640 bytes
Redo Buffers 11571200 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/app/oracle/oradata/ORCL/system01.dbf'