16

I'm currently in the middle of developing an application loosely similar to StackOverflow (question / answer based)

Initially, I was using AWS (simple db and s3) for storage, however that posed several problems, and i've opted to go with SQL - With a view to eventually hosting on SQL Azure.

I was just wondering, if i opted for the 1gb database initially, could I increase the size to the 5gb / 10gb databases later on? Or would I have to create a separate new database of this size, and port my data over?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Alex
  • 37,502
  • 51
  • 204
  • 332

4 Answers4

21

See my answer on this other SO question. In a nutshell, you modify db size with T-SQL, such as:

ALTER DATABASE MyDatabase MODIFY (EDITION='WEB', MAXSIZE=5GB)
Community
  • 1
  • 1
David Makogon
  • 69,407
  • 21
  • 141
  • 189
8

You can also change the size of the database through the Azure SQL portal. Simply choose the database and go to the scale tab and select the size you want.

Tada

Dave Gordon
  • 1,815
  • 4
  • 30
  • 52
5

Just wanted to expand on Dave's answer since it is very easy in the management tool:

enter image description here

enter image description here

enter image description here

enter image description here

Tom Halladay
  • 5,651
  • 6
  • 46
  • 65
  • ... it is now, but back in 2010, this feature didn't exist – Alex Apr 09 '14 at 07:47
  • Actually it did in the Old Portal and Via the Database MAnagement portal as well. – Dave Gordon Jun 02 '14 at 12:58
  • I got really stressed out when an error appeared in our logs saying our DB is full. Thank God the solution was this simple! We are paying for a 250 GB database, why would it default be set to 10 GB? – mathkid91 Oct 05 '16 at 12:50
1

If you're working with SQL Azure Pools than you can execute the follow from the master

ALTER DATABASE database_name
MODIFY (MAXSIZE = x GB)

The key difference being the omission of the 'Edition` parameter. There are certain size restrictions though, which can be found here.

pim
  • 12,019
  • 6
  • 66
  • 69