Tuesday, October 24, 2017

Database Migration from Windows to Linux Using RMAN

Hai, this article will illustrate you for migrating your database from Windows to Linux Environment.
Assumptions:  
Resource
Source Database Details
Target Database Details
Operating System
Windows Server 2008 64 Bit
Oracle Linux 5.7 64 Bit
Oracle Version
11.2.0.1 64 bit
11.2.0.1 64 Bit


Install oracle RDBMS in windows.



Open Command Prompt as run as Administrator



Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\admin>cd C:/app/admin/product/11.2.0/dbhome_1/bin

C:\app\admin\product\11.2.0\dbhome_1\BIN> dbca


Create a database (DELL) and enable Archive log


C:\app\admin\product\11.2.0\dbhome_1\BIN>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Oct 22 16:56:58 2017

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL>


==============================================================================================================
ORACLE RDBMS Version and Platform
SQL>
SQL> show user
USER is "SYS"
SQL>
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL>
SQL>



==============================================================================================================
Check platform Compatibility between source and target OS:
NOTE: ENDIAN_FORMAT for both OS should be same
SQL>
SQL> col platform_name format a40;
SQL>
SQL>
SQL> select platform_id, platform_name from v$database;

PLATFORM_ID PLATFORM_NAME
----------- -----------------------------------
         12 Microsoft Windows x86 64-bit

SQL>
SQL>
SQL> select * from v$transportable_platform order by 2;

PLATFORM_ID PLATFORM_NAME                       ENDIAN_FORMAT
----------- ----------------------------------- --------------
          6 AIX-Based Systems (64-bit)          Big
         16 Apple Mac OS                        Big
         21 Apple Mac OS (x86-64)               Little
         19 HP IA Open VMS                      Little
         15 HP Open VMS                         Little
          5 HP Tru64 UNIX                       Little
          3 HP-UX (64-bit)                      Big
          4 HP-UX IA (64-bit)                   Big
         18 IBM Power Based Linux               Big
          9 IBM zSeries Based Linux             Big
         10 Linux IA (32-bit)                   Little

PLATFORM_ID PLATFORM_NAME                       ENDIAN_FORMAT
----------- ----------------------------------- --------------
         11 Linux IA (64-bit)                   Little
         13 Linux x86 64-bit                    Little
          7 Microsoft Windows IA (32-bit)       Little
          8 Microsoft Windows IA (64-bit)       Little
         12 Microsoft Windows x86 64-bit        Little
         17 Solaris Operating System (x86)      Little
         20 Solaris Operating System (x86-64)   Little
          1 Solaris[tm] OE (32-bit)             Big
          2 Solaris[tm] OE (64-bit)             Big

20 rows selected.

SQL>

SQL>



==============================================================================================================
Checking data file status

select checkpoint_time,fuzzy,count(*),status
from ( select checkpoint_time,fuzzy,status
       from v$datafile_header
       union all
       select controlfile_time,'CTL',null from v$database)
group by checkpoint_time,fuzzy,status;



SQL>
SQL>
SQL> select checkpoint_time,fuzzy,count(*),status
  2  from ( select checkpoint_time,fuzzy,status
  3         from v$datafile_header
  4         union all
  5         select controlfile_time,'CTL',null from v$database)
  6  group by checkpoint_time,fuzzy,status;

CHECKPOIN FUZ   COUNT(*) STATUS
--------- --- ---------- -------
24-OCT-17 CTL          1
24-OCT-17 YES          4 ONLINE

SQL>


==============================================================================================================
Database CRD files
SQL>
SQL> select NAME, OPEN_MODE, PLATFORM_NAME from v$database;

NAME      OPEN_MODE            PLATFORM_NAME
--------- -------------------- -----------------------------------
DELL      READ WRITE           Microsoft Windows x86 64-bit

SQL>


SQL>
SQL>
SQL> select name from v$controlfile;

NAME
-------------------------------------------------------------------------------

C:\APP\ADMIN\ORADATA\DELL\CONTROL01.CTL
C:\APP\ADMIN\FLASH_RECOVERY_AREA\DELL\CONTROL02.CTL

SQL>

SQL> select member from v$logfile;

MEMBER
----------------------------------------------------------------

C:\APP\ADMIN\ORADATA\DELL\REDO03.LOG
C:\APP\ADMIN\ORADATA\DELL\REDO02.LOG
C:\APP\ADMIN\ORADATA\DELL\REDO01.LOG

SQL>

SQL>
SQL> col file_name for a40;
SQL> select file_name, tablespace_name from dba_data_files;

