39

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.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30
cuongle
  • 74,024
  • 28
  • 151
  • 206

5 Answers5

91

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.

gsubiran
  • 2,012
  • 1
  • 22
  • 33
  • 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 Dec 05 '18 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? – Hannes Sachsenhofer Jan 09 '19 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 Jan 09 '19 at 14:07
  • 2
    Thanks for the great answer, MS doc is so difficult to understand. This should be the accepted answer! – star Feb 11 '19 at 22:54
  • much better answer than accepted. The link in accepted answer doesn't describe this. – Jeremiah Cooper Aug 26 '19 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

PH.
  • 378
  • 2
  • 6
Srini Acharya
  • 535
  • 3
  • 4
  • 2
    Is there any downtime during the move? – TWilly Sep 27 '17 at 00: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. – David Spillett Mar 20 '18 at 09:27
  • 2
    the anchor seems to have left the building ...#move-a-database-into-an-elastic-pool – BozoJoe May 26 '18 at 05:34
  • 3
    Please read the answer provided by gsubiran which is much more helpful. – star Feb 11 '19 at 22:54
  • 2
    There is no instruction there how to add an existing database. – Michael Chudinov Jan 27 '20 at 22:24
6

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

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
Everton Oliveira
  • 810
  • 7
  • 15
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
David Buck
  • 3,752
  • 35
  • 31
  • 35
Graeme Hunter
  • 51
  • 1
  • 1
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.

  • 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 https://meta.stackexchange.com/q/8231 – Adrian W Aug 17 '18 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. – LukeChung-FMS Jan 28 '19 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? – LukeChung-FMS Jan 28 '19 at 23:41