Skip to content

Commit

Permalink
Merge pull request MicrosoftDocs#2812 from CarlRabeler/st
Browse files Browse the repository at this point in the history
jan et al
  • Loading branch information
v-thepet authored Dec 13, 2016
2 parents c2c50a8 + 145cdc5 commit a386270
Show file tree
Hide file tree
Showing 71 changed files with 295 additions and 313 deletions.
2 changes: 1 addition & 1 deletion articles/sql-database/sql-database-automated-backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GUIDELINES for the H1
To help people understand this is a learning topic and not an action topic, start the title with "Learn about ... "
Heading must use an industry standard term. If your feature is a proprietary name like "Elastic database pools", use a synonym. For example: "Learn about elastic database pools for multi-tenant databases". In this case multi-tenant database is the industry-standard term that will be an anchor for finding the topic.
Heading must use an industry standard term. If your feature is a proprietary name like "elastic pools", use a synonym. For example: "Learn about elastic pools for multi-tenant databases". In this case multi-tenant database is the industry-standard term that will be an anchor for finding the topic.
GUIDELINES for introduction
Expand Down
2 changes: 1 addition & 1 deletion articles/sql-database/sql-database-benchmark-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ The Azure SQL Database Benchmark measures the relative performance of Azure SQL

[Service tiers and performance levels](sql-database-service-tiers.md)

[Performance guidance for single databases](sql-database-performance-guidance.md)
[Performance guidance for standalone databases](sql-database-performance-guidance.md)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ms.author: carlrab
---
# Build Multi-tenant Apps with Azure SQL Database With Isolation and Efficiency
## Leverage elastic pools and build more efficient multi-tenant apps
If you're a SaaS dev writing a multi-tenant app and handling many customers, you often make tradeoffs in customer performance, management, and security. With Azure SQL Database Elastic Database Pools, you no longer have to make that compromise. These pools help you manage and monitor multi-tenant apps and gain isolation benefits of one-customer-per-database. See [Design Patterns for Multi-tenant SaaS Applications with Azure SQL Database](sql-database-design-patterns-multi-tenancy-saas-applications.md).
If you're a SaaS dev writing a multi-tenant app and handling many customers, you often make tradeoffs in customer performance, management, and security. With Azure SQL Database elastic pools, you no longer have to make that compromise. These pools help you manage and monitor multi-tenant apps and gain isolation benefits of one-customer-per-database. See [Design Patterns for Multi-tenant SaaS Applications with Azure SQL Database](sql-database-design-patterns-multi-tenancy-saas-applications.md).

![build-multi-tenant-apps](./media/sql-database-build-multi-tenant-apps/sql-database-build-multi-tenant-apps.png)

Expand Down
2 changes: 1 addition & 1 deletion articles/sql-database/sql-database-copy-portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Open the SQL database page for the database you want to copy:
![SQL Database](./media/sql-database-copy-portal/sql-database-copy.png)
4. On the **Copy** page, a default database name is provided. Type a different name if you want (all databases on a server must have unique names).
5. Select a **Target server**. The target server is where the database copy is created. You can copy the database to the same server, or a different server. You can create a server or select an existing server from the list.
6. After selecting the **Target server**, the **Elastic database pool**, and **Pricing tier** options will be enabled. If the server has a pool, you can copy the database into it.
6. After selecting the **Target server**, the **elastic pool**, and **Pricing tier** options will be enabled. If the server has a pool, you can copy the database into it.
7. Click **OK** to start the copy process.

