You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azure-sql/database/elastic-pool-manage.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,4 +113,4 @@ To create and manage SQL Database elastic pools and pooled databases, use these
113
113
114
114
## Related content
115
115
116
-
- To learn more about design patterns for SaaS applications using elastic pools, see [Design Patterns for Multi-tenant SaaS Applications with Azure SQL Database](saas-tenancy-app-design-patterns.md).
116
+
- To learn more about design patterns for SaaS applications using elastic pools, see [Design Patterns for multitenant SaaS Applications with Azure SQL Database](saas-tenancy-app-design-patterns.md).
Copy file name to clipboardExpand all lines: azure-sql/database/elastic-scale-shard-map-management.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ For a single-tenant model, create a **list-mapping** shard map. The single-tenan
39
39
40
40
:::image type="content" source="media/elastic-scale-shard-map-management/listmapping.png" alt-text="Diagram of List mapping.":::
41
41
42
-
The multi-tenant model assigns several tenants to an individual 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, assign a range of tenants to a database using **range mapping**.
42
+
The multitenant model assigns several tenants to an individual 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, assign a range of tenants to a database using **range mapping**.
43
43
44
44
:::image type="content" source="media/elastic-scale-shard-map-management/rangemapping.png" alt-text="Diagram of Range mapping.":::
45
45
46
-
Or you can implement a multi-tenant database model using a *list mapping* to assign multiple tenants to an individual 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.
46
+
Or you can implement a multitenant database model using a *list mapping* to assign multiple tenants to an individual 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.
47
47
48
48
:::image type="content" source="media/elastic-scale-shard-map-management/multipleonsingledb.png" alt-text="Diagram of Multiple tenants on single DB.":::
Copy file name to clipboardExpand all lines: azure-sql/database/saas-tenancy-app-design-patterns.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ The vendor can access all the databases in all the standalone app instances, eve
80
80
81
81
This next pattern uses a multitenant application with many databases, all being single-tenant databases. A new database is provisioned for each new tenant. The application tier is scaled *up* vertically by adding more resources per node. Or the app is scaled *out* horizontally by adding more nodes. The scaling is based on workload, and is independent of the number or scale of the individual databases.
82
82
83
-
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-database-per-tenant.png" alt-text="Diagram of the design of a multi-tenant app with database-per-tenant.":::
83
+
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-database-per-tenant.png" alt-text="Diagram of the design of a multitenant app with database-per-tenant.":::
84
84
85
85
### Customize for a tenant
86
86
@@ -92,7 +92,7 @@ With database-per-tenant, customizing the schema for one or more individual tena
92
92
93
93
When databases are deployed in the same resource group, they can be grouped into elastic pools. The pools provide a cost-effective way of sharing resources across many databases. This pool option is cheaper than requiring each database to be large enough to accommodate the usage peaks that it experiences. Even though pooled databases share access to resources they can still achieve a high degree of performance isolation.
94
94
95
-
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-database-per-tenant-pool.png" alt-text="Diagram of the design of multi-tenant app with database-per-tenant, using elastic pool.":::
95
+
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-database-per-tenant-pool.png" alt-text="Diagram of the design of multitenant app with database-per-tenant, using elastic pool.":::
96
96
97
97
Azure SQL Database provides the tools necessary to configure, monitor, and manage the sharing. Both pool-level and database-level performance metrics are available in the Azure portal, and through Azure Monitor logs. The metrics can give great insights into both aggregate and tenant-specific performance. Individual databases can be moved between pools to provide reserved resources to a specific tenant. These tools enable you to ensure good performance in a cost effective manner.
98
98
@@ -141,7 +141,7 @@ Management operations that are focused on individual tenants are more complex to
141
141
142
142
Most SaaS applications access the data of only one tenant at a time. This access pattern allows tenant data to be distributed across multiple databases or shards, where all the data for any one tenant is contained in one shard. Combined with a multitenant database pattern, a sharded model allows almost limitless scale.
143
143
144
-
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-sharded-multi-tenant-databases.png" alt-text="Diagram of the design of a multi-tenant app with sharded multi-tenant databases.":::
144
+
:::image type="content" source="media/saas-tenancy-app-design-patterns/saas-multi-tenant-app-sharded-multi-tenant-databases.png" alt-text="Diagram of the design of a multitenant app with sharded multitenant databases.":::
The database object name is referred to as its identifier. Everything in [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] can have an identifier. Servers, databases, and database objects, such as tables, views, columns, indexes, triggers, procedures, constraints, and rules, can have identifiers. Identifiers are required for most objects, but are optional for some objects such as constraints.
29
+
The database object name is referred to as its identifier.
30
30
31
-
An object identifier is created when the object is defined. The identifier is then used to reference the object. For example, the following statement creates a table with the identifier `TableX`, and two columns with the identifiers `KeyCol` and `Description`:
31
+
Servers, databases, and database objects, such as tables, views, columns, indexes, triggers, procedures, constraints, and rules, can have identifiers. Most objects require identifiers, but some objects, such as constraints, make them optional.
32
+
33
+
You create an object identifier when you define the object. Use the identifier to reference the object. For example, the following statement creates a table with the identifier `TableX`, and two columns with the identifiers `KeyCol` and `Description`:
32
34
33
35
```sql
34
36
CREATETABLETableX (
@@ -37,9 +39,14 @@ CREATE TABLE TableX (
37
39
);
38
40
```
39
41
40
-
This table also has an unnamed constraint. The `PRIMARY KEY` constraint has no identifier.
42
+
This table also has an unnamed constraint. The primary key constraint has no identifier, and so would be assigned a system-generated name like `PK__TableX__D7CB9CCCEEF0806C`, which you could observe in system metadata views like `sys.key_constraints`.
43
+
44
+
Constraint names and other schema-scoped objects must be unique within a database schema. For example, two primary key constraints can't share a name. However, column names only need to be unique within each table, not within the schema.
45
+
46
+
The collation of an identifier depends on the level at which you define it.
41
47
42
-
The collation of an identifier depends on the level at which it's defined. Identifiers of instance-level objects, such as logins and database names, are assigned the default collation of the instance. Identifiers of objects in a database, such as tables, views, and column names, are assigned the default collation of the database. For example, two tables with names that differ only in case can be created in a database that has case-sensitive collation, but can't be created in a database that has case-insensitive collation.
48
+
- The default collation of the instance is assigned to identifiers of instance-level objects, such as logins and database names.
49
+
- The default collation of the database is assigned to identifiers of objects in a database, such as tables, views, and column names. For example, you can create two tables with names that differ only in case in a database that has case-sensitive collation, but you can't create them in a database that has case-insensitive collation.
43
50
44
51
> [!NOTE]
45
52
> The names of variables, or the parameters of functions and stored procedures must comply with the rules for [!INCLUDE [tsql](../../includes/tsql-md.md)] identifiers.
@@ -101,17 +108,17 @@ Both regular and delimited identifiers must contain from 1 through 128 character
101
108
102
109
## Rules for regular identifiers
103
110
104
-
The names of variables, functions, and stored procedures must comply with the following rules for [!INCLUDE [tsql](../../includes/tsql-md.md)] identifiers.
111
+
The names of variables, functions, and stored procedures must follow these rules for [!INCLUDE [tsql](../../includes/tsql-md.md)] identifiers.
105
112
106
-
1. The first character must be one of the following items:
113
+
1. The first character must be one of the following characters:
107
114
108
115
- A letter as defined by the Unicode Standard 3.2. The Unicode definition of letters includes Latin characters from `a` through `z`, from `A` through `Z`, and also letter characters from other languages.
109
116
110
117
- The underscore (`_`), at sign (`@`), or number sign (`#`).
111
118
112
119
Certain symbols at the beginning of an identifier have special meaning in [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)]. A regular identifier that starts with the at sign always denotes a local variable or parameter and can't be used as the name of any other type of object. An identifier that starts with a number sign denotes a temporary table or procedure. An identifier that starts with double number signs (`##`) denotes a global temporary object. Although the number sign or double number sign characters can be used to begin the names of other types of objects, we don't recommend this practice.
113
120
114
-
Some [!INCLUDE [tsql](../../includes/tsql-md.md)] functions have names that start with double at signs (`@@`). To avoid confusion with these functions, you shouldn't use names that start with `@@`.
121
+
Some [!INCLUDE [tsql](../../includes/tsql-md.md)] functions have names that start with double at signs (`@@`). To avoid confusion with these functions, don't use names that start with `@@`.
115
122
116
123
1. Subsequent characters can include the following list:
117
124
@@ -121,42 +128,26 @@ The names of variables, functions, and stored procedures must comply with the fo
121
128
122
129
- The at sign (`@`), dollar sign (`$`), number sign (`#`), or underscore (`_`).
123
130
124
-
1. The identifier must not be a [!INCLUDE [tsql](../../includes/tsql-md.md)] reserved word. [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] reserves both the uppercase and lowercase versions of reserved words. When identifiers are used in [!INCLUDE [tsql](../../includes/tsql-md.md)] statements, the identifiers that don't comply with these rules must be delimited by double quotation marks or brackets. The words that are reserved depend on the database compatibility level. This level can be set by using the [ALTER DATABASE compatibility level](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md) statement.
131
+
1. The identifier must not be a [!INCLUDE [tsql](../../includes/tsql-md.md)] reserved word. [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] reserves both the uppercase and lowercase versions of reserved words. When you use identifiers in [!INCLUDE [tsql](../../includes/tsql-md.md)] statements, delimit identifiers that don't comply with these rules by using double quotation marks or brackets. The words that are reserved depend on the database compatibility level. Set the database compatibility level by using the [ALTER DATABASE compatibility level](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md) statement.
125
132
126
-
1.Embedded spaces or special characters aren't allowed.
133
+
1.Don't use embedded spaces or special characters.
1.Don't use [Supplementary characters](../collations/collation-and-unicode-support.md#Supplementary_Characters).
129
136
130
-
When identifiers are used in [!INCLUDE [tsql](../../includes/tsql-md.md)] statements, the identifiers that don't comply with these rules must be delimited by double quotation marks or brackets.
137
+
When you use identifiers in [!INCLUDE [tsql](../../includes/tsql-md.md)] statements, delimit identifiers that don't comply with these rules by using double quotation marks or brackets.
131
138
132
-
> [!NOTE]
133
-
> Some rules for the format of regular identifiers depend on the database compatibility level. This level can be set by using [ALTER DATABASE compatibility level](../../t-sql/statements/alter-database-transact-sql-compatibility-level.md).
139
+
Some rules for the format of regular identifiers depend on the database compatibility level.
134
140
135
141
## Catalog collation in Azure SQL Database
136
142
137
-
You can't change or set the logical server collation on Azure SQL Database. However, you can configure each database's collations separately for data in the database and for catalog. The catalog collation determines the collation for system metadata, such as object identifiers. Both collations can be specified independently when you [create the database in the Azure portal](/azure/azure-sql/database/single-database-create-quickstart?view=azuresql&preserve-view=true&tabs=azure-portal#create-a-single-database), in T-SQL with [CREATE DATABASE](../../t-sql/statements/create-database-transact-sql.md?view=azuresqldb-current&preserve-view=true#collation_name), in PowerShell with [New-AzSqlDatabase](/powershell/module/az.sql/new-azsqldatabase).
143
+
You can't change or set the logical server collation on Azure SQL Database. However, you can configure each database's collations separately for data in the database and for catalog. The catalog collation determines the collation for system metadata, such as object identifiers. You can specify both collations independently when you [create the database in the Azure portal](/azure/azure-sql/database/single-database-create-quickstart?view=azuresql&preserve-view=true&tabs=azure-portal#create-a-single-database), in T-SQL with [CREATE DATABASE](../../t-sql/statements/create-database-transact-sql.md?view=azuresqldb-current&preserve-view=true#collation_name), or in PowerShell with [New-AzSqlDatabase](/powershell/module/az.sql/new-azsqldatabase).
138
144
139
145
For details and examples, see [CREATE DATABASE](../../t-sql/statements/create-database-transact-sql.md?view=azuresqldb-current&preserve-view=true#collation_name). Specify a collation for the database (`COLLATE`) and a catalog collation for system metadata and object identifiers (`CATALOG_COLLATION`).
140
146
141
147
## Catalog collation in SQL database in Microsoft Fabric
142
148
143
-
You can't change or set the logical server collation on SQL database in Fabric.
144
-
145
-
Currently, by default the collation of a SQL database in Fabric is `SQL_Latin1_General_CP1_CI_AS` and can't be updated. Collations on individual columns are supported.
149
+
Currently, by default the collation of a SQL database in Fabric is `SQL_Latin1_General_CP1_CI_AS`, but this can be configured when deploying. The collation can't be updated after deployment. Collations on individual columns are supported. For more information on deployment options, see [Options to create a SQL database in Fabric](/fabric/database/sql/create-options).
0 commit comments