FILE_NAME                                TABLESPACE_NAME
---------------------------------------- ------------------------------
C:\APP\ADMIN\ORADATA\DELL\USERS01.DBF    USERS
C:\APP\ADMIN\ORADATA\DELL\UNDOTBS01.DBF  UNDOTBS1
C:\APP\ADMIN\ORADATA\DELL\SYSAUX01.DBF   SYSAUX
C:\APP\ADMIN\ORADATA\DELL\SYSTEM01.DBF   SYSTEM

SQL>


==============================================================================================================
Archive Log Status
SQL>
SQL>
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Next log sequence to archive   2
Current log sequence           2
SQL>
SQL>
SQL>


==============================================================================================================
Creation of User and table
SQL>
SQL> grant connect, resource to u1 identified by u1;

Grant succeeded.

SQL> conn u1/u1
Connected.
SQL> show user
USER is "U1"
SQL> create table emp (EName varchar(15), ENo number);

Table created.

SQL> insert into emp (EName, ENo) values ('aaa',10);

1 row created.

SQL> insert into emp (EName, ENo) values ('bbb',20);

1 row created.

SQL> insert into emp (EName, ENo) values ('ccc',30);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from emp;

ENAME                  ENO
--------------- ----------
aaa                     10
bbb                     20
ccc                     30

SQL>


==============================================================================================================
Invalid Objects Check
SQL>
SQL> select count(*),owner from dba_objects where status='INVALID' group by owner;

no rows selected

SQL>


==============================================================================================================
Creation of PFILE
SQL>
SQL> show user
USER is "SYS"
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      C:\APP\ADMIN\PRODUCT\11.2.0\DB
                                                 HOME_1\DATABASE\SPFILEDELL.ORA
SQL>


Create a Folder mig in Windows to store all migration files
Location- C:/mig


SQL> create pfile='C:\mig\initORCL.ora' from spfile;

File created.

SQL>

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


==============================================================================================================
Start the database in read only mode:
SQL>
SQL> startup mount
ORACLE instance started.

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             243271080 bytes
Database Buffers          528482304 bytes
Redo Buffers                5259264 bytes
Database mounted.
SQL>
SQL>
SQL>
SQL>
SQL> alter database open read only;

Database altered.

SQL>


==============================================================================================================
Check database readiness for transport from Windows to Linux:

set serveroutput on
declare
v_return boolean;
begin
v_return:= dbms_tdb.check_db( 'Linux IA (64-bit)');
end;
/


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

PL/SQL procedure successfully completed.

SQL>


==============================================================================================================
Check if there are any external objects:

declare
v_return boolean;
begin
v_return:= dbms_tdb.check_external;
end;
/


---------------------------------------------------------------
SQL> declare
  2  v_return boolean;
  3  begin
  4  v_return:= dbms_tdb.check_external;
  5  end;
  6  /
The following directories exist in the database:
SYS.ORACLE_OCM_CONFIG_DIR, SYS.DATA_PUMP_DIR, SYS.XMLDIR

PL/SQL procedure successfully completed.

SQL>


SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options

C:\app\admin\product\11.2.0\dbhome_1\BIN>
C:\app\admin\product\11.2.0\dbhome_1\BIN>


==============================================================================================================
Create directory for RMAN files(C:\mig) and prepare convert script

convert database new database 'ORCL'
transport script 'C:\mig\transport.sql'
db_file_name_convert 'C:\app\admin\oradata\DELL' 'C:\mig'
to platform 'Linux IA (64-bit)';


C:\app\admin\product\11.2.0\dbhome_1\BIN>
C:\app\admin\product\11.2.0\dbhome_1\BIN>
C:\app\admin\product\11.2.0\dbhome_1\BIN>rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Oct 24 09:10:32 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DELL (DBID=3928948432)

RMAN>

RMAN>

RMAN> convert database new database 'ORCL'
2> transport script 'C:\mig\transport.sql'
3> db_file_name_convert 'C:\app\admin\oradata\DELL' 'C:\mig'
4> to platform 'Linux IA (64-bit)';

Starting conversion at source at 24-OCT-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK

Directory SYS.ORACLE_OCM_CONFIG_DIR found in the database
Directory SYS.DATA_PUMP_DIR found in the database
Directory SYS.XMLDIR found in the database

