Membuat ruang kerja konversi dan mengonversi skema
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menunjukkan cara membuat ruang kerja konversi dan menggunakannya untuk segera melakukan konversi skema dan kode deterministik dari Oracle ke PostgreSQL. Sebelum membuat ruang kerja, pastikan Anda
membuat profil koneksi untuk database sumber Anda.
Workspace dengan editor bawaan
Saat membuat ruang kerja konversi interaktif, Anda dapat mengupgradenya untuk mengakses
konversi otomatis Gemini.
Upgrade ruang kerja hanya dapat dilakukan satu kali,
segera setelah Anda membuka ruang kerja konversi yang baru dibuat.
Operasi ini dijelaskan sebagai langkah terakhir dalam prosedur ini.
Untuk membuat ruang kerja konversi interaktif dan melakukan konversi skema, lakukan hal berikut:
Di konsol Google Cloud , buka Ruang kerja konversi.
Saat membuka ruang kerja baru untuk pertama kalinya, Anda dapat mengupgradenya untuk
mengakses fitur konversi otomatis yang didukung Gemini.
Lakukan tindakan berikut:
Pada dialog Memperkenalkan konversi otomatis Gemini, centang kotak
Upgrade ruang kerja untuk menjelajahi pengalaman baru, lalu klik
Lanjutkan.
Pada dialog Konversi objek sumber dengan Gemini?,
klik Konversi.
Database Migration Service kini melakukan proses konversi lagi untuk menerapkan peningkatan konversi yang didukung Gemini di atas hasil konversi deterministik.
Untuk mengetahui informasi selengkapnya tentang fitur konversi otomatis Gemini, lihat
Konversi otomatis Gemini.
Ruang kerja konversi lama
Ruang kerja konversi lama adalah jenis ruang kerja konversi yang lebih lama dan lebih terbatas. Sebaiknya jangan gunakan jenis ruang kerja konversi lama untuk migrasi Anda. Jika Anda perlu menggunakan ruang kerja konversi lama, perluas bagian Membuat ruang kerja konversi lama dan mengonversi skema untuk mengetahui informasi selengkapnya.
Membuat ruang kerja konversi lama dan mengonversi skema
Ruang kerja konversi lama menggunakan file konfigurasi Ora2Pg.
Sebelum membuat ruang kerja konversi lama, pastikan Anda membuat konfigurasi Ora2Pg di luar Database Migration Service terlebih dahulu.
Untuk mengetahui informasi selengkapnya, lihat
Bekerja dengan ruang kerja konversi lama.
Di konsol Google Cloud , buka Ruang kerja konversi.
Di halaman Buat ruang kerja konversi, lakukan tindakan berikut:
Masukkan nama, ID, dan region untuk ruang kerja konversi Anda.
Dari menu drop-down Mesin database sumber, pilih Oracle.
Dari Destination database engine, pilih
Cloud SQL for PostgreSQL.
Luaskan bagian Sesuaikan konfigurasi ruang kerja,
lalu centang kotak Aktifkan ruang kerja konversi lama.
Klik Buat ruang kerja dan lanjutkan.
Di halaman Hubungkan ke sumber dan konversi objek, lakukan tindakan berikut:
Dari menu drop-down Profil koneksi sumber, pilih profil
koneksi untuk database sumber Anda.
Di kotak File konfigurasi, klik Telusuri dan gunakan
pemilih file sistem untuk memilih file pemetaan konversi Anda.
Anda dapat mengupload beberapa file pemetaan konversi dengan mengklik
Tambahkan file.
Di bagian Convert the configuration, klik
Pull schema and convert.
Database Migration Service kini terhubung ke database sumber,
mengambil skema Anda dan mengonversinya ke skema SQL tujuan
sesuai dengan aturan yang ditentukan dalam file pemetaan konversi Anda.
Proses ini dapat memerlukan waktu beberapa menit.
Klik Simpan dan tutup.
Halaman detail ruang kerja konversi akan terbuka.
Sekarang Anda dapat menerapkan skema yang dikonversi ke database tujuan. Jika database sumber Anda menyertakan tabel yang tidak memiliki kunci
primer, Anda juga perlu membuat batasan kunci primer secara manual di
tabel yang dikonversi dalam database tujuan setelah Anda menerapkan skema yang dikonversi.
Untuk mengetahui informasi selengkapnya, lihat
Bekerja dengan ruang kerja konversi lama.
Langkah berikutnya
Sekarang Anda dapat menggunakan ruang kerja konversi untuk memperbaiki masalah konversi, mengubah objek dengan editor interaktif, dan menerapkan skema yang dikonversi ke database tujuan. Lihat
Mengonversi kode dan skema Oracle ke sintaksis PostgreSQL.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-01 UTC."],[[["\u003cp\u003eConversion workspaces are used to convert source database schemas and objects into a format compatible with the destination database, allowing Database Migration Service to migrate data.\u003c/p\u003e\n"],["\u003cp\u003eThere are two types of conversion workspaces: one with a built-in editor for live editing, and a legacy option that utilizes Ora2Pg for schema conversion.\u003c/p\u003e\n"],["\u003cp\u003eSetting up a conversion workspace involves defining its settings, connecting to the source database, pulling schema objects, performing source conversion, and applying the converted schema to the destination database.\u003c/p\u003e\n"],["\u003cp\u003ePrerequisites for setting up a workspace include creating a connection profile for the source Oracle database and optionally configuring an Ora2Pg file for legacy workspace.\u003c/p\u003e\n"],["\u003cp\u003eDuring the process, users can test the connection to the source database and pull schema data, and in the built-in editor, can choose between saving the conversion workspace without immediate conversion or converting the schema and code during creation.\u003c/p\u003e\n"]]],[],null,["# Create a conversion workspace and convert schema\n\nThis page shows you how to create a conversion workspace and use\nit to immediately perform deterministic code and schema conversion from Oracle\nto PostgreSQL. Before you create the workspace, make sure that you\n[create a connection profile for your source database](/database-migration/docs/oracle-to-postgresql/create-source-connection-profile).\n\nWorkspaces with the built-in editor\n-----------------------------------\n\nWhen you create an interactive conversion workspace,\nyou can upgrade it to access\n[Gemini auto-conversion](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini#auto-conversion).\nUpgrading the workspace is possible only once,\nimmediately after you open the newly created conversion workspace.\nThis operation is described as the last step in this procedure.\n\nTo create an interactive conversion workspace and perform the schema\nconversion, do the following:\n\n1. In the Google Cloud console, go to **Conversion workspaces** .\n\n [Go to Conversion workspaces](https://console.cloud.google.com/dbmigration/conversion-workspaces)\n2. Click **Set up workspace**.\n3. On the **Create a conversion workspace** page, do the following:\n 1. Enter the name, identifier, and region for your conversion workspace.\n 2. From the **Source database engine** drop-down menu, select **Oracle**.\n 3. From the **Destination database engine** select **Cloud SQL for PostgreSQL**.\n 4. Click **Create workspace and continue**.\n4. On the **Define source and pull schema snapshot** page, do the following:\n 1. From the **Source connection profile** drop-down menu, select the connection profile for your source database.\n 2. Click **Pull schema snapshot and continue**.\n\n Database Migration Service is now connecting to the source database and retrieving your schema.\n This process can take several minutes.\n5. On the **Select and convert objects** page, use the checkboxes to select which objects you want to convert to PostgreSQL syntax.\n\n You don't have to convert all your objects in one go. Instead, you can\n select just a few objects now and\n [add more objects to the conversion](/database-migration/docs/oracle-to-postgresql/work-with-conversion-workspaces#add-source-objects) later.\n6. Click **Convert and continue** .\n\n The conversion workspace opens.\n7. When you open a new workspace for the first time, you can upgrade it to access the Gemini-powered auto-conversion feature. Do the following:\n - In the **Introducing Gemini auto-conversion** dialog, select the **Upgrade workspace to explore the new experience** checkbox, and click **Continue**.\n - In the **Convert source objects with Gemini?** dialog, click **Convert** .\n\n Database Migration Service now performs the conversion process again to\n apply Gemini-powered conversion enhancements\n on top of the deterministic conversion results.\n For more information on Gemini auto-conversion\n feature, see\n [Gemini auto-conversion](/database-migration/docs/oracle-to-postgresql/code-conversion-with-gemini#auto-conversion).\n\nLegacy conversion workspaces\n----------------------------\n\nLegacy conversion workspaces are an older, more limited type of conversion\nworkspaces. We don't recommend using the legacy type of conversion\nworkspaces for your migrations. If you need to use a legacy conversion workspace,\nexpand the **Create a legacy conversion workspace and convert schema** section\nfor more information. \n\n#### Create a legacy conversion workspace and convert schema\n\nLegacy conversion workspaces use Ora2Pg configuration files.\nBefore you create a legacy conversion workspace, make sure you first\ncreate your Ora2Pg configuration outside Database Migration Service.\nFor more information, see\n[Work with legacy conversion workspaces](/database-migration/docs/oracle-to-postgresql/legacy-conversion-workspaces).\n\n1. In the Google Cloud console, go to **Conversion workspaces** .\n\n [Go to Conversion workspaces](https://console.cloud.google.com/dbmigration/conversion-workspaces)\n2. Click **Set up workspace**.\n3. On the **Create a conversion workspace** page, do the following:\n 1. Enter the name, identifier, and region for your conversion workspace.\n 2. From the **Source database engine** drop-down menu, select **Oracle**.\n 3. From the **Destination database engine** select **Cloud SQL for PostgreSQL**.\n 4. Expand the **Customize workspace configurations** section, and select the **Enable legacy conversion workspace** checkbox.\n 5. Click **Create workspace and continue**.\n4. On the **Connect to source and convert objects** page, do the following:\n 1. From the **Source connection profile** drop-down menu, select the connection profile for your source database.\n 2. In the **Configuration file** box, click **Browse** and use\n the system file picker to select your conversion mapping file.\n\n You can upload multiple conversion mapping files by clicking\n **Add file**.\n 3. In the **Convert the configuration** section, click\n **Pull schema and convert**.\n\n Database Migration Service is now connecting to the source database,\n retrieving your schema and converting it to the destination SQL schema\n according to the rules defined in your conversion mapping file.\n This process can take several minutes.\n5. Click **Save and close** .\n\n The conversion workspace details page opens.\n\nYou can now apply the converted schema to your destination\ndatabase. If your source database includes tables that don't have primary\nkeys, you also need to manually create primary key constraints in the\nconverted tables in the destination database after you apply the converted schema.\nFor more information, see\n[Work with legacy conversion workspaces](/database-migration/docs/oracle-to-postgresql/legacy-conversion-workspaces).\n\nWhat's next\n-----------\n\nYou can now work with your conversion workspace to fix conversion issues,\nmodify your objects with the interactive editor, and apply converted schema\nto your destination database. See\n[Convert Oracle code and schema to PostgreSQL syntax](/database-migration/docs/oracle-to-postgresql/convert-sql)."]]