Showing posts with label Migration. Show all posts
Showing posts with label Migration. Show all posts

Tuesday, April 18, 2023

Migrating from Oracle 11g to Oracle 19c involves a series of steps, including upgrading the database and performing data migration.


Migrating from Oracle 11g to Oracle 19c involves a series of steps, including upgrading the database and performing data migration. Here are the general steps involved:




Perform a full backup of your Oracle 11g database.

Install the Oracle 19c software on your server.

Create a new Oracle 19c database instance.

Upgrade the Oracle 11g database to the Oracle 19c version using the Database Upgrade Assistant (DBUA) tool. Here are the steps:

a. Launch the DBUA tool and select the option to upgrade an existing database.

b. Select the Oracle 11g database that you want to upgrade.

c. Follow the prompts and select the appropriate upgrade options, including the database version and the components to upgrade.

d. Review the upgrade summary and click "Upgrade" to start the upgrade process.

e. Monitor the progress of the upgrade and resolve any issues that may arise.

Perform post-upgrade tasks, including updating the initialization parameters, reviewing the database settings, and ensuring that the database is functioning correctly.

Migrate the data from the Oracle 11g database to the Oracle 19c database. This can be done using several methods, including Oracle Data Pump, Oracle GoldenGate, and SQL*Plus.

Test the new Oracle 19c database to ensure that it is functioning correctly and that all data has been migrated successfully.

Here are some commands you may use for data migration:

Oracle Data Pump export from Oracle 11g:

expdp username/password@source_db directory=DATA_PUMP_DIR dumpfile=export.dmp logfile=export.log full=y

Here are some commands you may use for data migration:

Oracle Data Pump export from Oracle 11g:

expdp username/password@source_db directory=DATA_PUMP_DIR dumpfile=export.dmp logfile=export.log full=y


Oracle Data Pump import to Oracle 19c:


impdp username/password@target_db directory=DATA_PUMP_DIR dumpfile=export.dmp logfile=import.log full=y



SQL*Plus export/import:


exp username/password@source_db file=export.dmp log=export.log full=y imp username/password@target_db file=export.dmp log=import.log full=y


Note that the specific steps and commands may vary depending on your environment and specific requirements. It is recommended that you consult the Oracle documentation and seek assistance from an experienced Oracle database administrator (DBA) to ensure a successful migration.

After migrating from Oracle 11g to Oracle 19c, there are some post-migration steps that you should perform to ensure that your new database is properly configured and functioning correctly. Here are some general steps and commands that you can use:

Update initialization parameters: Review the initialization parameters for the new Oracle 19c database and update them as necessary. Some common parameters to check include MEMORY_TARGET, SGA_TARGET, PGA_AGGREGATE_TARGET, LOG_ARCHIVE_DEST_n, DB_RECOVERY_FILE_DEST, and DB_CREATE_FILE_DEST.

Update optimizer statistics: Gather optimizer statistics for all database objects using the DBMS_STATS package. You can use the following command to gather statistics for all objects in the database:


EXEC DBMS_STATS.GATHER_DATABASE_STATS;

Review database security settings: Check the database security settings to ensure that they are appropriate for your environment. This includes checking user privileges, roles, and passwords, as well as enabling appropriate auditing and security policies.

Perform a full database backup: Take a full backup of the new Oracle 19c database using RMAN or another backup tool. This ensures that you have a recoverable copy of the database in case of any issues.

Perform testing: Test the new Oracle 19c database to ensure that it is functioning correctly and that all data has been migrated successfully. This includes running queries and applications to ensure that they work as expected.

Monitor database performance: Monitor the performance of the new Oracle 19c database to ensure that it is meeting your performance requirements. Use the various Oracle performance monitoring tools, such as AWR reports, to identify and address any performance issues.

Ensure high availability: Configure high availability features such as Oracle Data Guard or Oracle RAC to ensure that your database is always available in case of any hardware or software failures.

Looking forward for your suggestions.. please feel free to write to me.. Your help would definitely help to improve our blog. Chetan Yadav

Monday, April 17, 2023

Migrating from Oracle 19c to Postgres



Migrating from Oracle 19c to Postgres involves a number of steps. Here's a rough outline of the process along with some commands you can use:

  1. Install Postgres on the target server.

  2. Create a new database in Postgres:

    createdb mynewdatabase
  3. Install the Ora2Pg tool on the source server:

    arduino
    sudo apt-get install ora2pg
  4. Generate the Ora2Pg configuration file:

    css
    ora2pg --init_project myproject
  5. Edit the configuration file to match your Oracle database:

    bash
    vi myproject/ora2pg.conf
  6. Convert the Oracle database schema to Postgres:

    bash
    ora2pg -t EXPORT_SCHEMA -c myproject/ora2pg.conf -o schema.sql
  7. Convert the Oracle database data to Postgres:

    bash
    ora2pg -t EXPORT -c myproject/ora2pg.conf -o data.sql
  8. Transfer the schema and data files to the target server.

  9. Load the schema and data into Postgres:

    graphql
    psql mynewdatabase < schema.sql psql mynewdatabase < data.sql
  10. Verify that the data has been migrated correctly.

  11. Update any application code that accesses the database to use Postgres instead of Oracle.

Note that this is a high-level overview and there may be additional steps or variations depending on the specific needs of your migration. It's also important to thoroughly test the new system before cutting over to it in production.



