Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Determines SQL Azure Database Edition and Size with EF Code First?

I have a POC solution that uses an ASP.NET MVC 3 to create a web site and Entity Framework 4.3 Code First approach for the data access. I am able to deploy to a hosted service in Azure and my database gets created in SQL Azure based on my connection string. What I don't understand is how the database edition (Web) and size (1GB) were determined. Is this just the default or is it controllable?

I may plan to approach this by setting my database initializer to null when going to production and manage that on my own anyway, but I want to understand the options. Thanks

like image 670
Bryan Avatar asked Nov 14 '22 09:11

Bryan


1 Answers

You can specify edition and max size in the CREATE DATABASE call. If the edition and maxsize parameters are omitted, the default is Web, 1GB. The full CREATE DATABASE call is:

CREATE DATABASE database_name  [ COLLATE collation_name ]
{
   (<edition_options> [, ...n]) 
}

<edition_options> ::= 
{
   (MAXSIZE = {1 | 5 | 10 | 20 | 30 … 150} GB) 
    |(EDITION = {'web' | 'business'})
}

See this MSDN reference page for more details.

like image 102
David Makogon Avatar answered Dec 26 '22 03:12

David Makogon