![SQL Database](./media/sql-database-copy-portal/copy-page.png)
Expand Down
6 changes: 3 additions & 3 deletions articles/sql-database/sql-database-copy-powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ms.tgt_pltfrm: NA
>
>
This article shows how to copy a SQL database with PowerShell to the same server, to a different server, or copy a database into an [elastic database pool](sql-database-elastic-pool.md). The database copy operation uses the [New-AzureRmSqlDatabaseCopy](https://msdn.microsoft.com/library/mt603644\(v=azure.300\).aspx) cmdlet.
This article shows how to copy a SQL database with PowerShell to the same server, to a different server, or copy a database into an [elastic pool](sql-database-elastic-pool.md). The database copy operation uses the [New-AzureRmSqlDatabaseCopy](https://msdn.microsoft.com/library/mt603644\(v=azure.300\).aspx) cmdlet.

To complete this article, you need the following:

Expand All @@ -52,7 +52,7 @@ To create the copy on a different server, include the `-CopyServerName` paramete
New-AzureRmSqlDatabaseCopy -ResourceGroupName "resourcegroup1" -ServerName "server1" -DatabaseName "database1" -CopyServerName "server2" -CopyDatabaseName "database1_copy"


## Copy a SQL database into an elastic database pool
## Copy a SQL database into an elastic pool
To create a copy of a SQL database in a pool, set the `-ElasticPoolName` parameter to an existing pool.

New-AzureRmSqlDatabaseCopy -ResourceGroupName "resourcegoup1" -ServerName "server1" -DatabaseName "database1" -CopyResourceGroupName "poolResourceGroup" -CopyServerName "poolServer1" -CopyDatabaseName "database1_copy" -ElasticPoolName "poolName"
Expand Down Expand Up @@ -91,7 +91,7 @@ The following script assumes all resource groups, servers, and the pool already
# -------------------------------------
New-AzureRmSqlDatabaseCopy -ResourceGroupName $sourceDbResourceGroupName -ServerName $sourceDbServerName -DatabaseName $sourceDbName -CopyResourceGroupName $copyDbResourceGroupName -CopyServerName $copyDbServerName -CopyDatabaseName $copyDbName

# Copy a database into an elastic database pool
# Copy a database into an elastic pool
# ---------------------------------------------
$poolName = "pool1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ In Figure 2, the Y axis shows the level of tenant isolation. The X axis shows th

Figure 2: Popular multitenant data models

The lower-right quadrant in Figure 2 shows an application pattern that uses a potentially large, shared single database, and the shared table (or separate schema) approach. It's good for resource sharing because all tenants use the same database resources (CPU, memory, input/output) in a single database. But tenant isolation is limited. You might need to take additional steps to protect tenants from each other at the application layer. These additional steps can significantly increase the DevOps cost of developing and managing the application. Scalability is limited by the scale of the hardware that hosts the database.
The lower-right quadrant in Figure 2 shows an application pattern that uses a potentially large, shared standalone database, and the shared table (or separate schema) approach. It's good for resource sharing because all tenants use the same database resources (CPU, memory, input/output) in a single database. But tenant isolation is limited. You might need to take additional steps to protect tenants from each other at the application layer. These additional steps can significantly increase the DevOps cost of developing and managing the application. Scalability is limited by the scale of the hardware that hosts the database.

The lower-left quadrant in Figure 2 illustrates multiple tenants sharded across multiple databases (typically, different hardware scale units). Each database hosts a subset of tenants, which addresses the scalability concern of other patterns. If more capacity is required for more tenants, you can easily place the tenants on new databases allocated to new hardware scale units. However, the amount of resource sharing is reduced. Only tenants placed on the same scale units share resources. This approach provides little improvement to tenant isolation because many tenants are still collocated without being automatically protected from each other’s actions. Application complexity remains high.

Expand Down Expand Up @@ -121,7 +121,7 @@ Elastic pools in SQL Database combine tenant isolation with resource sharing amo
| [Elastic database client library](sql-database-elastic-database-client-library.md): Manage data distributions and map tenants to databases. | |

## Shared models
As described earlier, for most SaaS providers, a shared model approach might pose problems with tenant isolation issues and complexities with application development and maintenance. However, for multitenant applications that provide a service directly to consumers, tenant isolation requirements may not be as high a priority as minimizing cost. They might be able to pack tenants in one or more databases at a high density to reduce costs. Shared-database models using a single database or multiple sharded databases might result in additional efficiencies in resource sharing and overall cost. Azure SQL Database provides some features that help customers build isolation for improved security and management at scale in the data tier.
As described earlier, for most SaaS providers, a shared model approach might pose problems with tenant isolation issues and complexities with application development and maintenance. However, for multitenant applications that provide a service directly to consumers, tenant isolation requirements may not be as high a priority as minimizing cost. They might be able to pack tenants in one or more databases at a high density to reduce costs. Shared-database models using a standalone database or multiple sharded databases might result in additional efficiencies in resource sharing and overall cost. Azure SQL Database provides some features that help customers build isolation for improved security and management at scale in the data tier.

| Application requirements | SQL database capabilities |
| --- | --- |
Expand Down
8 changes: 4 additions & 4 deletions articles/sql-database/sql-database-develop-error-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ The following errors are related to creating and using Elastics Pools.

Related topics:

* [Create an elastic database pool (C#)](sql-database-elastic-pool-create-csharp.md)
* [Manage an elastic database pool (C#)](sql-database-elastic-pool-manage-csharp.md).
* [Create an elastic database pool (PowerShell)](sql-database-elastic-pool-create-powershell.md)
* [Monitor and manage an elastic database pool (PowerShell)](sql-database-elastic-pool-manage-powershell.md).
* [Create an elastic pool (C#)](sql-database-elastic-pool-create-csharp.md)
* [Manage an elastic pool (C#)](sql-database-elastic-pool-manage-csharp.md).
* [Create an elastic pool (PowerShell)](sql-database-elastic-pool-create-powershell.md)
* [Monitor and manage an elastic pool (PowerShell)](sql-database-elastic-pool-manage-powershell.md).

## General errors
The following errors do not fall into any previous categories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ For a single-tenant model, create a **list mapping** shard map. The single-tenan

![List mapping][1]

The multi-tenant model assigns several tenants to a single database (and you can distribute groups of tenants across multiple databases). Use this model when you expect each tenant to have small data needs. In this model, we assign a range of tenants to a database using **range mapping**.
The multi-tenant model assigns several tenants to a standalone database (and you can distribute groups of tenants across multiple databases). Use this model when you expect each tenant to have small data needs. In this model, we assign a range of tenants to a database using **range mapping**.

![Range mapping][2]

Or you can implement a multi-tenant database model using a *list mapping* to assign multiple tenants to a single database. For example, DB1 is used to store information about tenant id 1 and 5, and DB2 stores data for tenant 7 and tenant 10.
Or you can implement a multi-tenant database model using a *list mapping* to assign multiple tenants to a standalone database. For example, DB1 is used to store information about tenant id 1 and 5, and DB2 stores data for tenant 7 and tenant 10.

![Muliple tenants on single DB][3]

Expand All @@ -97,7 +97,7 @@ Note that to utilize this mapping pattern, tenant id values needs to be continuo
-RangeShardMapName 'RangeShardMap'
-ShardMapManager $ShardMapManager

### Option 3: List mappings on a single database
### Option 3: List mappings on a standalone database
Setting up this pattern also requires creation of a list map as shown in step 2, option 1.

## Step 3: Prepare individual shards
Expand Down Expand Up @@ -137,7 +137,7 @@ Add the range mappings for all the tenant id range – database associations:
-SqlDatabaseName '<shard_database_name>'


### Step 4 option 3: map the data for multiple tenants on a single database
### Step 4 option 3: map the data for multiple tenants on a standalone database
For each tenant, run the Add-ListMapping (option 1, above).

## Checking the mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ ms.author: ddove
>
>
**Elastic Database jobs** simplify management of groups of databases by executing administrative operations such as schema changes, credentials management, reference data updates, performance data collection or tenant (customer) telemetry collection. Elastic Database jobs is currently available through the Azure portal and PowerShell cmdlets. However, the Azure portal surfaces reduced functionality limited to execution across all databases in an [Elastic Database pool (preview)](sql-database-elastic-pool.md). To access additional features and execution of scripts across a group of databases including a custom-defined collection or a shard set (created using [Elastic Database client library](sql-database-elastic-scale-introduction.md)), see [Creating and managing jobs using PowerShell](sql-database-elastic-jobs-powershell.md). For more information about jobs, see [Elastic Database jobs overview](sql-database-elastic-jobs-overview.md).
**Elastic Database jobs** simplify management of groups of databases by executing administrative operations such as schema changes, credentials management, reference data updates, performance data collection or tenant (customer) telemetry collection. Elastic Database jobs is currently available through the Azure portal and PowerShell cmdlets. However, the Azure portal surfaces reduced functionality limited to execution across all databases in an [elastic pool (preview)](sql-database-elastic-pool.md). To access additional features and execution of scripts across a group of databases including a custom-defined collection or a shard set (created using [Elastic Database client library](sql-database-elastic-scale-introduction.md)), see [Creating and managing jobs using PowerShell](sql-database-elastic-jobs-powershell.md). For more information about jobs, see [Elastic Database jobs overview](sql-database-elastic-jobs-overview.md).

## Prerequisites
* An Azure subscription. For a free trial, see [Free one-month trial](https://azure.microsoft.com/pricing/free-trial/).
* An elastic database pool. See [About Elastic database pools](sql-database-elastic-pool.md)
* An elastic pool. See [About elastic pools](sql-database-elastic-pool.md)
* Installation of elastic database job service components. See [Installing the elastic database job service](sql-database-elastic-jobs-service-installation.md).

## Creating jobs
Expand Down Expand Up @@ -86,7 +86,7 @@ This script then updates the table created previously.
## Checking job status
After a job has begun, you can check on its progress.

1. From the elastic database pool page, click **Manage jobs**.
1. From the elastic pool page, click **Manage jobs**.

![Click "Manage jobs"][2]
2. Click on the name (a) of a job. The **STATUS** can be "Completed" or "Failed." The job's details appear (b) with its date and time of creation and running. The list (c) below the that shows the progress of the script against each database in the pool, giving its date and time details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ To trigger job deletion, use the **Remove-AzureSqlJob** cmdlet and set the **Job
Remove-AzureSqlJob -JobName $jobName

## Create a custom database target
Custom database targets can be defined in Elastic Database jobs which can be used either for execution directly or for inclusion within a custom database group. Since **Elastic Database pools** are not yet directly supported via the PowerShell APIs, you simply create a custom database target and custom database collection target which encompasses all the databases in the pool.
Custom database targets can be defined in Elastic Database jobs which can be used either for execution directly or for inclusion within a custom database group. Since **elastic pools** are not yet directly supported via the PowerShell APIs, you simply create a custom database target and custom database collection target which encompasses all the databases in the pool.

Set the following variables to reflect the desired database information:

Expand Down
4 changes: 2 additions & 2 deletions articles/sql-database/sql-database-elastic-jobs-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ms.author: ddove
To manage scaled-out sharded databases, the **Elastic Database jobs** feature (preview) enables you to reliably execute a Transact-SQL (T-SQL) script across a group of databases, including:

* a custom-defined collection of databases (explained below)
* all databases in an [Elastic Database pool](sql-database-elastic-pool.md)
* all databases in an [elastic pool](sql-database-elastic-pool.md)
* a shard set (created using [Elastic Database client library](sql-database-elastic-database-client-library.md)).

## Documentation
Expand Down Expand Up @@ -70,7 +70,7 @@ Define custom groups of Azure SQL Databases, and define schedules for running a

## Elastic Database jobs: end-to-end
1. Install the **Elastic Database jobs** components. For more information, see [Installing Elastic Database jobs](sql-database-elastic-jobs-service-installation.md). If the installation fails, see [how to uninstall](sql-database-elastic-jobs-uninstall.md).
2. Use the PowerShell APIs to access more functionality, for example creating custom-defined database collections, adding schedules and/or gathering results sets. Use the portal for simple installation and creation/monitoring of jobs limited to execution against a **Elastic Database pool**.
2. Use the PowerShell APIs to access more functionality, for example creating custom-defined database collections, adding schedules and/or gathering results sets. Use the portal for simple installation and creation/monitoring of jobs limited to execution against a **elastic pool**.
3. Create encrypted credentials for job execution and [add the user (or role) to each database in the group](sql-database-security.md).
4. Create an idempotent T-SQL script that can be run against every database in the group.
5. Follow these steps to create jobs using the Azure portal: [Creating and managing Elastic Database jobs](sql-database-elastic-jobs-create-and-manage.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ To trigger job deletion, use the [**Remove-AzureSqlJob cmdlet**](https://msdn.mi
Remove-AzureSqlJob -JobName $jobName

## To create a custom database target
You can define custom database targets either for direct execution or for inclusion within a custom database group. For example, because **Elastic Database pools** are not yet directly supported using PowerShell APIs, you can create a custom database target and custom database collection target which encompasses all the databases in the pool.
You can define custom database targets either for direct execution or for inclusion within a custom database group. For example, because **elastic pools** are not yet directly supported using PowerShell APIs, you can create a custom database target and custom database collection target which encompasses all the databases in the pool.

Set the following variables to reflect the desired database information:

Expand Down
Loading

0 comments on commit a386270

Please sign in to comment.