Looking forward for your suggestions.. please feel free to write to me.. Your help would definitely help to improve our blog. Chetan Yadav

Monday, March 6, 2023

Migration Oracle Database 11g to 19c (CDB)


    Moving from Oracle Database 11g to 19c (CDB) might be challenging, but with the appropriate knowledge and direction, it can be a straightforward procedure. This article offers a thorough tutorial to assist you in upgrading your Oracle Database 11g to 19c (CDB).

Are you considering upgrading from Oracle Database 11g to 19c (CDB)? If so, a thorough understanding of the procedure is required to guarantee a smooth upgrading. This article offers a thorough tutorial on how to smoothly upgrade your Oracle Database 11g to 19c (CDB).


 


  A Complete Guide on Upgrading from Oracle Database 11g to 19c

                                                Are you still using Oracle Database 11g for your database? It's time to update it to Oracle Database 19c (CDB), the most recent version, in order to benefit from new features, improved security, and improved speed. The transition from Oracle Database 11g to Oracle Database 19c (CDB) might be challenging, but with the correct information and direction, it can be a straightforward procedure. This article offers a thorough tutorial to assist you in upgrading your Oracle Database 11g to 19c (CDB).

There are a few things you should take into account before you start the update process:

Make sure your system and software fit Oracle Database 19c's hardware and software requirements (CDB).

Verify your existing Oracle Database 11g's compatibility with Oracle Database 19c (CDB). Verify that the new version is compatible with all the applications that use the database.

Backup: Create a copy of your current database before you start the upgrade procedure. In the event that the upgrade procedure fails, this will assist you in restoring the database.

Testing: Prior to upgrading the production system, it is generally desirable to carry out a test upgrade on a test system. This will assist you in locating any problems that might occur throughout the update procedure.

After giving these things some thought, let's go on to the upgrade procedure.

Upgrade Oracle Database 11g to 12c as the first step

Upgrade your Oracle Database from 11g to 12c is the first step in moving to Oracle Database 19c (CDB). Because Oracle Database 19c (CDB) requires Oracle Database 12c Release 2 (12.2.0.1) or later versions, this step is crucial. The following stages are involved in upgrading Oracle Database 11g to Oracle Database 12c:

Install Oracle Database 12c Release 2 (12.2.0.1) or a later version by downloading it.

Make a backup of the database.

Using the command-line interface or the Database Upgrade Assistant (DBUA), upgrade the database (CLI).

Do post-upgrade duties, such as recompiling broken objects using the utlrp.sql script.

Upgrade Oracle Database 12c to 19c in step two (CDB)

The next stage is to upgrade to Oracle Database 19c after you have upgraded your Oracle Database 11g to 12c (CDB). The following steps are part of the upgrade process:

Install Oracle Database 19c by downloading it (CDB).

Make an Oracle Database 12c backup.

Use the DBUA or CLI to upgrade the database.

run the utlrp.sql script and other post-upgrade actions.



Looking forward to your suggestions.. please feel free to write to me.. Your help would definitely help to improve our blog. Chetan Yadav

Wednesday, March 1, 2023

Upgrade from Oracle Database 11g to 19c (Non-CDB)

                     Upgrading your Oracle database is a crucial task that ensures your system is up-to-date and functioning properly. Oracle Database 19c is the latest version of the database software that offers many new features and improvements over its predecessors. In this blog, we will discuss how to upgrade from Oracle Database 11g to 19c (Non-CDB).
Before starting the upgrade process, it is essential to perform a thorough backup of your existing database. This will help you recover your data in case of any issues during the upgrade process. Once you have backed up your data, you can proceed with the following steps:


Step 1: Pre-Upgrade Tasks
Before upgrading to 19c, you need to perform some pre-upgrade tasks. These tasks include:

Checking the minimum requirements for the Oracle Database 19c installation.
Gathering information about the existing database, such as the version, patch level, and configuration details.
Ensuring that the existing database is compatible with 19c. You can use the pre-upgrade information tool to check for compatibility issues.
Resolving any compatibility issues that may be identified by the pre-upgrade information tool.

Step 2: Install Oracle Database 19c Software
Download and install the Oracle Database 19c software on your server. Ensure that you install the software for the same platform as the existing database.

Step 3: Upgrade the Database
To upgrade the database, follow these steps:

Connect to the existing database as a privileged user.
Start the Database Upgrade Assistant (DBUA) utility.
The DBUA will guide you through the upgrade process, including the upgrade options and parameters.
Once the upgrade process is complete, verify the upgraded database's functionality.

Step 4: Post-Upgrade Tasks
After upgrading to 19c, perform the following post-upgrade tasks:

Run the post-upgrade status tool to verify the upgraded database's status.
Ensure that all the required database parameters are correctly set.
Run the time zone script to update the database's time zone data.

If you are using Oracle Enterprise Manager, ensure that the agent and plug-ins are upgraded to 19c.
In conclusion, upgrading to Oracle Database 19c (Non-CDB) from 11g is a straightforward process that requires careful planning and execution. By following the steps outlined above, you can ensure a successful upgrade and take advantage of the new features and improvements offered by Oracle Database 19c. Remember always to back up your database before making any changes to your system to ensure that your data is secure.

Looking forward to your suggestions.. please feel free to write to me.. Your help would definitely help to improve our blog. Chetan Yadav