0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SQL Server Migration Assistant for Oracle による Oracle Database から Azure SQL Database への移行検証~Oracle シノニム編~

Last updated at Posted at 2023-04-09

概要

本記事の位置付けについて

Oracle Database から Azure SQL Database へ SQL Server Migration Assistant for Oracle (SSMA)によるプログラム移行検証結果の一部である。次の記事にて個別機能別記事へのリンクを整理している。

シノニムについて

シノニムについて、Oracle Database ドキュメントにて、次のように記載されている。

スキーマ・オブジェクトの別名です。

引用元:24.3.1 シノニムについて (oracle.com)

参考リンク

  • ホワイトペーパー
    • Oracle to SQL Server Migration Handbook v 2.0

Azure SQL Database への移行

SSMA による変換

シノニムの変換仕様について、Oracle to SQL Server Migration Handbook v 2.0にて次のように記載されている。

SSMA could handle Synonyms while migration.
• Oracle private synonyms are converted to SQL Server synonyms stored in the target database.
• SSMA converts public synonyms to synonyms defined in the ssma_oracle schema.

引用元: Oracle to SQL Server Migration Handbook v 2.0

SSMA は、移行中にシノニムを処理できます。
• Oracle のプライベート シノニムは、ターゲット データベースに格納されている SQL Server シノニムに変換されます。
• SSMA は、パブリック シノニムを ssma_oracle スキーマで定義されたシノニムに変換します。

上記の翻訳

移行方針

SSMA による自動変換されたプログラムを利用する。

変換例

変換例 1 プライベートシノニムの設定

Oracle Database のコード
CREATE SYNONYM syn_pri_001 FOR HR.DEPARTMENTS;
Azure SQL Database への変換
CREATE SYNONYM SSMA.SYN_PRI_001 FOR [ssma-test ].HR.DEPARTMENTS
GO

変換例 2 プライベートシノニムの利用

Oracle Database のコード
SELECT * FROM SYN_PRI_001;
Azure SQL Database への変換
SELECT SYN_PRI_001.DEPARTMENT_ID, SYN_PRI_001.DEPARTMENT_NAME, SYN_PRI_001.MANAGER_ID, SYN_PRI_001.LOCATION_ID
FROM SSMA.SYN_PRI_001
GO
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?