How to move Azure SQL DB to Elastic Pool?

Kenny 1 Reputation point
2020-09-20T12:34:04.253+00:00

I have created a Elastic Pool to Azure SQL Server logical Server.

1) I have database in same Logical Server. How to move the DB under Elastic Pool?

2) I also have database in different Logical Server. How to move the DB under Elastic Pool? (Should I restore from back-up?)

3) Is it possible to move database in Elastic Pool to outside Elastic Pool in same Logical Server as Standard tier DB?

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Ronen Ariely 15,096 Reputation points
    2020-09-20T14:52:41.23+00:00

    Good day,

    1) I have database in same Logical Server. How to move the DB under Elastic Pool?

    You can do this in the Portal, Using PowerShell, or as I preferred using simple query

    ALTER DATABASE Your_DB_Name  
        MODIFY ( SERVICE_OBJECTIVE = ELASTIC_POOL ( name = Your_Pool_Name) ) ;   
    

    https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql?view=azuresqldb-current#b-moving-a-database-to-a-different-elastic-pool

    2) I also have database in different Logical Server. How to move the DB under Elastic Pool? (Should I restore from back-up?)

    Copy the database using simple query (execute it in the new server, and check the documentation for more information)...

    CREATE DATABASE Your_New_DB_Name  
      AS COPY OF Server_Name.Your_Original_DB_Name ( SERVICE_OBJECTIVE = 'Basic' );  
    

    https://learn.microsoft.com/en-us/sql/t-sql/statements/create-database-transact-sql?view=azuresqldb-current#creating-a-copy-of-a-database-on-another-server

    3) Is it possible to move database in Elastic Pool to outside Elastic Pool in same Logical Server as Standard tier DB?

    Yes, exactly like we add to a pool we can remove from the pool using the same ALTER command. Simply select a different type like BASIC for example

    ALTER DATABASE Your_New_DB_Name MODIFY (EDITION = 'Standard', MAXSIZE = 250 GB, SERVICE_OBJECTIVE = 'S0');  
    

    Same link as above in question 1

    4 people found this answer helpful.
    0 comments No comments

  2. Balaji G 0 Reputation points
    2023-08-03T15:39:57.2466667+00:00

    Hello, Do we need downtime for this activity, and what if this activity fails? what troubleshooting steps need to be done?


  3. Balaji G 0 Reputation points
    2023-08-03T15:59:05.58+00:00

    How much time it will take to move Azure SQL DB dedicated DTU to elastic pool DTU?

    Is there any downtime while performing this activity?

    0 comments No comments