43

We have a few databases in Pricing Tier: Basic, S0... like below picture:

enter image description here

These databases were created before a new Elastic Pool is created. Now we want to move these databases into Elastic Pool for costing saving. But it seems I don't know how to move them on the Azure portal.

6 Answers 6

101

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.

5
  • 6
    this should be the accepted answer. Going through the 10 page document on MS site is just a waste of time... if you only want to move DB to a pool.
    – avs099
    Commented Dec 5, 2018 at 18:44
  • 2
    This option is not available for me (database can not be selected). Maybe this is only available if the database is on the same server? Commented Jan 9, 2019 at 12:10
  • 1
    mmm that make sense for me, I will update the warning on the answer. Should be the same Server instead of same Resource Group. If both are in the same server necessarily are in the same RG too.
    – gsubiran
    Commented Jan 9, 2019 at 14:07
  • 2
    Thanks for the great answer, MS doc is so difficult to understand. This should be the accepted answer!
    – star
    Commented Feb 11, 2019 at 22:54
  • much better answer than accepted. The link in accepted answer doesn't describe this. Commented Aug 26, 2019 at 15:54
20

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://learn.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

5
  • 2
    Is there any downtime during the move?
    – TWilly
    Commented Sep 27, 2017 at 0:54
  • @TWilly: I believe (based on my own observations and guesswork, so take this with a pinch of salt) that moving a DB into a pool operates the same as moving between service tiers generally, so there will be a short blip at the end of the process where existing connections are dropped (I've observed this) and new connections may fail. Changing per-database settings in the pool does not have this effect. I've not observed changing pool-level changes but I suspect there will be a blip in the final stage (similar to a single database move) for all those in the pool. Commented Mar 20, 2018 at 9:27
  • 2
    the anchor seems to have left the building ...#move-a-database-into-an-elastic-pool
    – BozoJoe
    Commented May 26, 2018 at 5:34
  • 3
    Please read the answer provided by gsubiran which is much more helpful.
    – star
    Commented Feb 11, 2019 at 22:54
  • 2
    There is no instruction there how to add an existing database. Commented Jan 27, 2020 at 22:24
7

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

enter image description here

5

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
2

I found the Microsoft page to be unclear on the actual steps of moving existing Azure SQL Databases to the Elastic Pool.

I wrote this paper to explain the steps, how to assign existing databases to the pool (from the Elastic Pool side), and preserve the existing SQL Server connection strings. That's critical to avoid recoding and testing all the applications that may be dependent on the databases that are moved.

http://fmsinc.com/microsoft-azure/sql-server/pooled/index.htm

Note that the pool only applies to one server, so you can't combine databases from multiple servers into one Elastic Pool account.

Hope this helps.

3
  • This is an almost "link-only" answer. While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. See meta.stackexchange.com/q/8231
    – Adrian W
    Commented Aug 17, 2018 at 16:08
  • I don't understand your comment. Did you want me to copy sections of my paper into here? There are quite a few issues related to implementing this correctly. I don't see how that would fit in one comment. If you can help me understand what part of my paper I should have copied into this message, I can do so. Thanks. Commented Jan 28, 2019 at 17:05
  • I did but didn't understand how it applied to this situation. Also confused by your use of the word almost. Do you want me to copy the info from the page I referenced to here? Commented Jan 28, 2019 at 23:41
0

I could not find the way to move non-elastic pool dbs to an elastic pool db instance. alternatively , I took the backup and 'export data-tier application' and restored that onto elastic pool as 'import data-tier applicaiton' then configured that db under elastic pool to be listed as elastic pool

so complicated Microsoft made it, in reality it should be allowing to switch add any db in Azure to add to elastic pool.

rember I needed the down time for the db to perform this move. kind of migrating the db from one server to another server involves all those tast similar to database migration.

Not the answer you're looking for? Browse other questions tagged or ask your own question.