1. 首页
  2. 数据库
  3. Oracle
  4. ORACLE MIGRATION

ORACLE MIGRATION

上传者: 2018-12-25 14:11:07上传 PDF文件 169.17KB 热度 49次
ORACLE MIGRATION FROM WINDOWS TO LINUXDatabase Migration From Windows to Linux Using RMANThe windows databaseThis exercise was done using a small default 10.2.0.4 databaseSOL> select bytes, file name from aba data files;BYTES E工 E NAME440401920 G:\\TECHNOLOGY\ ORCLW\ DATAFILE\O1 MF SYSTEM 4 4QYBEPE .DBF246415360G: TECHNOLOGY\ORCL啊、DATA彐ILE\O1 ME UNDOTBS144 QYCEQ网_DBF136314880G:\ TECHNOL○GY\○RCL啊、 DATAFILE\O1 ME SYSAUX44QYCZ3D.DBF5242880 G:\ \TECHNOLOGY\ORCLWN\DATAFILE \O1 MF USERS 44QYDHY7.DBFSQL> select name from vScontrolfile;NAMEG:\ TECHNOLOGY\ ORCLW\C○ NTROLFIL三O1M彐44QY9sXR.CLC: ORACLE\ PRODUCT\10.2.0\FLASH RECOVERY AREA ORCLW\ CONTROLFILE\O1 MF 44QY9TPX CTISOL> select member from lOgfile;MEMBERG: TECHNOLOGYORCLWONLINELOG\O1 MF 1 4QY9VJL.LOGC: ORACLE PRODUCT\10.2.0\FLASH RECOVERY AREA\\ONLINELOG\O1 ME 1 44QY9ZZ7.LOGG:\ TECHNOLOGY、 ORCLW、○ NLINELOG\O1M244QYB14V.LOGC: ORACLE PRODUCT\10.2.0\FLASH RECOVERY AREA \ORCLW ONLINELOG\O1 ME 2 4 40YB5L1, LOGG: TECHNOLOGY\ORCLW\ONLINELOG\O1 M= 3 44QYB 6OY LOC: ORACLE PRODUCT\10.2.0\FLASH RECOVERY AREA\ORCLW ONLINELOG\O1 MF 3 44QYBC2F. LOGRACL∈3/32Database Migration From Windows to Linux Using RMANList of Steps Needed to Complete the migrationThe migration process is simple, but as it has several steps it is convenient to be familiar with them before running it1. Check platform compatibility between source and target OS2. Start the database in read only mode3. Check database readiness for transport from Windows to linux using dBms TDB cHEcK DB4. Check if there are any external objects5. Execute the rman convert database command6. Copy converted datafiles, generated Transport Script and Parameter File to Linux7. Edit the in it ora for the new database8. Edit the Transport Script and Parameter File changing the windows paths to Linux Paths9. EXecute the T ransport Script10. Change the database ID1. Check database integrityRACL∈4/32Database Migration From Windows to Linux Using RMAN1. Check platform compatibility between source and target OsYou need to check the platforms to be sure they have the same endian format, also you need to save theplatform name string to use it later as part of the convert database syntax in RMANSQL> select x from VSDB TRANSPORTABLE PLATFORM2 where PlATFORM NAME='Microsoft Windows IA (32-bit). orPLATFORM NAME like linux iPLATFORM ID PLATFORM NAMEENDIAN FORMAT7 Microsoft Windows Ia (32-bitLittle10 Linux工A(32-bit)工itt1e11 Linux工A(64-bit工i-t113 Linux x86 64-bitLittleRACL∈5/32Database Migration From Windows to Linux Using RMAN2, Start the database in read only modeIn order to execute dbms tdb check db the database must be opened on read only modeSQL> Shutdown immediate;Database closedDatabase dismountedCRACle instance shut downSQL> Startup mountORACle instance startedTotal System Global Area 167772160 bytesFixed size1295608 bytesVariable size71305992 bytesDatabase buffe≌s88080384 bytesRedo Buffers7090176 bytesDatabasetedSQL> alter database open read onlyDatabase altereRACL∈6/32Database Migration From Windows to Linux Using RMAN3. Check database readiness for transport from windows to LinuxIf the execution of dbms tdb check db does not return any exceptions, that means the database is ready fortransport to the target platformSQL> set serveroutput onSOL> declareah ready booleaneginah ready := dbms tab check ab(Linux IA (32-bit)i)iendPL/SQL procedure successfully completedRACL∈7/32Database Migration From Windows to Linux Using RMAN4. Check if there are any external objectsIf there is any external objects take note of them, they will need to be taken caremanuallSQL> set serveroutput onSQL> declare2 external booleanbegin/x value of external is ignored, but with SERVEROUTPUT set tO ONx abms tab check cxtcrnal displays report of external objects大 on console*external : dbms tab check externalendThe following directories exist in the database:SYS. DATA PUMP DIR SYS. ORACLE OCM CONFIG DIR, SYS ADMIN DIR SYS. WORK DIRPL/SQL procedure successfully completedRACL∈8/32Database Migration From Windows to Linux Using RMAN5. Using the RMAN CONVERT DATABASE CommandHaving executed successfully the checkup steps, the database is open in read only mode then the convertdatabase command can be executed with rmanIn this example, I'm not using the db_ file name- convert "option because thedatabase is using oracle managed files(omf); when using omf Rman does generate and display the new filenames on the output of the convert database commandAt the end of the convert process Rman does display information about how to complete the conversion on thetarget platformC: Documents and Settings\avargas>Rman target sys/oracledorclw nocatalogRecovery Manager: Release 10.2.0.4.0 -Production on Mon Jun 9 17:26: 22 2008Copyright (c)1982, 2007, Oracle. All rights reservedconnected to target database: ORCLW (DBID=1718464921)using target database contrcl file instead of recovery catalogRMAN> CONVERT DATABASE NEW DATABASE l orcllnx2>transport script 'G: \TECHNOLOGY \ORCLLNX\ transportscriptto platform 'Linux IA (32-bit)iStarting convert at 09-JUN-08allocated channel ORA DISK 1channel ORA dISk 1: sid=154 devtype-DISKDirectory SYS. DATA PUMP DIR found in the databaseDirectory SYS. ORACLE OCM CONFIG DIR found in the databaseRACL∈9/32Database Migration From Windows to Linux Using RMANDirectory SYS ADMIN DIR found in the databaseDirectory sYs. NORK DIR found in the databaseUser sYs with SYSDBA and SYSopeR privilege found in password filechannel ora disk 1: starting datafile conversioninput datafile fno=00001 name=:\ TECHNOLOGY \ORCLW\DATAFILE\O1 MF SYSTEM 44QYBFPF DBEconverted datafile=G:\TECHNOLOGY\ORCLW DATAFILE O1 ME SYSTEM 44TM3OPF.DBFchannel ora disk 1: datafile conversion complete, elapsed time: 00: 00:55channel orA disk 1: starting datafile conversioninput datafile fno=00002 name=G:\ TECHNOLOGY ORCLW\DATAFILE\O1 MF UNDOTBS1 44QYCFQW.DBFconverted datafile=G:\ TECHNOLOGY \ ORCIW DATAFILE\O1 MF UNDOTBS144IM5F98.DBFchannel ora diSk 1: datafile conversion complete, elapsed time: 00: 00: 35channel ora disk 1: starting datafile conversioninput datafile fno=00003 name=G: \ TECHNOLOGY \ORCLW\ DATAFILE \ O1 MF SY SAUX 44QYCZ3D. DBEconverted datafile=G:\ TECHNOLOGY ORCLW\ DATAFILE \O1 ME SYSAUX 44TM6JTB.DBFchannel ora diSk 1: datafile conversion complete, elapsed time: 00: 00: 25channel ora disk 1: starting datafile conversioninput datafile fno-00004 name-G:\TECHNOLOGY \ORCLW\ DATAFILE \O1 MF USERS 4 4QYDHY7.DBFconverted datafile=G:\TECHNOLOGY ORCLW DATAFILE O1 ME USERS 44IM7BD5.DBFchannel ora diSk 1: datafile conversion complete, elapsed time: 00: 00: 01Run SQL script G: \TECHNOLOGY \ORCLLNX TRANSPORTSCRIPT on the target platform to createdatabaseEdit init. ora file C: \ORACLE\PRODUCT\10.2.0\ DB 1\ DATABASE\INIT 0OJIGSKI 1 0. ORA. ThisPFILE will be used to create the database on the target platformTo recompile all PL/SQL modules, run utlirp sql and utlrp scl on the target platformTo change the internal database identifier, use DBNEWID UtilityFinished backup at 09-JUN-08RACL∈10/32
用户评论