1
2

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 5 years have passed since last update.

SQLServerの移行作業

Posted at

SQLServerの移行手順

メモ

たまに使うのでメモとして残しておく
RDS間の移行作業を実施する時に使用
詳細はこちらのAWSドキュメントを参照
Endpointに関してはR53を使用するとか何か対応を考えておくこと
※入替えorDNS

作業の流れ

  1. 旧RDSからDBのExport
  2. 新RDSの起動
  3. 新RDSへDBのImport

作業詳細

  • 1 旧RDSからDBのExport
## データのExport
exec msdb.dbo.rds_backup_database
        @source_db_name='DB名',
        @s3_arn_to_backup_to='arn:aws:s3:::バケット名/バックアップファイル名.bak',
        @overwrite_S3_backup_file=1;

## 進捗状況の確認
exec msdb.dbo.rds_task_status @db_name='DB名'
  • 2 新RDSの起動
    AWS Consoleから起動

  • 3 新RDSへDBのImport

## データのImport
exec msdb.dbo.rds_restore_database
        @restore_db_name='DB名',
        @s3_arn_to_restore_from='arn:aws:s3:::バケット名/バックアップファイル名.bak',

## 進捗状況の確認
exec msdb.dbo.rds_task_status @db_name='DB名'
1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?