AWS
DMS の Full load の前は Truncate はできるが、Delete/Insert はできなさそう。 To indicate how to handle loading the target at full-load startup, specify one of the following values for the TargetTablePrepMode option: DO_NOTHING – Data and me…
事象 DMS CDC のソースである Aurora PostgreSQL でアプリケーション用スキーマで CREATE TABLE を実行しようとすると、 public.awsdms_ddl_audit への権限エラーで失敗する。 ERROR: permission denied for table awsdms_ddl_audit\n Where: SQL statement …
Redshift の特定のイベントをメール通知する設定手順。 Redshift のイベントサブスクリプションから SNS トピックで E メールに通知する設定例。 SNS トピックを作成して通知先メールアドレスを設定後に、Redshift のイベントサブスクリプションを作成して、…
DMS は Amazon Aurora PostgreSQL—Serverless V1 についてはフルロードのソースとしてのみサポートしています。ただし、Amazon Aurora PostgreSQL—Serverless V2 は、フルロード、フルロード + CDC、CDC のみのタスクのソースとして使用することができます。…
前提 2026/3/3 時点(検証結果より) Redshift-managed VPC Endpoint は Cluster subnet group に含まれる subnet からランダムに 1 つの subnet に作成される。 作成する subnet を指定することはできない。 AZ 障害が発生した場合、障害が発生していない A…
CPAN のインストール sudo dnf install -y perl-CPAN # AL2023の場合 ビルドツールとヘッダファイルのインストール sudo dnf groupinstall -y "Development Tools" # AL2023 cpanm のインストール cpan App::cpanminus 環境 $ cat /etc/system-release Amazo…
DMS タスクのモニタリング AWS DMS タスクのモニタリング - AWS データベース移行サービス AWS Database Migration Serviceでの Amazon SNS イベントと通知の使用 - AWS データベース移行サービス
AWS DMS から ソースの Oracle Database に SSL 暗号化通信する場合、以下の設定が必要になる。 ソースの Oracle Database 証明書を作成して、Oracle ウォレットに追加する Oracle Net (listener.ora、sqlnet.ora)の設定変更 リスナーは再起動しなくても、リ…
AWS DMS サーバーレスの制限 - AWS データベース移行サービス> AWS DMS Serverless には以下の制限があります。 変更できるのは、CREATED、STOPPEDまたは FAILED状態の AWS DMS レプリケーション設定のみです。どの設定をどの条件下で変更できるかの詳細につ…
バックアップ (中略)Aurora の自動バックアップは連続的かつ増分的であるため、バックアップ保持期間内の任意の時点にすばやく復元できます。バックアップデータが書き込まれるときに、データベースサービスのパフォーマンスに影響が出たり、中断が発生し…
パラメータ max_concurrency_scaling_cluster を 1 以上に設定する(再起動必要) https://docs.aws.amazon.com/ja_jp/redshift/latest/dg/r_max_concurrency_scaling_clusters.html Concurrency Scaling 使用時間の上限を設定したい場合は使用制限で制限す…
事象 VPC 内に Lambda 関数を作成しようとすると以下のエラーが発生する。 The provided execution role does not have permissions to call CreateNetworkInterface on EC2 原因 Lambda 関数作成時に関数にアタッチした実行ロールに ec2:CreateNetworkInter…
説明 Redshift のクエリの性能情報を取得する bash スクリプト 前提: bash と psql が使えること 使い方: Configuration の情報を設定する 実行方法 bash スクリプトに実行権限を付与する $ chmod u+x ./redshift_query_diag.sh <クエリID> 情報採取する $ .…
Redshift で多段でデータシェアリングした Late Binding View にアクセスすると "ERROR: Remote object depends on external shared object." が発生する 3クラスターでの多段データシェアリングした場合 "ERROR: Remote object depends on external shared …
Redshift でデータベースを跨いだ Late Binding View (LBV) へのアクセスで "ERROR: cross-database reference to xx found while analyzing an LBV on producer." が発生する。 事象 データベースを作成する $ psql -h redshift-cluster-poc-central.******…
CloudWatch Alarm と SNS Topic 作成に必要な IAM ポリシー。 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "cloudwatch:GetMetricData", "cloudwatch:ListMetrics", "cloudwatch:PutMetricAlarm",…
Redshift でユーザー別の接続数を調べるクエリ。分単位のユーザー別の接続数を集計する。 -- psql で実行する場合 \o user_connection_count.csv \pset format unaligned \pset fieldsep '|' \t off WITH RECURSIVE time_series(time_value) AS ( /* Recursi…
Redshift で実行時間が長いクエリの disk spill を確認するクエリサンプル \pset format unaligned \pset fieldsep '|' \t off select any_value(a.username) username, any_value(a.query_type) query_type, any_value(a.generic_query_hash) generic_query…
Redshift で superuser 権限を付与せずに sys_connection_log にアクセスを許可するためには、sys:monitor ロールを付与すればよい ユーザー作成 dev=# create user test_monitor password 'xxx'; CREATE USER dev=# \q 新ユーザーで sys_connection_log に…
Multi-AZ 構成の Redshift で Classic resize をしたメモ The resize for Amazon Redshift cluster 'rs-ra3-large-maz' completed at 2025-12-11 02:16 UTC, and the cluster is available for reads and writes. The resize was initiated at 2025-12-11 02…
SVV_TABLE_INFO の rows - estimated_visible_rows の差が大きいと、VACUUM DELETE の効果が見込める。 列名 データ型 説明 tbl_rows numeric(38,0) テーブル内の合計行数。この値には、削除対象としてマークされ、まだバキューム処理されていない列が含まれ…
Redshift で VACUUM が Scaling Cluster にルーティングされるか検証してみた。 結果としては、Primary でしか実行されない。理由は concurrency_scaling_status = 3(Concurrency Scaling ineligible query - Query is an Unsupported DML)。 シナリオ VAC…
Redshift の SVV_TABLE_INFO.skew_rows の意味 lineorder テーブルの skew_rows は 3.67 =# select * from svv_table_info where schema = 'ssbgz_before' and "table" = 'lineorder'; -[ RECORD 1 ]----------+--------------------------------- database …
Redshift でクエリが Scaling Cluster で実行されなかった理由を調べる STL_QUERY.concurrency_scaling_status でクエリが Scaling Cluster を利用しなかった理由を確認できる(数値) STL_QUERY - Amazon Redshift 数値 の意味は SVL_QUERY_CONCURRENCY_SCA…
Begin-End でトランザクションスコープに囲んだクエリが Redshift の Scaling Cluster にルーティングされるか検証してみた。 検証結果 Begin-End でトランザクションスコープを囲んだ DELETE/INSERT のみを実行している状態で、スケーリングクラスターでク…
自動ワークロード管理 (WLM) では、Amazon Redshift がクエリの同時実行数とメモリの割り当てを管理します。サービスクラスの識別子 100〜107 を使用して、最大 8 つのキューを作成できます。各キューには優先度があります。 自動 WLM の実装 - Amazon Redsh…
When non-supported write statements, such as CREATE without TABLE AS, are included in an explicit transaction before the supported write statements, none of the write statements will run on concurrency-scaling clusters. Concurrency scaling…
By default, only Amazon Redshift database superusers have permission to view all databases. To view data that other users generate in system tables, add the SYSLOG ACCESS parameter with UNRESTRICTED access.Note: Users with SYSLOG ACCESS ca…
Redshift で Datasharing している View に対して、オブジェクトレベルで Grant している場合、Create or Replace すると権限は維持されるが、Drop/Create すると権限が喪失することを確認した。 Producer 側 データ共有を作成する CREATE DATASHARE cnt_dat…
repost.aws