In this article, we are going to demonstrate DATABASE MIGRATION FROM WINDOW SERVER TO LINUX SERVER. This is required as part of migration on request of the client to route application on new configuration (Weblogic).



WINDOWS SERVER VERSIONWindows Server 2012 R2 Standard
DATABASE VERSION12c Enterprise Edition Release – 64bit


DATABASE VERSION12c Enterprise Edition Release – 64bit


  1. Checked hardware, operating system, version and storage of both source & target servers.
  2. Verified the database edition and version.
  3. Kernel Parameters were set on the database to new Linux server.
  4. Directories were created on the server regarding ORACLE HOME and ORACLE BASE and other logs directory.
  5. Network connectivity between the application(s) and target database was installed through Network Protocols in the new environment so that user can connect to the existing details from front end that will automatically connect to new servers.
  6. Data protection and security implicated related to re-hosting the data.
  7. Database was clean shutdown to start the migration process to maintain the consistency of the data.
  8. Backup was taken of the database and transferred to the new server on the appropriate directory.
  9. Installation of the Oracle software on the server.        
  10. Backup was restored to the new servers with archive mode.
  11. Database was up and running with data up to date confirm via developer.    
  12. Parameters of database were set according to the new server ram and kernel settings.


  • Installed Kernel Parameters on linux server – /etc/sysctl.conf

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

  • Add the following lines to the “/etc/security/limits.conf” file.
  • Install the following packages if they are not already present.

rpm -Uvh binutils-2.*

rpm -Uvh compat-libstdc++-33*

rpm -Uvh compat-libstdc++-33*.i386.rpm

rpm -Uvh elfutils-libelf*

rpm -Uvh gcc-4.*

rpm -Uvh gcc-c++-4.*

rpm -Uvh glibc-2.*

rpm -Uvh glibc-common-2.*

rpm -Uvh glibc-devel-2.*

rpm -Uvh glibc-headers-2.*

rpm -Uvh ksh*

rpm -Uvh libaio-0.*

rpm -Uvh libaio-devel-0.*

rpm -Uvh libgomp-4.*

rpm -Uvh libgcc-4.*

rpm -Uvh libstdc++-4.*

rpm -Uvh libstdc++-devel-4.*

rpm -Uvh make-3.*

rpm -Uvh sysstat-7.*

rpm -Uvh unixODBC-2.*

rpm -Uvh unixODBC-devel-2.*

rpm -Uvh numactl-devel-*
  • Create the new groups and users.

We need to create new groups and users to install the oracle.

groupadd oinstall

groupadd dba

groupadd oper

groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle

passwd oracle

  • Create the directories in which the Oracle software will be installed.

Here we need to create directories to install the oracle software and after creating the directory we need to assign the privileges.

mkdir -p /u01/app/oracle/product/12c/dbsguru

chown -R oracle:oinstall /u01

chmod -R 775 /u01

  • Setup .bash_profile –


export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME =/u01/app/oracle/product/12c/dbsguru

  • Start the Oracle Universal Installer (OUI) to install the oracle and we need to create same name database on it using (DBCA)

    RunInstaller will install the oracle software and then dbca will create the required database.


Click here to get more Step by Step Oracle 19c Binary Installation and Database Creation On Linux.


Before starting migration took full expdp backup from window DB server and database was clean shutdown to start the migration process to maintain the consistency of the data.

expdp '"/as sysdba"' DIRECTORY=exp_dir full= Y dumpfile=exp_dbguru_20200902.dmp logfile=mig_dbguru_20200902.log parallel=2
  • Create required tablespaces, roles & profiles on linux DB server to make error-less import.
  • Imported database through impdp utility
 impdp '"/AS SYSDBA"' DIRECTORY=exp_dir full= Y dumpfile=EXP_dbguru_20200902.DMP logfile=imp_mig_dbguru_20200902.log parallel=2

Click here to get more on Full Database Refresh Using EXPDP-IMPDP Datapump command

  • Alter database in archive log mode

    We will put here databsae in archive log mode.

select name, open_mode, log_mode, current_scn from v$database;

shutdown immediate;

startup mount;

alter database archivelog;

alter database open;

  • Recompile all invalid objects in the database

We have to recompile the invalid objects with utlrp.sql

  • Gather database stats

    We will gather statistics on database level to avoid any performance degradation.

EXEC DBMS_STATS.gather_database_stats(estimate_percent => 25 , degree => 4 , cascade => TRUE);

This document is only for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.

Hope so you like this article
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the latest update. Click here to know more about our pursuit.

Related Articles


How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Hello and welcome to DBsGuru,DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!Share Learn Grow!


  1. Main point you have missed ..
    Create required tablespaces, roles & profiles on linux DB server to make error-less import

    This one is imp you should provide more info like how to generate dynamic query for this

    1. Thanks Shashi for the feedback. In this article, database is migrated with full=Y option and doesnot require explicitly to create roles etc. However, we have taken your request and we will try to cover the same topics in other articles.

      Please keep visiting us for new article and your feedback always motivate us.

      1. You are right, For Full Impdp actually we no need to create tablespace, roles and profiles and users

Comments are closed.