Create and configure your destination Cloud SQL instance

For heterogeneous Oracle migrations to Cloud SQL, Database Migration Service requires that you first create and configure your Cloud SQL destination instance. Perform the following steps:

  1. Create your destination instance. Make sure you configure enough compute and memory resources to cover your migration needs and follow the requirements listed in known limitations .

    We recommend that you create your destination instance with settings specific to the destination networking method you want to use:

    If you want to use...
    Then...
    Create your destination instance with public IP enabled. See Create a Cloud SQL instance in the Cloud SQL for PostgreSQL documentation.

    Determine if you can use a PSC-enabled Cloud SQL instance as your migration destination. Carefully consider functionality limitations for PSC-enabled instances. See Private Service Connect limitations in the Cloud SQL documentation.

    • For scenarios where you can use a PSC-enabled Cloud SQL instance, create your destination instance with both private IP and Private Service Connect enabled. See Create a PSC-enabled Cloud SQL instance in the Cloud SQL for PostgreSQL documentation.
    • For scenarios where you can't use a PSC-enabled Cloud SQL instance, create your destination instance with private IP enabled. See Create a Cloud SQL instance with private IP enabled in the Cloud SQL for PostgreSQL documentation.
  2. Create the following entities in your destination instance:
  3. Grant the required permissions to the dedicated migration user account. Do the following:
    1. Connect to your Cloud SQL instance with a SQL client. You can use the following methods:
      • psql client . You can use this method to connect to your instance private IP, but it might require that you create a Compute Engine virtual machine.
      • gcloud sql connect command. This command works only for Cloud SQL instances that have a public IP address enabled.
    2. Run the following command on your destination instance:
       GRANT 
        
       CREATE 
        
       ON 
        
       DATABASE 
        
        DESTINATION_DB_NAME 
       
        
       TO 
        
       " MIGRATION_USER_ACCOUNT_NAME 
      " 
       ; 
      
    3. Optional: Grant your migration user the CREATEDB permission for the purposes of testing converted schema.

      At a later point in the migration, after you convert the source schema , you can use Database Migration Service to test whether converted schema can be applied to a PostgreSQL database. To perform the test, Database Migration Service creates a temporary database to avoid impacting your destination database. If you want to test your converted schema , grant your migration user the CREATEDB permission. Use the following command:

       ALTER 
        
       USER 
        
       " MIGRATION_USER_ACCOUNT_NAME 
      " 
        
       WITH 
        
       CREATEDB 
       ; 
      
    4. For source databases that contain foreign keys or triggers : Skip replication for foreign keys and triggers by using the REPLICATION option with the dedicated migration user account. Run the following command:
       ALTER 
        
       USER 
        
       " MIGRATION_USER_ACCOUNT_NAME 
      " 
        
       WITH 
        
       REPLICATION 
       ; 
      

      For more information about how Database Migration Service migrates foreign keys and triggers, see Considerations for foreign keys and triggers .

What's next?

Create a Mobile Website
View Site in Mobile | Classic
Share by: