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 UTL_FILE パッケージ編~

Last updated at Posted at 2023-04-09

概要

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

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

UTL_FILE パッケージについて

Oracle Database ドキュメントにて、UTL_FILE パッケージの機能について次のように記載されている。

PL/SQLプログラムでオペレーティング・システムのテキスト・ファイルの読込みと書込みができます。

引用元:262 UTL_FILE (oracle.com)

利用されるユースケースには次のものがある。

  1. ログ書き込み
  2. ファイル出力
  3. ファイル入力

参考リンク

  • ホワイトペーパー
    • Guide to Migrating from Oracle to SQL Server 2014 and Azure SQL Database

Azure SQL Database への移行

SSMA による変換

Azure SQL Database では、SSMA による変換をサポートしていない。SSMA v9.3 では、UTL_FILE.PUT_LINEが、想定通りに動作しないssma_oracle.utl_file_put_lineに変換される仕様となっているため、変換後にコメントアウト、あるいは、削除を実施する必要がある。

UTL_FILE.PUT後にUTL_FILE.NEW_LINEを実行しているコードはUTL_FILE.PUT_LINEとほぼ同様の動作となるため、UTL_FILE.PUT_LINEとして手動変換を実施する。

UTL_FILE.PUT(out_handle,CONVERT(output,'JA16SJIS'));
UTL_FILE.NEW_LINE(out_handle, 1);

移行方針

Azure Data Factory などのツールを用いたプログラムに移行する。

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?