Kamran Agayev's Oracle Blog

Oracle Certified Master

RMAN Video Tutorial Series – Convert database from Windows to Linux using RMAN

Posted by Kamran Agayev A. on August 20th, 2010

In this video tutorial I show the convertion of the database from Windows to Linux using CONVERT DATABASE command in RMAN. Enjoy it

To download the .mp4 version of this file, use the following link

http://www.kamranagayev.com/Video_Tutorials/RMAN_Convert_Database.mp4

44 Responses to “RMAN Video Tutorial Series – Convert database from Windows to Linux using RMAN”

  1. Rashad Bashyazi Says:

    Salam bəy. Mənə həmişə maraqlı olub bu sualı indi ona görə verəcəm

    Orda daxile tdiyiniz məlumatları əzbərləmisiniz? yoxsa zamanla məşğul olduqca bədahətən gəlir?

  2. wissem Says:

    Thank you Kamran, Good presentation.
    Wissem

  3. Mohamed Azar Says:

    Very Nice video Tutorial :)

  4. Nicolas Gasparotto Says:

    Note1 : 10.2.0.1 has a bug -Bug #5016125- and you cannot run convert in parallel (which can save a lot of time when doing it on large number of datafiles), it is fixed within 10.2.0.4.
    Note2 : you can also do the database convert without converting all the datafiles but just the datafiles containing rollback segments (undo), it also saves a lot of time (see Avoid Datafile Conversion during Transportable Database [ID 732053.1]).

    Nicolas.

  5. H.Tonguç Yılmaz Says:

    Eline sağlık Kamran, baya zamanını alıyordur eminim.

  6. Axi Says:

    Respect !!!

  7. Surachart Opun Says:

    Great Job ^^

  8. Samir Imanov Says:

    Salam Kamran.
    Tutorillara gore sene yeqin yeni bashlayanlar chox teshekkur edirler. Her halda sen de yaxshi bilirsen ki, professionallar bu videoya ancaq tekrarlamaq uchun baxirlar. Onlar bilirler ki, baza gerek archivelog mode rejiminde ishlesin. Lakin yeni bashlayanlar adi halda oracleni install edende noarchivelog mode rejiminde ishleyir. Mence sen tutoriallarda bunu nece elemeyi de gostersen pis olmazdi. Hech olmasa videodan kenarda bunlari qeyd ele.

    SQL> select log_mode from v$database;

    LOG_MODE
    ————
    NOARCHIVELOG

    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.

    SQL> startup mount
    ORACLE instance started.

    Total System Global Area 188743680 bytes
    Fixed Size 1218436 bytes
    Variable Size 96471164 bytes
    Database Buffers 88080384 bytes
    Redo Buffers 2973696 bytes
    Database mounted.

    SQL> alter database archivelog;

    Database altered.

    SQL> alter database open;

    Database altered.

    SQL> select log_mode from v$database;

    LOG_MODE
    ————
    ARCHIVELOG

    Evvelki “Performing Disaster Recovery with RMAN” tutorialinda flash_recovery_area katalogunu da yaratmaq yadindan chixmishdi. Fikrimce yeni bashlayanlar uchun bunlar chox vacibdir. Bunlari ona gore yaziram ki, dostuma senin blogunu meslehet gordum ve o, tutoriallari tekrarlayanda bu suallari mene verdi.

    P.S. Chox sagol ki, bele tutoriallar hazirlayirsan. Maraqli tutoriallarini sebirsizlikle gozleyirem.

    Hormetle Samir Imanov

  9. Kamran Agayev A. Says:

    Salam Samir, feedback ucun tesekkur edirem

    Menim bu video tutoriallarda esas meqsedim, xususen RMAN ile elaqeli backup ve recovery addimlarini Oracle DBA-lerine gostermekdir. Bashlanqic olaraq bunlar Oracle-a yeni bashlayanlar ucun nezerde tutulub, ancaq zaman kecdikce daha complex recovery addimlarini gostermek fikrim de var

    Yeni bashlayanlar eslinde noarchivelog-da database-in backup-in ala bilmediyini gordukde, google-dan database-i nece archivelog-a cevirmek lazim olduqunu cox asanliqla tapa bilerler, ancaq video-dan kenarda bunu qeyd ederem

    Flash Recovery Area-ya geldikde ise, bu default olaraq 10g-de database quranda avtomatik secilmis bir secenekdi, yeni istifadeci Next duymelerini basmaqla database qurmaq istese, avtomatik Flash Recovery Area onun ucun configure olacaq

    Bir daha feedback-a gore tesekkurler

  10. Samir Imanov Says:

    Elbette database quranda avtomatik kataloq oui terefinden yaradilir. Hemchinin adump, bdump… kataloqlari da ele o zaman yaranir. Amma software only sechilen zamani bunlar yaranmir. Mence 2-ci virtual mashinda evvelceden baza yuklenmish ve sonradan silinmishdir. Diqqetle baxdiqda hetta $ORACLE_HOME kataloqunda evvelki admin/ kataloqu da gorunur, hansi ki, soft only rejiminde yaranmir. Elbette bunlar xirdaliqlardir, amma tutorialin chox komeyi var.

    P.S. Google-de axtarmaq barede duz deyirsen. Menim de fikrimce eger kimse oracle-ni oyrenmek isteyirse melumatin serbest halda tapilmasini da oyrenmelidir.

  11. Toplu Mail Says:

    Teşekkürler Kamran güzel paylaşım ellerine sağlık

  12. Javid Says:

    Teshekkurler……

  13. Prageet Says:

    Thank you Kamran Sir for this wonderful presentation.
    I follow each and every steps which you demonstrate in this video.
    But when i execute TRANSPORT.SQL script at linux, after sometime i am getting ORA-03114 error : not connected to ORACLE.I donot understand why this happening.
    Can you please help me out to over come this problem?

  14. Kamran Agayev A. Says:

    Dear Prageet

    Create the fresh database “without OLAP” and you’ll success (It’s a bug)
    If you want to clone the database with already OLAP installed database, then just remove it (There’s a metalink note on deleting OLAP)

  15. Prageet Says:

    Dear Kamran sir,
    Thank you for your support.I have created a new database without OLAP.Its help me to come out from that problem.And now i am able to clone the database. Once again thanks for your help.

  16. Kamran Agayev A. Says:

    Wouuu, that’s great! Congratulations!

  17. Ashwin Patel Says:

    Is it possible to Convert Windows 2008 R2 64 bit Oracle Database to RHEL 6 32 bit?

    Also, windows 2008 is live database i dont want to loose anything.

  18. Ashwin Patel Says:

    Hi Kamran,

    This is third day i still can not convert. i’ve been googling and also have some paid suport contract.
    My Databse does not open in READ ONLY MODE.

    1. as soon as i issue the command SHUTDOWN IMMEDIATE. it works fine

    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    2. now when i try to open it using STARTUP MOUNT, i get the following error.

    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn’t exist

    Please please please help.

  19. Kamran Agayev A. Says:

    Dear Ashwin

    Could you please post output (the error you get) from alert.log file

  20. Yusuf Says:

    Great Job and useful too

  21. Ashwin Patel Says:

    Hello Kamran,

    please discard my precious post…It worked great!!!! I’m converting from Windows 2008 64-bit to Linux 32 bit platform….i’m still working on it and @TRANSPORT.SQL stage, i’ll post here if i have any problem,please help if i get stuck.

    thank you so much for all your help.

    Ashwin

  22. Ashwin Patel Says:

    Hello Kamran,

    This is what i’m getting from last two days.

    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
    ORA-01262: Stat failed on a file destination directory
    Linux Error: 2: No such file or directory
    CREATE CONTROLFILE REUSE SET DATABASE “A2TEST” RESETLOGS NOARCHIVELOG
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ALTER TABLESPACE TEMP ADD TEMPFILE ‘/home/app/oracle/product/11.2.0/dbhome_1/oradata/a2test/temp01.dbf’
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    * Your database has been created successfully!
    * There are many things to think about for the new database. Here
    * is a checklist to help you stay on track:
    * 1. You may want to redefine the location of the directory objects.
    * 2. You may want to change the internal database identifier (DBID)
    * or the global database name for this database. Use the
    * NEWDBID Utility (nid).
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
    ORA-01262: Stat failed on a file destination directory
    Linux Error: 2: No such file or directory
    SQL>
    SQL> WHENEVER SQLERROR EXIT;
    SQL>
    SQL> DOC
    DOC>#######################################################################
    DOC>#######################################################################
    DOC> The following statement will cause an “ORA-01722: invalid number”
    DOC> error if there the database was not opened in UPGRADE mode
    DOC>
    DOC> If you encounter this error, execute “SHUTDOWN”, “STARTUP UPGRADE” and
    DOC> re-execute utlirp.sql
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>#
    SQL> SELECT TO_NUMBER(‘MUST_BE_OPEN_UPGRADE’) FROM v$instance
    2 WHERE status != ‘OPEN MIGRATE’;
    SELECT TO_NUMBER(‘MUST_BE_OPEN_UPGRADE’) FROM v$instance
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    Disconnected
    -bash-4.1$

  23. Kamran Agayev A. Says:

    Dear Ashwin

    According the error you get (ORA-32006: BACKGROUND_DUMP_DEST) I hope you’re using 11g. Don’t you?

    Please post some entry from your alert.log file

  24. Ashwin Patel Says:

    Hi Kamran,

    Here is the situation,

    1. I’ve ORACLE 10g running on windows 2008 R2 (64-bit) with ERP system.
    2. I want to move to RHEL6.

    now, i’ve built RHEL6 server (32-bit) to test. First i tried with Oracle 10g on RHEL6 didnt work, now i’m trying Oracle 11g on RHEL6.

    I’m good with Linux but not with Oracle, i’m following each step from your video tutorial. Again today, i re-install fresh copy of 11g on RHEL6, let me try and i’ll post the result.

  25. Ashwin Patel Says:

    Hello Kamran,

    Please help…..

    I’m soooooo glad today atleast Control file created……please help Kamran…here is the result.

    SQL> @TRANSPORT.SQL
    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-01081: cannot start already-running ORACLE – shut it down first

    Control file created.

    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: 2608
    Session ID: 19 Serial number: 3

    ERROR:
    ORA-03114: not connected to ORACLE

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    * Your database has been created successfully!
    * There are many things to think about for the new database. Here
    * is a checklist to help you stay on track:
    * 1. You may want to redefine the location of the directory objects.
    * 2. You may want to change the internal database identifier (DBID)
    * or the global database name for this database. Use the
    * NEWDBID Utility (nid).
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn’t exist
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn’t exist
    SQL>
    SQL> WHENEVER SQLERROR EXIT;
    SQL>
    SQL> DOC
    DOC>#######################################################################
    DOC>#######################################################################
    DOC> The following statement will cause an “ORA-01722: invalid number”
    DOC> error if there the database was not opened in UPGRADE mode
    DOC>
    DOC> If you encounter this error, execute “SHUTDOWN”, “STARTUP UPGRADE” and
    DOC> re-execute utlirp.sql
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>#
    SQL> SELECT TO_NUMBER(‘MUST_BE_OPEN_UPGRADE’) FROM v$instance
    2 WHERE status != ‘OPEN MIGRATE’;
    ERROR:
    ORA-03114: not connected to ORACLE

    Disconnected from Oracle Database 11g Release 11.2.0.1.0 – Production

  26. Ashwin Patel Says:

    Dear Kamran,

    Please help!!!!!!!!!!!!. I tried all different ways to convert but I’m stuck at here and can not go further.

    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: ‘/home/oracle/app/oracle/oradata/a2test/SYSTEM01.DBF’

    SQL> CREATE CONTROLFILE REUSE SET DATABASE “A2TEST” RESETLOGS ARCHIVELOG
    2 MAXLOGFILES 16
    3 MAXLOGMEMBERS 3
    4 MAXINSTANCES 8
    5 MAXLOGHISTORY 4672
    6 LOGFILE
    7 GROUP 1 ‘/home/oracle/app/oracle/oradata/a2test/redo01.log’ SIZE 50M,
    8 GROUP 2 ‘/home/oracle/app/oracle/oradata/a2test/redo02.log’ SIZE 50M,
    9 GROUP 3 ‘/home/oracle/app/oracle/oradata/a2test/redo03.log’ SIZE 50M
    10 DATAFILE
    11 ‘/home/oracle/app/oracle/oradata/a2test/SYSTEM01.DBF’,
    12 ‘/home/oracle/app/oracle/oradata/a2test/UNDOTBS01.DBF’,
    13 ‘/home/oracle/app/oracle/oradata/a2test/SYSAUX01.DBF’,
    14 ‘/home/oracle/app/oracle/oradata/a2test/USERS01.DBF’
    15 CHARACTER SET WE8MSWIN1252;

    Control file created.

    SQL> ALTER DATABASE OPEN RESETLOGS;
    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: ‘/home/oracle/app/oracle/oradata/a2test/SYSTEM01.DBF’

    SQL>

  27. Kamran Agayev A. Says:

    Dear Ashwin

    Recover the database before opening it in RESETLOGS mode usind RECOVER DATABASE command

  28. Ugur Inal Says:

    Güzel bir video olmuş Kamran. Tebrikler.

  29. Kamran Agayev A. Says:

    Merhaba Ugur. Bloguma hos geldin :)

    Feedback icin tesekkurler

  30. Ashwin Patel Says:

    hi Kamran,

    I’ve tried everything, still stuck at the same place “ORA-01194: file 1 needs more recovery to be consistent”

    I’ve tried,

    1. recover database using backup control file
    2. recover database using backup control file until cancel

    Still getting the error ” Recovery successfull but you will get the following error”
    ERROR at line 1:
    ORA-01113: file 1 needs media recovery
    ORA-01110: data file 1: ‘/home/oracle/app/oracle/oradata/a2test/SYSTEM01.DBF’

  31. rajesh Says:

    hi kamran,
    I have been trying to convert oracle 10g database on Enterprise linux to windows from past three days and i am getting a error like

    RMAN> convert database new database ‘lindadb’
    2> transport script ‘/u01/transport.sql’
    3> db_file_name_convert ‘/u01/app/oracle/oradata/raj’ ‘/u01/test’
    4> to platform ‘Microsoft Windows IA (32-bit)’;

    Starting convert at 14-APR-11
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=153 devtype=DISK

    External table SH.SALES_TRANSACTIONS_EXT found in the database

    Directory SYS.ADMIN_DIR found in the database
    Directory SYS.WORK_DIR found in the database
    Directory SYS.DATA_FILE_DIR found in the database
    Directory SYS.LOG_FILE_DIR found in the database
    Directory SYS.MEDIA_DIR found in the database
    Directory SYS.XMLDIR found in the database
    Directory SYS.SUBDIR found in the database
    Directory SYS.DATA_PUMP_DIR found in the database

    BFILE PM.PRINT_MEDIA found in the database

    User SYS with SYSDBA and SYSOPER privilege found in password file
    channel ORA_DISK_1: starting datafile conversion
    input datafile fno=00001 name=/u01/app/oracle/oradata/raj/system01.dbf
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/14/2011 18:52:27
    ORA-19504: failed to create file “/u01/test/system01.dbf”
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory

    PLZ help me
    thanks in advance.

  32. Kamran Agayev A. Says:

    Dear Rajesh

    Check whether the /u01/test directory exists and the “oracle” user has necessary privileges on it

  33. rajesh Says:

    dear sir

    thank u sir..

  34. raj Says:

    can i have video tutorial for 10g to 11g migration

  35. Kamran Agayev A. Says:

    Dear Raj

    It’s not so hard to upgrade the database from 10g to 11g. You have two options: DBUA (Database Upgrade Assistant) and manual migration.
    You can refer to the upgrade documentation
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17222/upgrade.htm#i1011372

  36. Sagar Says:

    Please send me Different scenerios of RMAN recovery on Linux environment

  37. Kamran Agayev A. Says:

    Check my video tutorials from the following link:
    http://kamranagayev.wordpress.com/oracle-video-tutorials/

  38. Anastasia Nagurnik Says:

    Dear Kamran,
    I have the same problem as Ashwin Patel. I try to migrate my database from windows server 2008 r2 (Oracle version 11.1.0.6.0) to Solaris x86 (Oracle version 11.2.0.2.0).
    But when i try to execute the transport.sql script, i get the error:

    SQL> @/u01/app/oracle/oradata/omega/TRANSPORT.SQL
    ORACLE instance started.

    Total System Global Area 2405122048 bytes
    Fixed Size 2226472 bytes
    Variable Size 1509951192 bytes
    Database Buffers 872415232 bytes
    Redo Buffers 20529152 bytes

    Control file created.

    ALTER DATABASE OPEN RESETLOGS
    *
    ERROR at line 1:
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: ‘/u01/app/oracle/oradata/omega/SYSTEM01.DBF’

    ALTER TABLESPACE TEMP ADD TEMPFILE ‘/u01/app/oracle/oradata/omega/TEMP01.DBF’
    *
    ERROR at line 1:
    ORA-01109: database not open

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

    Database dismounted.
    ORACLE instance shut down.
    ORACLE instance started.

    Total System Global Area 2405122048 bytes
    Fixed Size 2226472 bytes
    Variable Size 1509951192 bytes
    Database Buffers 872415232 bytes
    Redo Buffers 20529152 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

    SQL>
    SQL> WHENEVER SQLERROR EXIT;
    SQL>
    SQL> DOC
    DOC>#######################################################################
    DOC>#######################################################################
    DOC> The following statement will cause an “ORA-01722: invalid number”
    DOC> error if there the database was not opened in UPGRADE mode
    DOC>
    DOC> If you encounter this error, execute “SHUTDOWN”, “STARTUP UPGRADE” and
    DOC> re-execute utlirp.sql
    DOC>#######################################################################
    DOC>#######################################################################
    DOC>#
    SQL> SELECT TO_NUMBER(‘MUST_BE_OPEN_UPGRADE’) FROM v$instance
    2 WHERE status != ‘OPEN MIGRATE’;
    SELECT TO_NUMBER(‘MUST_BE_OPEN_UPGRADE’) FROM v$instance
    *
    ERROR at line 1:
    ORA-01722: invalid number

    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

    Please, help me to solve this problem.

  39. Zaur Hajili Says:

    Hi, Kamran,

    Is it possible convert database from OS that ENDIAN_FORMAT field is different from another one?

    for example:

    from: Windows 2003 x32 Oracle 11gR1
    to: Solaris 10.u5 x64 (sparc) Oracle 11gR2

  40. Kamran Agayev A. Says:

    No it’s not possible, for this you need to use CONVERT TABLESPACE command

  41. oraenthu Says:

    hello kamran
    please check
    https://forums.oracle.com/forums/thread.jspa?threadID=2428541&tstart=45&start=30
    thanks in advance
    oraenthu@live.com

  42. venkat Says:

    Dear Kamran,

    Thanks for the video ..

  43. venkat Says:

    Dear Kamran,

    We have currently Oracle 10gR2 on windows and we need to migrate the database to RHEL with Oracle 11gR2..

    1)Is it possible to migrate from Oracle 10gR2 on windows to RHEL with Oracle 11gR2
    or
    2)Is it possible to migrate from Oracle 10gR2 on windows to RHEL with Oracle 10gR2 first then upgrade oracle with 11gR2

    Please suggest me sir

    current version
    ===============
    SQL> select platform_id, platform_name from v$database;

    PLATFORM_ID PLATFORM_NAME
    ———– —————————————-
    7 Microsoft Windows IA (32-bit)

  44. Kamran Agayev A. Says:

    Hi Venkat
    I would suggest you to move it to 10g Linux and then upgrade it to 11g

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>