Azure: How to move databases into Elastic Pool

Via a CLI shell

echo "Creating $database in $pool..."
az sql db create --resource-group $resource --server $server --name $database --elastic-pool $pool

echo "Moving $database to $poolSecondary..." # create command updates an existing datatabase
az sql db create --resource-group $resource --server $server --name $database --elastic-pool $poolSecondary

my answer is not different from gsubiran, I'm just adding some images to make people's life easier.

enter image description here


Fast answer if don't want to read any link, you just want do OP asked:

  1. Go to Elastic Pool
  2. Select Configure (yes, there where you have the options to scale the pool)
  3. Behind the tier specification you have three tabs "Pool settings", "Databases" and "Per database settings". Go to "Databases".
  4. Just add/remove databases in/out of the pool
  5. Don't forget to hit Save to apply all changes you made.

⚠ Take in mind that all databases you want to add to the pool should be in the same Server than the pool.


You can create an elastic pool in the same server as your databases, through portal using instructions here - https://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-pool-create-portal/

Once you have created a pool, you can add existing databases to the pool using instructions here - https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool#manage-an-elastic-pool-and-its-databases

Let us know if you have any further questions here.

-- srini