473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,405 developers and data experts.

Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g

Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g

The principal restriction on cross-platform transportable database is that the source and destination platform must share the same endian format.
Redo log files and control files from the source database are not transported to destination database . New control files and redo log files are created for the new database during the transport process, and an Open Resetogs is performed once the new database is created. BFiles, External tables and directories are not transported.




SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 448790528 bytes
Fixed Size 1291096 bytes
Variable Size 381684904 bytes
Database Buffers 58720256 bytes
Redo Buffers 7094272 bytes
Database mounted.
SQL> alter database open read only;

Database altered.

SQL> set serveroutput on
SQL> declare
2 db_ready boolean;
3 begin
4 db_ready := dbms_tdb.check_db('Linux IA (64-bit)');
5 end;
6 /

PL/SQL procedure successfully completed.

SQL> set serveroutput on
SQL> declare
2 external boolean;
3 begin
4 external := dbms_tdb.check_external;
5 end;
6 /
The following directories exist in the database:
SYS.WORK_DIR, SYS.ADMIN_DIR, SYS.DATA_PUMP_DIR

PL/SQL procedure successfully completed.

SQL>

Now the database is ready for transport , make sure as to where you are going to convert the datafiles.You may choose to convert the datafiles of the
database being transported on the destination platform instead of the source platform.


in the source database connect to target catalog

RMAN> connect target /

connected to target database: ORCL (DBID=1169024393)

RMAN> CONVERT DATABASE ON TARGET PLATFORM
2> CONVERT SCRIPT 'C:\convertscript.rman'
3> TRANSPORT SCRIPT 'C:\transportscript.sql'
4> new database 'ORCLWIN'
5> FORMAT 'C:\%U';

Starting convert at 18-MAY-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK

Directory SYS.WORK_DIR found in the database
Directory SYS.ADMIN_DIR found in the database
Directory SYS.DATA_PUMP_DIR found in the database

User SYS with SYSDBA and SYSOPER privilege found in password file
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00001 name=C:\ORADATA\ORCL\SYSTEM01.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00003 name=C:\ORADATA\ORCL\SYSAUX01.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00002 name=C:\ORADATA\ORCL\UNDOTBS01.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00004 name=C:\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00005 name=C:\ORADATA\ORCL\SYSTEM02.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00006 name=C:\ORADATA\ORCL\SYSTEM03.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00007 name=C:\ORADATA\ORCL\SYSTEM04.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00008 name=C:\ORADATA\ORCL\SYSTEM05.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00009 name=C:\ORADATA\ORCL\USERS02.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00010 name=C:\ORADATA\ORCL\USERS03.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
channel ORA_DISK_1: starting to check datafiles
input datafile fno=00011 name=C:\ORADATA\ORCL\USERS04.DBF
channel ORA_DISK_1: datafile checking complete, elapsed time: 00:00:00
Run SQL script C:\TRANSPORTSCRIPT.SQL on the target platform to create database
Edit init.ora file C:\INIT_00JGMNV5_1_0.ORA. This PFILE will be used to create the database on the target platform
Run RMAN script C:\CONVERTSCRIPT.RMAN on target platform to convert datafiles
To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the target platform
To change the internal database identifier, use DBNEWID Utility
Finished backup at 18-MAY-08

RMAN>


- Converting the datafiles


RUN {

CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSTEM01.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSTEM01.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSAUX01.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSAUX01.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\UNDOTBS01.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\UNDOTBS01.DBF' ;


CONVERT DATAFILE '\U01\ORADATA\ORCL\USERS01.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\USERS01.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSTEM02.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSTEM02.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSTEM03.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSTEM03.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSTEM04.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSTEM04.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\SYSTEM05.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\SYSTEM05.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\USERS02.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\USERS02.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\USERS03.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\USERS03.DBF';


CONVERT DATAFILE '\U01\ORADATA\ORCL\USERS04.DBF'
FROM PLATFORM 'Microsoft Windows IA (64-bit)'
FORMAT '\U01\ORADATA\ORCL\USERS04.DBF' ;


}




set echo off
prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
prompt * database has been created successfully!
prompt * There are many things to think about for the new database. Here
prompt * is a checklist to help you stay on track:
prompt * 1. You may want to redefine the location of the directory objects.
prompt * 2. You may want to change the internal database identifier (DBID)
prompt * or the global database name for this database. Use the
prompt * NEWDBID Utility (nid).
prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~

SHUTDOWN IMMEDIATE
STARTUP UPGRADE PFILE='C:\initORCL.ORA'
@@ ?/rdbms/admin/utlirp.sql
SHUTDOWN IMMEDIATE
STARTUP PFILE='C:\initORCL.ORA'
-- The following step will recompile all PL/SQL modules.
-- It may take serveral hours to complete.
@@ ?/rdbms/admin/utlrp.sql
set feedback 6;


Vinod Sadanandan
Sr.Oracle DBA
May 19 '08 #1
1 7793
debasisdas
8,127 Expert 4TB
It will be better if you can add some inline comments for your code also.

That will make the code more readable /understandable.
May 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Karsten | last post by:
Hi I'm a really a new with this cross platform development, so I have some dumb questions, which I hope you can help me with. If there is a better newsgroup for this question, please point...
7
by: Web Master | last post by:
Are there any good websites or books that deal with cross platform XML? I'd like to target Internet Explorer/Netscape Navigator 5 or later, as well as Opera, possibly konqueror on Linux as well. ...
0
by: demibee | last post by:
Thought this might be of interest to some out there... For those who've never encountered it, it's a free, open-source, cross-platform GUI library (Windows/Mac/Linux). Forte's Agent 2.0 will be...
14
by: John Salerno | last post by:
Bear with me, but I've been reading a lot about how the .NET languages are platform independent, and I assume this means a program written in C# can be run on a Unix or Mac machine. If this...
35
by: Alex Martelli | last post by:
Having fixed a memory leak (not the leak of a Python reference, some other stuff I wasn't properly freeing in certain cases) in a C-coded extension I maintain, I need a way to test that the leak is...
7
by: Charles | last post by:
I'd like to develop a simple cross-platform application in C++. I'd like it to run in Windows, OS X, PC-BSD and Linux. From my research, it seems I should use Qt or Gtk as a graphical library. Do...
5
by: Michael Reichenbach | last post by:
After working with script languages, notepad(++) and co. and several other ide`s I found something which really improved my productivity (Visual Studio 2005). It`s imho better then dev-cpp... I...
6
by: greek_bill | last post by:
Hi, I'm interested in developing an application that needs to run on more than one operating system. Naturally, a lot of the code will be shared between the various OSs, with OS specific...
12
by: Acrobatic | last post by:
I'm trying to store user passwords in a MySQL database. I learned the hard way that using MySQL "DECODE" and "ENCODE" doesn't seem to work cross-platform, but if I encrypt on the server side with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.