473,216 Members | 1,183 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,216 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 7771
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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

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.