This page shows you how to create a conversion workspace and use it to immediately perform deterministic code and schema conversion from SQL Server to PostgreSQL. Before you create the workspace, make sure that you create a connection profile for your source database.
Required roles
To get the permissions that you need to create a conversion workspace,
ask your administrator to grant you the
Database Migration Admin (roles/datamigration.admin)
IAM role on your project.
For more information about granting roles, see Manage access in the Identity and Access Management documentation.
This predefined role contains the permissions required to create a conversion workspace in Database Migration Service. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to create a conversion workspace in Database Migration Service:
cloudaicompanion.entitlements.getThis permission is included in the
roles/datamigration.adminrole. It is required for the Gemini-enhanced conversion features.datamigration.conversionworkspaces.applydatamigration.conversionworkspaces.commitdatamigration.conversionworkspaces.convertdatamigration.conversionworkspaces.createdatamigration.conversionworkspaces.deletedatamigration.conversionworkspaces.getdatamigration.conversionworkspaces.getIamPolicydatamigration.conversionworkspaces.listdatamigration.conversionworkspaces.rollbackdatamigration.conversionworkspaces.seeddatamigration.conversionworkspaces.setIamPolicydatamigration.conversionworkspaces.update
You might also be able to get these permissions with custom roles or other predefined roles.
Create a conversion workspace
To create a conversion workspace and perform the schema conversion, do the following:
- In the Google Cloud console, go to Conversion workspaces.
- Click Set up workspace.
- On the Create a conversion workspace page, do the following:
- Enter the name, identifier, and region for your conversion workspace.
- From the Source database engine drop-down menu, select your source SQL Server database.
- From the Destination database engine select AlloyDB for PostgreSQL.
-
In the Enable Gemini settings for your workspace section, use the checkboxes to enable Gemini-powered conversion features. You can also enable these features later when you want to Convert code and schema with Gemini assistance.
Gemini-powered conversion features require the Gemini for Google Cloud API. Fore more information, see Gemini-powered conversion features.
- Click Create workspace and continue.
- On the Define source and pull schema snapshot page, do the following:
- From the Source connection profile drop-down menu, select the connection profile for your source database.
- Click Pull schema snapshot and continue.
Database Migration Service is now connecting to the source database and retrieving your schema. This process can take several minutes.
- On the Select and convert objects page, use the checkboxes to select which objects
you want to convert to PostgreSQL syntax.
You don't have to convert all your objects in one go. Instead, you can select just a few objects now and add more objects to the conversion later.
- Click Convert and continue.
The conversion workspace opens.
What's next
You can now work with your conversion workspace to fix conversion issues, modify your objects with the interactive editor, and apply converted schema to your destination database. See Convert SQL Server code and schema to PostgreSQL syntax.