Beruflich Dokumente
Kultur Dokumente
Database
With an elastic pool, you determine the amount of resources that the elastic pool requires to handle
the workload of its databases, and the amount of resources for each pooled database.
Cmdlet Description
New-AzSqlElasticPool Creates an elastic pool.
Get-AzSqlElasticPool Gets elastic pools and their property values.
Modifies properties of an elastic pool For example, use the
Set-AzSqlElasticPool
StorageMB property to modify the max storage of an elastic pool.
Remove-AzSqlElasticPool Deletes an elastic pool.
Get-AzSqlElasticPoolActivity Gets the status of operations on an elastic pool
New-AzSqlDatabase Creates a new database in an existing pool or as a single database.
Get-AzSqlDatabase Gets one or more databases.
Sets properties for a database, or moves an existing database into,
Set-AzSqlDatabase
out of, or between elastic pools.
Remove-AzSqlDatabase Removes a database.
Tip
Creation of many databases in an elastic pool can take time when done using the portal or
PowerShell cmdlets that create only a single database at a time. To automate creation into an elastic
pool, see CreateOrUpdateElasticPoolAndPopulate.
Azure CLI: Manage elastic pools and pooled databases
To create and manage SQL Database elastic pools with the Azure CLI, use the following Azure CLI
SQL Database commands. Use the Cloud Shell to run the CLI in your browser, or install it on
macOS, Linux, or Windows.
Tip
For Azure CLI example scripts, see Use CLI to move an Azure SQL database in a SQL elastic pool
and Use Azure CLI to scale a SQL elastic pool in Azure SQL Database.
Cmdlet Description
az sql elastic-pool
Creates an elastic pool.
create
az sql elastic-pool
Returns a list of elastic pools in a server.
list
az sql elastic-pool
Returns a list of databases in an elastic pool.
list-dbs
Also includes available pool DTU settings, storage limits, and per database
az sql elastic-pool
settings. In order to reduce verbosity, additional storage limits and per database
list-editions
settings are hidden by default.
az sql elastic-pool
Updates an elastic pool.
update
az sql elastic-pool
Deletes the elastic pool.
delete
Command Description
CREATE DATABASE Creates a new database in an existing pool or as a single database. You
(Azure SQL Database) must be connected to the master database to create a new database.
ALTER DATABASE Move a database into, out of, or between elastic pools.
Command Description
(Azure SQL Database)
DROP DATABASE
Deletes a database.
(Transact-SQL)
Returns resource usage statistics for all the elastic pools in a SQL Database
sys.elastic_pool_resou server. For each elastic pool, there is one row for each 15 second reporting
rce_stats (Azure SQL window (four rows per minute). This includes CPU, IO, Log, storage
Database) consumption and concurrent request/session utilization by all databases in
the pool.
Returns the edition (service tier), service objective (pricing tier), and elastic
sys.database_service_ pool name, if any, for an Azure SQL database or an Azure SQL Data
objectives (Azure SQL Warehouse. If logged on to the master database in an Azure SQL Database
Database) server, returns information on all databases. For Azure SQL Data
Warehouse, you must be connected to the master database.
Command Description
Elastic pools - Create or update Creates a new elastic pool or updates an existing elastic pool.
Elastic pools - Delete Deletes the elastic pool.
Elastic pools - Get Gets an elastic pool.
Elastic pools - List by server Returns a list of elastic pools in a server.
Elastic pools - Update Updates an existing elastic pool.
Elastic pool activities Returns elastic pool activities.
Elastic pool database activities Returns activity on databases inside of an elastic pool.
Databases - Create or update Creates a new database or updates an existing database.
Databases - Get Gets a database.
Databases - List by elastic pool Returns a list of databases in an elastic pool.
Databases - List by server Returns a list of databases in a server.
Databases - Update Updates an existing database.
Next steps
• For a video, see Microsoft Virtual Academy video course on Azure SQL Database elastic
capabilities
• To learn more about design patterns for SaaS applications using elastic pools, see Design
Patterns for Multi-tenant SaaS Applications with Azure SQL Database.
• For a SaaS tutorial using elastic pools, see Introduction to the Wingtip SaaS application.