Is it possible to set the Microsoft Azure SQL Database service tiers when creating a new database from Visual Studio in C#? Currently, I can connect to the Azure SQL server and create table with no problem but for some reason (maybe Microsoft Default) the databases will be created in Web which is the service tier that going to be retired. I would like to set the default service tiers to either be Basic, Standard, or Premium depends on the needs.
What I found so far is when I call this method Database.Initialize(true) <--EF http://msdn.microsoft.com/en-us/library/system.data.entity.database.initialize(v=vs.113).aspx It would create the database and set it to Web service tier.
The General Purpose service tier is a default service tier in Azure SQL Database and Azure SQL Managed Instance that is designed for most of generic workloads. If you need a fully managed database engine with a default SLA and storage latency between 5 and 10 ms, the General Purpose tier is the option for you.
Fast geo-recovery - When active geo-replication is configured, the Business Critical tier has a guaranteed Recovery Point Objective (RPO) of 5 seconds and Recovery Time Objective (RTO) of 30 seconds for 100% of deployed hours.
With Azure SQL v12 you have the option to specify the SKU. Example:
var dbCreationCmd = $"CREATE DATABASE [{databaseName}] (MAXSIZE={maxSize}," +
$"EDITION='{edition}'," +
$"SERVICE_OBJECTIVE='{serviceObjective}')";
// With Azure SQL db V12, database creation TSQL became a sync process.
// So we need a 10 minutes command timeout
ExecuteNonQuery(connectionString, dbCreationCmd, commandTimeout: 600);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With