User SYS with SYSDBA and SYSOPER privilege found in password file
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00001 name=C:\APP\ADMIN\ORADATA\DELL\SYSTEM01.DBF
converted datafile=C:\MIG\SYSTEM01.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00002 name=C:\APP\ADMIN\ORADATA\DELL\SYSAUX01.DBF
converted datafile=C:\MIG\SYSAUX01.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00003 name=C:\APP\ADMIN\ORADATA\DELL\UNDOTBS01.DBF
converted datafile=C:\MIG\UNDOTBS01.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting datafile conversion
input datafile file number=00004 name=C:\APP\ADMIN\ORADATA\DELL\USERS01.DBF
converted datafile=C:\MIG\USERS01.DBF
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Edit init.ora file C:\APP\ADMIN\PRODUCT\11.2.0\DBHOME_1\DATABASE\INIT_00SHQ72C_1
_0.ORA. This PFILE will be used to create the database on the target platform
Run SQL script C:\MIG\TRANSPORT.SQL on the target platform to create database
To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the target plat
form
To change the internal database identifier, use DBNEWID Utility
Finished conversion at source at 24-OCT-17

RMAN>

RMAN> exit


Recovery Manager complete.

C:\app\admin\product\11.2.0\dbhome_1\BIN>
C:\app\admin\product\11.2.0\dbhome_1\BIN>


==============================================================================================================
Prepare Linux Machine & Install Oracle Home
[root@rac1 ~]#
[root@rac1 ~]# lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Release:        5.7
Codename:       Carthage
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]# arch
x86_64
[root@rac1 ~]#

[root@rac1 ~]# hostname -i
192.168.1.11
[root@rac1 ~]#

[root@rac1 ~]# hostname
rac1.dell.com
[root@rac1 ~]#
[root@rac1 ~]#


==============================================================================================================
Copy mig folder from Window to Linux
As it is in VMWARE I have enabled Share folder b/w Windows and Linux
[root@rac1 ~]#
[root@rac1 ~]# mkdir -p /u01/mig
[root@rac1 ~]#
[root@rac1 ~]# cd /mnt/hgfs/G/ORACLE_SOFTWARES/mig/
[root@rac1 mig]#
[root@rac1 mig]# ls
initORCL.ora  SYSTEM01.DBF   UNDOTBS01.DBF
SYSAUX01.DBF  TRANSPORT.SQL  USERS01.DBF
[root@rac1 mig]#
[root@rac1 mig]# cp * /u01/mig/
[root@rac1 mig]#


==============================================================================================================
Create Directories as per your Parameter file
[root@rac1 ~]#
[root@rac1 ~]# mkdir -p /u01/app/oracle/ORCL
[root@rac1 ~]# mkdir -p /u01/app/oracle/flash_recovery_area/ORCL
[root@rac1 ~]# mkdir -p /u01/app/oracle/admin/ORCL/adump
[root@rac1 ~]#


==============================================================================================================
Copy of Database files to ORCL Folder
[root@rac1 ~]#
[root@rac1 ~]# cd /u01/mig/
[root@rac1 ~]#
[root@rac1 mig]# ls
initORCL.ora  SYSTEM01.DBF   UNDOTBS01.DBF
SYSAUX01.DBF  TRANSPORT.SQL  USERS01.DBF
[root@rac1 mig]#
[root@rac1 mig]# cp *DBF /u01/app/oracle/ORCL/
[root@rac1 mig]#


==============================================================================================================
Set environment for Linux
[oracle@rac1 ~]$
[oracle@rac1 ~]$ su - oracle
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cat 11201.env
export ORACLE_SID=ORCL
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib/usr/lib; export LD_LIBRARY_PATH


==============================================================================================================
Modify the highlighted in Pfile for ORCL DATABASE
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$
[oracle@rac1 ~]$ . 11201.env
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cp /u01/mig/initORCL.ora $ORACLE_HOME/dbs
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ cat initORCL.ora
dell.__db_cache_size=436207616
dell.__java_pool_size=16777216
dell.__large_pool_size=16777216
dell.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
dell.__pga_aggregate_target=452984832
dell.__sga_target=671088640
dell.__shared_io_pool_size=0
dell.__shared_pool_size=184549376
dell.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/ORCL/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/ORCL/control01.ctl','/u01/app/oracle/flash_recovery_area/ORCL/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='ORCL'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4102029312
*.diagnostic_dest='/u01/app/oracle/'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DELLXDB)'
*.log_archive_format='ARC%S_%R.%T'
*.memory_target=1121976320
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
[oracle@rac1 dbs]$


==============================================================================================================
Modify the highlighted in Transport Script as per your Requirement

Read the script, as it has all instruction for Migrating Database
[oracle@rac1 mig]$
[oracle@rac1 mig]$ cat TRANSPORT.SQL
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.

-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
--  ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE

STARTUP NOMOUNT PFILE='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initORCL.ora'
CREATE CONTROLFILE REUSE SET DATABASE "ORCL" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/u01/app/oracle/ORCL/log01a.dbf'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '/u01/app/oracle/ORCL/log02a.dbf'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '/u01/app/oracle/ORCL/log03a.dbf'  SIZE 50M BLOCKSIZE 512,
DATAFILE
  '/u01/app/oracle/ORCL/SYSTEM01.DBF',
  '/u01/app/oracle/ORCL/SYSAUX01.DBF',
  '/u01/app/oracle/ORCL/UNDOTBS01.DBF',
  '/u01/app/oracle/ORCL/USERS01.DBF'
CHARACTER SET WE8MSWIN1252
;

-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;

-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/ORCL/temp01.DBF'
     SIZE 20971520  AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
-- End of tempfile additions.
--

set echo off
prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prompt * Your 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='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initORCL.ora'
@@ /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlirp.sql
SHUTDOWN IMMEDIATE
STARTUP PFILE='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initORCL.ora'
-- The following step will recompile all PL/SQL modules.
-- It may take serveral hours to complete.
@@ /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/utlrp.sql
set feedback 6;
[oracle@rac1 mig]$


==============================================================================================================
Change ownership to oracle user
[oracle@rac1 mig]$
[oracle@rac1 mig]$ exit
logout
[root@rac1 ~]# chown -R oracle:oinstall /u01
[root@rac1 ~]#


==============================================================================================================
Run TRANSPORT.SQL Script
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$
[oracle@rac1 ~]$ . 11201.env
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /u01/mig/
[oracle@rac1 mig]$
[oracle@rac1 mig]$ ls
initORCL.ora  SYSTEM01.DBF   UNDOTBS01.DBF
SYSAUX01.DBF  TRANSPORT.SQL  USERS01.DBF
[oracle@rac1 mig]$
[oracle@rac1 mig]$
[oracle@rac1 mig]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 24 08:41:45 2017

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL>
SQL> @TRANSPORT.SQL
ORACLE instance started.

Total System Global Area 1119043584 bytes
Fixed Size                  2212616 bytes
Variable Size             671091960 bytes
Database Buffers          436207616 bytes
Redo Buffers                9531392 bytes

Control file created.


Database altered.


Tablespace altered.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* 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).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area 1119043584 bytes
Fixed Size                  2212616 bytes
Variable Size             671091960 bytes
Database Buffers          436207616 bytes
Redo Buffers                9531392 bytes
Database mounted.
Database opened.
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';

no rows selected

SQL>
SQL> Rem #(8264899): The former code here to store object numbers of all valid
SQL> Rem PL/SQL-based functional indexes, is no longer needed.
SQL>
SQL> Rem invalidate all pl/sql modules and recompile standard and dbms_standard
SQL> @@utlip
..........
..........
..........
..........
..........
..........
..........
..........
..........
 81        EXECUTE IMMEDIATE 'DROP TABLE sys.enabled$indexes';
 82
 83     EXCEPTION
 84        WHEN NO_DATA_FOUND THEN NULL;
 85
 86  END;
 87  /

PL/SQL procedure successfully completed.

SQL>
SQL> Rem =====================================================================
SQL> Rem Run component validation procedure
SQL> Rem =====================================================================
SQL>
SQL> EXECUTE dbms_registry_sys.validate_components;

PL/SQL procedure successfully completed.

SQL> SET serveroutput off
SQL>
SQL>
SQL> Rem ===========================================================================
SQL> Rem END utlrp.sql
SQL> Rem ===========================================================================
SQL> set feedback 6;
SQL>

Database Migration Has Completed





==============================================================================================================
Verify Your Database Migration, Invalid Objects, Users DATA
SQL> 
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL>
SQL> col platform_name format a35;
SQL> select platform_id, platform_name from v$database;

PLATFORM_ID PLATFORM_NAME
----------- -----------------------------------
         13 Linux x86 64-bit

SQL>
SQL> select NAME, OPEN_MODE, PLATFORM_NAME from v$database;

NAME      OPEN_MODE            PLATFORM_NAME
--------- -------------------- -----------------------------------
ORCL      READ WRITE           Linux x86 64-bit

SQL>
SQL> select count(*),owner from dba_objects where status='INVALID' group by owner;

no rows selected

SQL>
SQL>
SQL> conn u1/u1
Connected.
SQL> select * from emp;

ENAME                  ENO
--------------- ----------
aaa                     10
bbb                     20
ccc                     30

SQL>

                       
This article helps those who like to Migrate Database from Windows to Linux Environment. 

No comments:

Post a Comment