How migrate on SQL database to AWS

  • Can any one tell step by step procedure to How migrate on-premises SQL  server  database to AWS.

  • Backup the database(s)

    move them to an S3 bucket

    restore to your ec2 or Rds instance

     

    ensure you script things like logins, jobs, alerts etc anything that’s server side.

    you can look at dbatools for help in all the scripting of all those objects.

  • AWS RDS doesn't support log shipping, but you can build your own scripts to do it. They have an article on this. Otherwise, what @Ant-Green says.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • And, before you move to RDS, consider this... IIRC, you won't be able to restore a single database in the future.  Instead, you'll need to restore the entire instance.  Actually, it won't be you doing it, either.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Don’t believe that is fully true anymore Jeff remember something similar but AWS now have procedures for backing up an RDS database to S3 so you may restore to another instance.

    exec msdb.dbo.rds_backup_database 
    @source_db_name='database_name', @s3_arn_to_backup_to='arn:aws:s3:::bucket_name/file_name_and_extension',
    @overwrite_S3_backup_file=1;
    exec msdb.dbo.rds_restore_database 
    @restore_db_name='database_name',
    @s3_arn_to_restore_from='arn:aws:s3:::bucket_name/file_name_and_extension';

    Had a client in the past go down this route to push prod into dev/test on RDS.

    https://aws.amazon.com/premiumsupport/knowledge-center/native-backup-rds-sql-server/

    As for anything master database related I believe you still have to restore using the AWS snapshots of the instance though.

  • If you are migrating to an EC2 VM and you have  VPN between your on-prem network and AWS you can do log-shipping and skip the S3 bucket.

    How you do it really depends on the amount of downtime you have available.  When you have a limited amount of downtime log-shipping is my favorite way to do any migration.  Even if you don't have the VPN between on-prem and AWS you can "roll your own" log-shipping by copying up to S3.  I haven't rolled my own log-shipping without the VPN, but there are ways to copy from local to S3 and then from S3 to your EC2 instance and there are software packages that allow you to present S3 buckets as drives to your servers (I have seen reliability issues with both I've seen in use, but for a one-time project they are probably okay).

  • To migrate an on-premises SQL Server database to AWS, first, assess the database and choose a migration method that best suits the needs. Then, create an AWS account and set up the necessary AWS services, such as an RDS instance or EC2 instance. Next, establish connectivity between the on-premises SQL Server and AWS. Prepare the database for migration by updating SQL Server version, configuring for compatibility with AWS, and ensuring backups. Using the chosen migration method, migrate the database to AWS. Verify the migrated database is functioning properly, optimize for AWS by configuring for high availability and security measures, and decommission the on-premises SQL Server.

    Also for the migration process you can use  ShareGate or GS RichCopy 360  as direct migration tools, both are two solutions that can be used to transfer data to AWS storages easily and quickly .

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply