本頁說明如何執行連線設定檔的查看、更新和刪除作業。
查看連線設定檔
您可以查看連線設定檔的下列資訊:
建立設定檔時提供的所有設定詳細資料。詳情請參閱「 連線設定檔總覽」。
連線設定檔的建立時間和上次修改時間。
使用這個連線設定檔的遷移工作清單。
如要查看連線設定檔詳細資料,請執行下列步驟:
控制台
- 在 Google Cloud 控制台中,前往「Connection profiles」頁面。
- 按一下要查看的連線設定檔顯示名稱。
連線設定檔總覽頁面隨即顯示。
gcloud
使用下列任何指令資料之前,請先替換以下項目:
- REGION,其中包含連線設定檔儲存區域的 ID。
- 將 CONNECTION_PROFILE_ID 改為您的連線設定檔 ID。
如果您不知道 ID,可以使用
gcloud database-migration connection-profiles list
指令列出特定區域中的所有設定檔,並查看其 ID。
執行下列指令:
Linux、macOS 或 Cloud Shell
gcloud database-migration connection-profiles \ describe CONNECTION_PROFILE_ID \ --region=REGION
Windows (PowerShell)
gcloud database-migration connection-profiles ` describe CONNECTION_PROFILE_ID ` --region=REGION
Windows (cmd.exe)
gcloud database-migration connection-profiles ^ describe CONNECTION_PROFILE_ID ^ --region=REGION
更新連線設定檔
如要更新連線設定檔,請執行下列步驟:
- 在 Google Cloud 控制台中,前往「Connection profiles」頁面。
- 按一下要修改的連結設定檔顯示名稱。
連線設定檔的總覽頁面隨即顯示。
- 按一下「編輯」,然後更新連線設定檔。
- 按一下 [儲存]。
刪除連線設定檔
只有在沒有使用該設定檔的遷移工作時,才能刪除連線設定檔。如果您想刪除遷移工作正在使用的連線設定檔,請先 刪除連結至該連線設定檔的所有遷移工作。
如要刪除連線設定檔,請執行下列步驟:
控制台
- 在 Google Cloud 控制台中,前往「Connection profiles」頁面。
- 按一下要刪除的連線設定檔顯示名稱。
連線設定檔總覽頁面隨即顯示。
- 點選「刪除」。
- 在對話方塊中按一下「刪除」。
gcloud
這個指令會傳回互動式確認提示,需要您輸入內容才能完成。您可以使用
選用的 --quiet
標記略過確認提示。
使用下列任何指令資料之前,請先替換以下項目:
- REGION,其中包含連線設定檔儲存區域的 ID。
- 將 CONNECTION_PROFILE_ID 改為您的連線設定檔 ID。
如果您不知道 ID,可以使用
gcloud database-migration connection-profiles list
指令列出特定區域中的所有設定檔,並查看其 ID。
執行下列指令:
Linux、macOS 或 Cloud Shell
gcloud database-migration connection-profiles \ delete CONNECTION_PROFILE_ID \ --region=REGION
Windows (PowerShell)
gcloud database-migration connection-profiles ` delete CONNECTION_PROFILE_ID ` --region=REGION
Windows (cmd.exe)
gcloud database-migration connection-profiles ^ delete CONNECTION_PROFILE_ID ^ --region=REGION
delete
會傳回互動式提示,讓您確認操作。輸入 Y
即可移除連線設定檔:
You are about to delete connection_profile [CONNECTION_PROFILE_ID] Do you want to continue (Y/n)?
--quiet
標記略過 Google Cloud CLI 交互式確認提示。