From 62496f532d589cdc423602503fd56c8c1423d074 Mon Sep 17 00:00:00 2001 From: WilliamAntonRohm Date: Mon, 1 Jul 2019 09:45:23 -0700 Subject: [PATCH 01/46] addressing sql-docs issue 2394 --- docs/t-sql/functions/datediff-transact-sql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/t-sql/functions/datediff-transact-sql.md b/docs/t-sql/functions/datediff-transact-sql.md index e30e616cf63..d1a0affcc83 100644 --- a/docs/t-sql/functions/datediff-transact-sql.md +++ b/docs/t-sql/functions/datediff-transact-sql.md @@ -93,7 +93,7 @@ For a return value out of range for **int** (-2,147,483,648 to +2,147,483,647), If *startdate* and *enddate* are both assigned only a time value, and the *datepart* is not a time *datepart*, `DATEDIFF` returns 0. -`DATEDIFF` does not use a time zone offset component of *startdate* or *enddate* to calculate the return value. +`DATEDIFF` uses the time zone offset component of *startdate* or *enddate* to calculate the return value. Because [smalldatetime](../../t-sql/data-types/smalldatetime-transact-sql.md) is accurate only to the minute, seconds and milliseconds are always set to 0 in the return value when *startdate* or *enddate* have a **smalldatetime** value. From 11dd9f267bdc8ba48ab5a25a409c91362106885f Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Mon, 1 Jul 2019 16:27:46 -0700 Subject: [PATCH 02/46] [sql] freshness --- .openpublishing.redirection.json | 20 ++ ...s-dm-db-xtp-merge-requests-transact-sql.md | 7 +- .../tables/create-edge-constraints.md | 227 -------------- .../tables/delete-edge-constraint.md | 94 ------ .../tables/graph-edge-constraints.md | 290 ++++++++++++++++-- .../tables/modify-edge-constraint.md | 47 --- .../tables/view-edge-constraint-properties.md | 105 ------- docs/toc.yml | 16 - docs/toc/toc.yml | 9 - 9 files changed, 289 insertions(+), 526 deletions(-) delete mode 100644 docs/relational-databases/tables/create-edge-constraints.md delete mode 100644 docs/relational-databases/tables/delete-edge-constraint.md delete mode 100644 docs/relational-databases/tables/modify-edge-constraint.md delete mode 100644 docs/relational-databases/tables/view-edge-constraint-properties.md diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 2f363a83afe..9513b689892 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -84,6 +84,26 @@ "source_path": "docs/relational-databases/database-features.md", "redirect_url": "/sql/relational-databases/databases/databases", "redirect_document_id": false + }, + { + "source_path": "docs/relational-databases/tables/create-edge-constraint.md", + "redirect_url": "/sql/relational-databases/tables/graph-edge-constraints", + "redirect_document_id": false + }, + { + "source_path": "docs/relational-databases/tables/delete-edge-constraint.md", + "redirect_url": "/sql/relational-databases/tables/graph-edge-constraints", + "redirect_document_id": false + }, + { + "source_path": "docs/relational-databases/tables/modify-edge-constraint.md", + "redirect_url": "/sql/relational-databases/tables/graph-edge-constraints", + "redirect_document_id": false + }, + { + "source_path": "docs/relational-databases/tables/view-edge-constraint-properties.md", + "redirect_url": "/sql/relational-databases/tables/graph-edge-constraints", + "redirect_document_id": false }, { "source_path": "docs/relational-databases/polybase/get-started-with-polybase.md", diff --git a/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md b/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md index bb017c6244f..a217f2acfcc 100644 --- a/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md +++ b/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md @@ -12,19 +12,18 @@ ms.author: genemi manager: craigg --- # sys.dm_db_xtp_merge_requests (Transact-SQL) -[!INCLUDE[tsql-appliesto-ss2014-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2014-xxxx-xxxx-xxx-md.md)] +[!INCLUDE[tsql-appliesto-ss2014-xxxx-xxxx-xxx-md](../../includes/tsql-appliesto-ss2014-xxxx-xxxx-xxx-md.md)] Tracks database merge requests. The merge request may have been generated by SQL Server or the request could have been made by a user with [sys.sp_xtp_merge_checkpoint_files (Transact-SQL)](../../relational-databases/system-stored-procedures/sys-sp-xtp-merge-checkpoint-files-transact-sql.md). > [!NOTE] > This dynamic management view (DMV), sys.dm_db_xtp_merge_requests, exists until Microsoft SQL Server 2014. -> > But starting with SQL Server 2016 this DMV no longer applies. ## Columns in the report -| Column name | Data type | Description | +| Column name | Data type | Description | | :-- | :-- | :-- | | request_state | tinyint | Status of the merge request:
0 = requested
1 = pending
2 = installed
3 = abandoned | | request_state_desc | nvarchar(60) | Meanings for the current state of the request:

Requested - a merge request exists.
Pending - the merge is being processing.
Installed - the merge is complete.
Abandoned - the merge could not complete, perhaps due to lack of storage. | @@ -42,5 +41,3 @@ Requires VIEW DATABASE STATE permission on the current database. ## See also [Memory-Optimized Table Dynamic Management Views (Transact-SQL)](../../relational-databases/system-dynamic-management-views/memory-optimized-table-dynamic-management-views-transact-sql.md) - - diff --git a/docs/relational-databases/tables/create-edge-constraints.md b/docs/relational-databases/tables/create-edge-constraints.md deleted file mode 100644 index fab98d49602..00000000000 --- a/docs/relational-databases/tables/create-edge-constraints.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: "Create Edge Constraints | Microsoft Docs" -ms.custom: "" -ms.date: "09/11/2018" -ms.prod: sql -ms.prod_service: "database-engine, sql-database" -ms.reviewer: "" -ms.technology: table-view-index -ms.topic: conceptual -helpviewer_keywords: - - "edge constraints [SQL Server]" - - "CONNECTION constraints" - - "edge constraints [Azure SQL Database]" - - "graph edge constraints" - - "SQL Graph" -ms.assetid: -author: "shkale-msft" -ms.author: shkale -manager: craigg -monikerRange: ">=sql-server-2017||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" ---- -# Create Edge Constraints -[!INCLUDE[tsql-appliesto-ssver15-xxxx-xxxx-xxx.md](../../includes/tsql-appliesto-ssver15-xxxx-xxxx-xxx.md)] - - You can define a edge constraint in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[tsql](../../includes/tsql-md.md)]. - -## Before You Begin - -### Limitations and Restrictions - -- An edge constraint can be defined on a graph edge table only. - -## Using Transact-SQL - -### To create an edge constraint on a new edge table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates an edge constraint on **bought** edge table. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) AS NODE - GO - - CREATE TABLE bought - ( - PurchaseCount INT, - CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) - ) - AS EDGE - GO - ``` - -### To add edge constraint to an existing edge table. - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example uses ALTER TABLE to add an edge constraint to **bought** edge table. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) AS NODE - GO - - CREATE TABLE bought - ( - PurchaseCount INT - ) - AS EDGE - GO - - ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Customer TO Product) - GO - ``` - -### Creating a new edge constraint on existing edge table, with additional edge constraint clauses. -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example uses ALTER TABLE to add a new edge constraint with additional edge constraint clauses on the **bought** edge table. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Supplier - ( - ID INTEGER PRIMARY KEY, - SupplierName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) AS NODE - GO - - CREATE TABLE bought - ( - PurchaseCount INT, - CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) - ) - AS EDGE - GO - - -- Drop the existing edge constraint first and then create a new one. - ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT - GO - - -- User ALTER TABLE to create a new edge constraint. - ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Customer TO Product, Supplier TO Product) - GO - ``` - Note that there are two edge constraint clauses in *EC_BOUGHT1* constraint, one that connects **Customer** to **Product** and other connects **Supplier** to **Product**. Both these clauses are applied in disjunction. That is, a given edge has to satisfy either of these two clauses to be allowed in the edge table. - - - -### Creating a new edge constraint on existing edge table, with new edge constraint clause. -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example uses ALTER TABLE to add a new edge constraint with a new edge constraint clause on the **bought** edge table. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Supplier - ( - ID INTEGER PRIMARY KEY, - SupplierName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) AS NODE - GO - - CREATE TABLE bought - ( - PurchaseCount INT, - CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) - ) - AS EDGE - GO - - ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Supplier TO Product) - GO - ``` - - In this example, we created two separate edge constraints on the **bought** edge table, *EC_BOUGHT* and *EC_BOUGHT1*. Both these edge constraints have different edge constraint clauses. If an edge table has more than one edge constraint on it, a given edge has to satisfy **ALL** edge constraints to be allowed in the edge table. Since no edge will be able to satisfy both *EC_BOUGHT* and *EC_BOUGHT1* here, the **bought** edge table must remain empty. - - For inserts to succeed in this edge table, either one of the edge constraint must be dropped, or both of them must be dropped and a new edge constraint should be created which has both edge constraint clauses in it. - - ```sql - USE TEMPDB - GO - -- Drop the existing edge constraint first and then create a new one. - ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT - GO - - ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT1 - GO - - ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT_NEW CONNECTION (Customer TO Product, Supplier TO Product) - GO - ``` - - Now for a given edge to be allowed in the **bought** edge, it has to satisfy either of the edge constraint clauses in *EC_BOUGHT_NEW* constraint. Hence any edge that is trying to connect valid **Customer** to **Product** or **Supplier** to **Product** nodes, will be allowed. diff --git a/docs/relational-databases/tables/delete-edge-constraint.md b/docs/relational-databases/tables/delete-edge-constraint.md deleted file mode 100644 index 2f1fad3c6b6..00000000000 --- a/docs/relational-databases/tables/delete-edge-constraint.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "Delete Edge Constraint | Microsoft Docs" -ms.custom: "" -ms.date: "09/12/2018" -ms.prod: sql -ms.prod_service: "database-engine, sql-database" -ms.reviewer: "" -ms.technology: table-view-index -ms.topic: conceptual -helpviewer_keywords: - - "removing edge constraint" - - "deleting edge constraint, deleting connection constraint" - - "SQL Graph" - - "graph edge constraints" -ms.assetid: -author: shkale-msft -ms.author: shkale -manager: craigg -monikerRange: ">=sql-server-2017||>=sql-server-linux-2017||=azuresqldb-mi-current" ---- -# Delete Edge Constraints -[!INCLUDE[tsql-appliesto-ssver15-xxxx-xxxx-xxx.md](../../includes/tsql-appliesto-ssver15-xxxx-xxxx-xxx.md)] - - You can delete (drop) an edge constraint in [!INCLUDE[ssNoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Security](#Security) - -- **To delete a primary key using:** - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using Transact-SQL - -#### To delete an edge constraint - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example first identifies the name of the edge constraint and then deletes the constraint. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) AS NODE - GO - - CREATE TABLE bought - ( - PurchaseCount INT, - CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) - ) - AS EDGE - GO - - -- Return the name of edge constraint. - SELECT name - FROM sys.edge_constraints - WHERE type = 'EC' AND parent_object_id = OBJECT_ID('bought'); - GO - - -- Delete the primary key constraint. - ALTER TABLE bought - DROP CONSTRAINT EC_BOUGHT - GO - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md), [sys.edge_constraints (Transact-SQL)](../../relational-databases/system-catalog-views/sys-edge-constraints-transact-sql.md) and [ssys.edge_constraint_clauses (Transact-SQL)](../../relational-databases/system-catalog-views/sys-edge-constraint-clauses-transact-sql.md) - -### diff --git a/docs/relational-databases/tables/graph-edge-constraints.md b/docs/relational-databases/tables/graph-edge-constraints.md index d40fd9aa573..2cea5f03ccc 100644 --- a/docs/relational-databases/tables/graph-edge-constraints.md +++ b/docs/relational-databases/tables/graph-edge-constraints.md @@ -23,34 +23,278 @@ monikerRange: ">=sql-server-2017||=sqlallproducts-allversions||>=sql-server-linu Edge constraints can be used to enforce data integrity and specific semantics on the edge tables in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] graph database. -## Edge Constraints - In the first release of graph features, edge tables did not enforce anything for the endpoints of the edge. That is, an edge in a graph database could connect any node to any other node, regardless of the type. +## Edge Constraints - This release introduces edge constraints, which enable users to add constraints to their edge tables, thereby enforcing specific semantics and also maintaining data integrity. When a new edge is added to an edge table with edge constraints, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] enforces that the nodes which the edge is trying to connect, exist in the proper node tables. It is also ensured that a node cannot be dropped, if it is still referenced by an edge. +In the first release of graph features, edge tables did not enforce anything for the endpoints of the edge. That is, an edge in a graph database could connect any node to any other node, regardless of the type. - ### Edge Constraint Clauses - Each edge constraint consists of one or more edge constraint clause(s). An edge constraint clause is the pair of FROM and TO nodes that the given edge could connect. +This release introduces edge constraints, which enable users to add constraints to their edge tables, thereby enforcing specific semantics and also maintaining data integrity. When a new edge is added to an edge table with edge constraints, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] enforces that the nodes which the edge is trying to connect, exist in the proper node tables. It is also ensured that a node cannot be dropped, if it is still referenced by an edge. - Consider that you have `Product` and `Customer` nodes in your graph and you use `Bought` edge to connect these nodes. The edge constraint clause specifies the FROM and TO node pair and the direction of the edge. In this case the edge constraint clause will be `Customer` TO `Product`. That is, - inserting a `Bought` that goes from a `Customer` to `Product` will be allowed. Attempts to insert an edge that goes from `Product` to `Customer` fail. - -- An edge constraint clause contains a pair of FROM and TO node tables that the edge constraint is enforced on. - -- Users may specify multiple edge constraint clauses per edge constraint, which will be applied as a disjunction. +### Edge Constraint Clauses +Each edge constraint consists of one or more edge constraint clause(s). An edge constraint clause is the pair of FROM and TO nodes that the given edge could connect. + +Consider that you have `Product` and `Customer` nodes in your graph and you use `Bought` edge to connect these nodes. The edge constraint clause specifies the FROM and TO node pair and the direction of the edge. In this case the edge constraint clause will be `Customer` TO `Product`. That is, + inserting a `Bought` that goes from a `Customer` to `Product` will be allowed. Attempts to insert an edge that goes from `Product` to `Customer` fail. + +- An edge constraint clause contains a pair of FROM and TO node tables that the edge constraint is enforced on. +- Users may specify multiple edge constraint clauses per edge constraint, which will be applied as a disjunction. - If multiple edge constraints are created on a single edge table, edges must satisfy ALL constraints to be allowed. - + ### Indexes on Edge Constraints - Creating an edge constraint does not automatically create a corresponding index on `$from_id` and `$to_id` columns in the edge table. Manually creating an index on a `$from_id`, `$to_id` pair is recommended if you have point lookup queries or OLTP workload. -## Related Tasks - The following table lists the common tasks associated with edge constraints. +Creating an edge constraint does not automatically create a corresponding index on `$from_id` and `$to_id` columns in the edge table. Manually creating an index on a `$from_id`, `$to_id` pair is recommended if you have point lookup queries or OLTP workload. + +## Working with edge constraints + +You can define a edge constraint in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[tsql](../../includes/tsql-md.md)]. An edge constraint can be defined on a graph edge table only. To create, delete, or modify an edge constraint, you must have **ALTER** permission on the table. + +### Create edge constraints + +The following examples show you how to create an edge constraints on new or existing tables + +#### To create an edge constraint on a new edge table + +The following example creates an edge constraint on the **bought** edge table. + +```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY + ,CustomerName VARCHAR(100) + ) +AS NODE; +GO +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + ,ProductName VARCHAR(100) + ) +AS NODE; +GO +CREATE TABLE bought + ( + PurchaseCount INT + ,CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) + ) + AS EDGE; + ``` + +#### To add edge constraint to an existing edge table + +The following example uses ALTER TABLE to add an edge constraint to the **bought** edge table. + +```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY, + , CustomerName VARCHAR(100) + ) + AS NODE; +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + , ProductName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE bought + ( + PurchaseCount INT + ) + AS EDGE; +GO +ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Customer TO Product); +``` + +#### Create a new edge constraint on existing edge table, with additional edge constraint clauses + +The following example uses the `ALTER TABLE` command to add a new edge constraint with additional edge constraint clauses on the **bought** edge table. -|Task|Article| -|----------|-----------| -|Describes how to create edge constraints.|[Create Edge Constraints](../../relational-databases/tables/create-edge-constraints.md)| -|Describes how to delete an edge constraint.|[Delete Edge Constraint](../../relational-databases/tables/delete-edge-constraint.md)| -|Describes how to modify an edge constraint.|[Modify Edge Constraint](../../relational-databases/tables/modify-edge-constraint.md)| -|Describes how to view edge constraint properties.|[View Edge Constraint Properties](../../relational-databases/tables/view-edge-constraint-properties.md)| -| Overview of the Graph technology in SQL Server | [Graph processing with SQL Server and Azure SQL Database](../graphs/sql-graph-overview.md) | -|   |   | +```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY + , CustomerName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Supplier + ( + ID INTEGER PRIMARY KEY + , SupplierName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + , ProductName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE bought + ( + PurchaseCount INT + , CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) + ) + AS EDGE; +-- Drop the existing edge constraint first and then create a new one. +ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT; +GO +-- User ALTER TABLE to create a new edge constraint. +ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Customer TO Product, Supplier TO Product); +``` + +In the preceding example, there are two edge constraint clauses in *EC_BOUGHT1* constraint, one that connects **Customer** to **Product** and other connects **Supplier** to **Product**. Both these clauses are applied in disjunction. That is, a given edge has to satisfy either of these two clauses to be allowed in the edge table. + +#### Creating a new edge constraint on existing edge table, with new edge constraint clause + +The following example uses the `ALTER TABLE` command to add a new edge constraint with a new edge constraint clause on the **bought** edge table. + + ```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY + , CustomerName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Supplier + ( + ID INTEGER PRIMARY KEY + , SupplierName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + , ProductName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE bought + ( + PurchaseCount INT, + CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) + ) + AS EDGE; +GO +ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT1 CONNECTION (Supplier TO Product); + ``` + +In the preceding example, we created two separate edge constraints on the **bought** edge table, *EC_BOUGHT* and *EC_BOUGHT1*. Both these edge constraints have different edge constraint clauses. If an edge table has more than one edge constraint on it, a given edge has to satisfy **ALL** edge constraints to be allowed in the edge table. Since no edge will be able to satisfy both *EC_BOUGHT* and *EC_BOUGHT1* here, the **bought** edge table must remain empty. + +For inserts to succeed in this edge table, either one of the edge constraint must be dropped, or both of them must be dropped and a new edge constraint should be created which has both edge constraint clauses in it. + +```sql +-- Drop the existing edge constraint first and then create a new one. +ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT; +GO +ALTER TABLE bought DROP CONSTRAINT EC_BOUGHT1; +GO +ALTER TABLE bought ADD CONSTRAINT EC_BOUGHT_NEW CONNECTION (Customer TO Product, Supplier TO Product); +GO +``` + +For a given edge to be allowed in the **bought** edge, it has to satisfy either of the edge constraint clauses in *EC_BOUGHT_NEW* constraint. Hence any edge that is trying to connect valid **Customer** to **Product** or **Supplier** to **Product** nodes, will be allowed. + +### Delete edge constraints + +The following example first identifies the name of the edge constraint and then deletes the constraint. + +```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY + , CustomerName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + , ProductName VARCHAR(100) + ) AS NODE; +GO +CREATE TABLE bought + ( + PurchaseCount INT + , CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product) + ) + AS EDGE; +GO +-- Return the name of edge constraint. +SELECT name + FROM sys.edge_constraints + WHERE type = 'EC' AND parent_object_id = OBJECT_ID('bought'); +GO +-- Delete the primary key constraint. +ALTER TABLE bought +DROP CONSTRAINT EC_BOUGHT; +``` + +### Modify edge constraints + +To modify an edge constraint using Transact-SQL, you must first delete the existing edge constraint and then re-create it with the new definition. + +### View edge constraints + +[!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md). + +The example returns all edge constraints and their properties for the edge table `bought` in the tempdb database. + +```sql +-- CREATE node and edge tables +CREATE TABLE Customer + ( + ID INTEGER PRIMARY KEY + , CustomerName VARCHAR(100) + ) + AS NODE; +GO +CREATE TABLE Supplier + ( + ID INTEGER PRIMARY KEY + , SupplierName VARCHAR(100) + ) + AS NODE; + GO +CREATE TABLE Product + ( + ID INTEGER PRIMARY KEY + , ProductName VARCHAR(100) + ) + AS NODE; + +-- CREATE edge table with edge constraints. +CREATE TABLE bought + ( + PurchaseCount INT + , CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product, Supplier TO Product) + ) + AS EDGE; + +-- Query sys.edge_constraints and sys.edge_constraint_clauses to view +-- edge constraint properties. +SELECT + EC.name AS edge_constraint_name + , OBJECT_NAME(EC.parent_object_id) AS edge_table_name + , OBJECT_NAME(ECC.from_object_id) AS from_node_table_name + , OBJECT_NAME(ECC.to_object_id) AS to_node_table_name + , is_disabled + , is_not_trusted +FROM sys.edge_constraints EC + INNER JOIN sys.edge_constraint_clauses ECC + ON EC.object_id = ECC.object_id +WHERE EC.parent_object_id = object_id('bought'); +``` + +## Related tasks + +For information about graph technology in SQL Server, see [Graph processing with SQL Server and Azure SQL Database](../graphs/sql-graph-overview?view=sql-server-2017). diff --git a/docs/relational-databases/tables/modify-edge-constraint.md b/docs/relational-databases/tables/modify-edge-constraint.md deleted file mode 100644 index 0ccc09b6821..00000000000 --- a/docs/relational-databases/tables/modify-edge-constraint.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "Modify Edge Constraints | Microsoft Docs" -ms.custom: "" -ms.date: "09/12/2018" -ms.prod: sql -ms.prod_service: "database-engine, sql-database" -ms.reviewer: "" -ms.technology: table-view-index -ms.topic: conceptual -helpviewer_keywords: - - "alter edge constraints" - - "edge constraints [SQL Server]" - - "CONNECTION constraints" - - "edge constraints [Azure SQL Database]" - - "graph edge constraints" - - "SQL Graph" -ms.assetid: -author: shkale-msft -ms.author: shkale -manager: craigg -monikerRange: ">=sql-server-2017||>=sql-server-linux-2017||=azuresqldb-mi-current" ---- -# Modify Edge Constraints -[!INCLUDE[tsql-appliesto-ssver15-xxxx-xxxx-xxx.md](../../includes/tsql-appliesto-ssver15-xxxx-xxxx-xxx.md)] - - You can modify an edge constraint in [!INCLUDE[ssNoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[tsql](../../includes/tsql-md.md)]. You can modify the edge constraint of an edge table by changing the edge constraint clause order or adding a new clause. - - **In This Topic** - -- **Before you begin:** - - [Security](#Security) - -- **To modify an edge constraint, using:** - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using Transact-SQL - To modify an edge constraint using Transact-SQL, you must first delete the existing edge constraint and then re-create it with the new definition. For more information, see [Delete Edge Constraint](../../relational-databases/tables/delete-edge-constraint.md) and [Create Edge Constraints](../../relational-databases/tables/create-edge-constraints.md). - diff --git a/docs/relational-databases/tables/view-edge-constraint-properties.md b/docs/relational-databases/tables/view-edge-constraint-properties.md deleted file mode 100644 index 6ad2b6d298b..00000000000 --- a/docs/relational-databases/tables/view-edge-constraint-properties.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "View Edge Constraint Properties | Microsoft Docs" -ms.custom: "" -ms.date: "09/18/2018" -ms.prod: sql -ms.prod_service: "table-view-index, sql-database, sql-data-warehouse, pdw" -ms.reviewer: "" -ms.technology: table-view-index -ms.topic: conceptual -helpviewer_keywords: - - "edge constraints [SQL Server], attributes" - - "displaying edge constraint attributes" - - "viewing edge constraint attributes" -ms.assetid: b0e57cb7-9b26-4b96-b76a-1f59f5f498c5 -author: shkale-msft -ms.author: shkale -manager: craigg -monikerRange: ">=sql-server-2017||>=sql-server-linux-2017||=azuresqldb-mi-current" ---- -# View Edge Constraint Properties -[!INCLUDE[tsql-appliesto-ssver15-xxxx-xxxx-xxx.md](../../includes/tsql-appliesto-ssver15-xxxx-xxxx-xxx.md)] - - You can view the edge constraint properties [!INCLUDE[noversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Security](#Security) - -- **To view the foreign key attributes of a specific table, using:** - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Security - -#### Permissions - [!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md). - -## Using Transact-SQL - -#### To view the foreign key attributes of a relationship in a specific table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example returns all edge constraints and their properties for the edge table `bought` in the tempdb database. - - ```sql - USE TEMPDB - GO - -- CREATE node and edge tables - CREATE TABLE Customer - ( - ID INTEGER PRIMARY KEY, - CustomerName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Supplier - ( - ID INTEGER PRIMARY KEY, - SupplierName VARCHAR(100) - ) - AS NODE - GO - - CREATE TABLE Product - ( - ID INTEGER PRIMARY KEY, - ProductName VARCHAR(100) - ) - AS NODE - GO - -- CREATE edge table with edge constraints. - CREATE TABLE bought - ( - PurchaseCount INT, - CONSTRAINT EC_BOUGHT CONNECTION (Customer TO Product, Supplier TO Product) - ) - AS EDGE - GO - - -- Query sys.edge_constraints and sys.edge_constraint_clauses to view - -- edge constraint properties. - SELECT - EC.name AS edge_constraint_name - , OBJECT_NAME(EC.parent_object_id) AS edge_table_name - , OBJECT_NAME(ECC.from_object_id) AS from_node_table_name - , OBJECT_NAME(ECC.to_object_id) AS to_node_table_name - , is_disabled - , is_not_trusted - FROM sys.edge_constraints EC - INNER JOIN sys.edge_constraint_clauses ECC - ON EC.object_id = ECC.object_id - WHERE EC.parent_object_id = object_id('bought') - ``` - - For more information, see [sys.edge_constraints (Transact-SQL)](../../relational-databases/system-catalog-views/sys-edge-constraints-transact-sql.md) and [sys.edge_constraint_clauses (Transact-SQL)](../../relational-databases/system-catalog-views/sys-edge-constraint-clauses-transact-sql.md). - -### diff --git a/docs/toc.yml b/docs/toc.yml index b343a930edf..b9d2a4154bf 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1549,24 +1549,8 @@ href: relational-databases/tables/use-table-valued-parameters-database-engine.md - name: Edge constraints href: relational-databases/tables/graph-edge-constraints.md - items: - - name: Create - href: relational-databases/tables/create-edge-constraints.md - - name: Delete - href: relational-databases/tables/delete-edge-constraint.md - - name: Modify - href: relational-databases/tables/modify-edge-constraint.md - - name: View - href: relational-databases/tables/view-edge-constraint-properties.md - name: Primary keys href: relational-databases/tables/primary-and-foreign-key-constraints.md - items: - - name: Create - href: relational-databases/tables/create-primary-keys.md - - name: Modify - href: relational-databases/tables/modify-primary-keys.md - - name: Delete - href: relational-databases/tables/delete-primary-keys.md - name: Foreign keys items: - name: Create relationships diff --git a/docs/toc/toc.yml b/docs/toc/toc.yml index 9b28ec1c40d..44fd635f6b5 100644 --- a/docs/toc/toc.yml +++ b/docs/toc/toc.yml @@ -1549,15 +1549,6 @@ href: ../relational-databases/tables/use-table-valued-parameters-database-engine.md - name: Edge constraints href: ../relational-databases/tables/graph-edge-constraints.md - items: - - name: Create - href: ../relational-databases/tables/create-edge-constraints.md - - name: Delete - href: ../relational-databases/tables/delete-edge-constraint.md - - name: Modify - href: ../relational-databases/tables/modify-edge-constraint.md - - name: View - href: ../relational-databases/tables/view-edge-constraint-properties.md - name: Primary keys href: ../relational-databases/tables/primary-and-foreign-key-constraints.md items: From 823d6795e7d3c5fc598e5ac46cb03d4565daba10 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 09:14:39 -0700 Subject: [PATCH 03/46] more --- .../indexes/index-properties-f1-help.md | 114 +++++++------- .../tables/delete-columns-from-a-table.md | 139 ++++++++---------- .../tables/graph-edge-constraints.md | 4 +- docs/toc.yml | 2 - 4 files changed, 125 insertions(+), 134 deletions(-) diff --git a/docs/2014/relational-databases/indexes/index-properties-f1-help.md b/docs/2014/relational-databases/indexes/index-properties-f1-help.md index 6e7f846a5f1..2f1b7e1dcbf 100644 --- a/docs/2014/relational-databases/indexes/index-properties-f1-help.md +++ b/docs/2014/relational-databases/indexes/index-properties-f1-help.md @@ -20,62 +20,64 @@ ms.author: mikeray manager: craigg --- # Index Properties F1 Help - The sections in this topic refer to various index properties that are available by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] dialogs. - - **In This Topic:** - - [Index Properties General Page](#General) - - [Select (Index) Columns Dialog Box](#Columns) - - [Index Properties Storage Page](#Storage) - - [Index Properties Spatial Page](#Spatial) - - [Index Properties Filter Page](#Filter) - -## Index Properties General Page - Use the General page to view or modify index properties for the selected table or view. The options for each page may change based on the type of index selected. - - **Table name** - Displays the name of the table or view that the index was created on. This field is read-only. To select a different table, close the Index Properties page, select the correct table, and then open the Index Properties page again. - - Spatial indexes cannot be specified on indexed views. Spatial indexes can be defined only for a table that has a primary key. The maximum number of primary key columns on the table is 15. The combined per-row size of the primary-key columns is limited to a maximum of 895 bytes. - - **Index name** - Displays the name of the index. This field is read-only for an existing index. When creating a new index, type the name of the index. - - **Index type** - Indicates the type of index. For new indexes, indicates the type of index selected when opening the dialog box. Indexes can be: **Clustered**, **Nonclustered**, **Primary XML**, **Secondary XML**, **Spatial**, **Clustered columnstore**, or **Nonclustered Columnstore**. - - **Note** Only one clustered index is allowed for each table. Only one xVelocity memory optimized columnstore index is allowed for each table. - - **Unique** - Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this check box is cleared. When modifying an existing index, index creation will fail if two rows have the same value. For columns where NULL is permitted, a unique index permits one NULL value. - - If you select **Spatial** in the **Index type** field, the **Unique** check box is dimmed. - - **Index key columns** - Add the desired columns to the **Index key columns** grid. When more than one column is added, the columns must be listed in the order desired. The column order in an index can have a great impact on the index performance. - - No more than 16 columns can participate in a single composite index. For greater than 16 columns, see included columns at the end of this topic. - - A spatial index can be defined only on a single column that contains a spatial data type (a *spatial column*). - - **Name** - Displays the name of the column that participates in the index key. - - **Sort Order** - Specifies the sort direction of the selected index column, either **Ascending** or **Descending**. - -> [!NOTE] -> If the index type is **Primary XML** or **Spatial**, this column does not appear in the table. - - **Data Type** - Displays the data type information. - -> [!NOTE] -> If the table column is a computed column, **Data type** displays "computed column." + +The sections in this topic refer to various index properties that are available by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] dialogs. + +**In This Topic:** + +[Index Properties General Page](#General) + +[Select (Index) Columns Dialog Box](#Columns) + +[Index Properties Storage Page](#Storage) + +[Index Properties Spatial Page](#Spatial) + +[Index Properties Filter Page](#Filter) + +## Index Properties General Page + +Use the General page to view or modify index properties for the selected table or view. The options for each page may change based on the type of index selected. + +**Table name** +Displays the name of the table or view that the index was created on. This field is read-only. To select a different table, close the Index Properties page, select the correct table, and then open the Index Properties page again. + +Spatial indexes cannot be specified on indexed views. Spatial indexes can be defined only for a table that has a primary key. The maximum number of primary key columns on the table is 15. The combined per-row size of the primary-key columns is limited to a maximum of 895 bytes. + +**Index name** +Displays the name of the index. This field is read-only for an existing index. When creating a new index, type the name of the index. + +**Index type** +Indicates the type of index. For new indexes, indicates the type of index selected when opening the dialog box. Indexes can be: **Clustered**, **Nonclustered**, **Primary XML**, **Secondary XML**, **Spatial**, **Clustered columnstore**, or **Nonclustered Columnstore**. + +**Note** Only one clustered index is allowed for each table. Only one xVelocity memory optimized columnstore index is allowed for each table. + +**Unique** +Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this check box is cleared. When modifying an existing index, index creation will fail if two rows have the same value. For columns where NULL is permitted, a unique index permits one NULL value. + +If you select **Spatial** in the **Index type** field, the **Unique** check box is dimmed. + +**Index key columns** +Add the desired columns to the **Index key columns** grid. When more than one column is added, the columns must be listed in the order desired. The column order in an index can have a great impact on the index performance. + +No more than 16 columns can participate in a single composite index. For greater than 16 columns, see included columns at the end of this topic. + +A spatial index can be defined only on a single column that contains a spatial data type (a *spatial column*). + +**Name** +Displays the name of the column that participates in the index key. + +**Sort Order** +Specifies the sort direction of the selected index column, either **Ascending** or **Descending**. + +> [!NOTE] +> If the index type is **Primary XML** or **Spatial**, this column does not appear in the table. + + **Data Type** + Displays the data type information. + +> [!NOTE] +> If the table column is a computed column, **Data type** displays "computed column." **Size** Displays the maximum number of bytes required to store the column data type. Displays zero (0) for a spatial or XML column. diff --git a/docs/relational-databases/tables/delete-columns-from-a-table.md b/docs/relational-databases/tables/delete-columns-from-a-table.md index b5a4b2e7ad5..2c5f5cedf66 100644 --- a/docs/relational-databases/tables/delete-columns-from-a-table.md +++ b/docs/relational-databases/tables/delete-columns-from-a-table.md @@ -21,77 +21,68 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s # Delete Columns from a Table [!INCLUDE[tsql-appliesto-ss2016-all-md](../../includes/tsql-appliesto-ss2016-all-md.md)] - This topic describes how to delete table columns in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - -> [!CAUTION] -> When you delete a column from a table, it and all the data it contains are deleted. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To delete a column from a table, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - You cannot delete a column that has a CHECK constraint. You must first delete the constraint. - - You cannot delete a column that has PRIMARY KEY or FOREIGN KEY constraints or other dependencies except when using the Table Designer. When using Object Explorer or [!INCLUDE[tsql](../../includes/tsql-md.md)], you must first remove all dependencies on the column. - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using SQL Server Management Studio - -#### To delete columns by using Object Explorer - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. In **Object Explorer**, locate the table from which you want to delete columns, and expand to expose the column names. - -3. Right-click the column that you want to delete, and choose **Delete**. - -3. In **Delete Object** dialog box, click **OK**. - - If the column contains constraints or other dependencies, an error message will display in the **Delete Object** dialog box. Resolve the error by deleting the referenced constraints. - -#### To delete columns by using Table Designer - -1. In **Object Explorer**, right-click the table from which you want to delete columns and choose **Design**. - -2. Right-click the column you want to delete and choose **Delete Column** from the shortcut menu. - -3. If the column participates in a relationship (FOREIGN KEY or PRIMARY KEY), a message prompts you to confirm the deletion of the selected columns and their relationships. Choose **Yes**. - -## Using Transact-SQL - -#### To delete columns - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. - - ``` - USE AdventureWorks2012; - GO - ALTER TABLE dbo.doc_exb DROP COLUMN column_b ; - ``` - - If the column contains constraints or other dependencies, an error message will be returned. Resolve the error by deleting the referenced constraints. - - For additional examples, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md). - -## +This topic describes how to delete table columns in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + +> [!CAUTION] +> When you delete a column from a table, it and all the data it contains are deleted. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To delete a column from a table, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +You cannot delete a column that has a CHECK constraint. You must first delete the constraint. + +You cannot delete a column that has PRIMARY KEY or FOREIGN KEY constraints or other dependencies except when using the Table Designer. When using Object Explorer or [!INCLUDE[tsql](../../includes/tsql-md.md)], you must first remove all dependencies on the column. + +### Security + +#### Permissions + +Requires ALTER permission on the table. + +## Using SQL Server Management Studio + +#### To delete columns by using Object Explorer + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. +2. In **Object Explorer**, locate the table from which you want to delete columns, and expand to expose the column names. +3. Right-click the column that you want to delete, and choose **Delete**. +4. In **Delete Object** dialog box, click **OK**. + +If the column contains constraints or other dependencies, an error message will display in the **Delete Object** dialog box. Resolve the error by deleting the referenced constraints. + +#### To delete columns by using Table Designer + +1. In **Object Explorer**, right-click the table from which you want to delete columns and choose **Design**. +2. Right-click the column you want to delete and choose **Delete Column** from the shortcut menu. +3. If the column participates in a relationship (FOREIGN KEY or PRIMARY KEY), a message prompts you to confirm the deletion of the selected columns and their relationships. Choose **Yes**. + +## Using Transact-SQL + +#### To delete columns + +The following example shows you how to delete a column. + +```sql +ALTER TABLE dbo.doc_exb DROP COLUMN column_b; +``` + +If the column contains constraints or other dependencies, an error message will be returned. Resolve the error by deleting the referenced constraints. + +For additional examples, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md). + +## diff --git a/docs/relational-databases/tables/graph-edge-constraints.md b/docs/relational-databases/tables/graph-edge-constraints.md index 2cea5f03ccc..38ae8fabef5 100644 --- a/docs/relational-databases/tables/graph-edge-constraints.md +++ b/docs/relational-databases/tables/graph-edge-constraints.md @@ -31,7 +31,7 @@ This release introduces edge constraints, which enable users to add constraints ### Edge Constraint Clauses -Each edge constraint consists of one or more edge constraint clause(s). An edge constraint clause is the pair of FROM and TO nodes that the given edge could connect. +Each edge constraint consists of one or more edge constraint clause(s). An edge constraint clause is the pair of FROM and TO nodes that the given edge could connect. Consider that you have `Product` and `Customer` nodes in your graph and you use `Bought` edge to connect these nodes. The edge constraint clause specifies the FROM and TO node pair and the direction of the edge. In this case the edge constraint clause will be `Customer` TO `Product`. That is, inserting a `Bought` that goes from a `Customer` to `Product` will be allowed. Attempts to insert an edge that goes from `Product` to `Customer` fail. @@ -280,7 +280,7 @@ CREATE TABLE bought ) AS EDGE; --- Query sys.edge_constraints and sys.edge_constraint_clauses to view +-- Query sys.edge_constraints and sys.edge_constraint_clauses to view -- edge constraint properties. SELECT EC.name AS edge_constraint_name diff --git a/docs/toc.yml b/docs/toc.yml index b9d2a4154bf..b1a20c7d9d4 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1391,8 +1391,6 @@ href: relational-databases/indexes/guidelines-for-online-index-operations.md - name: Configure parallel operations href: relational-databases/indexes/configure-parallel-index-operations.md - - name: Index Properties F1 Help - href: relational-databases/indexes/index-properties-f1-help.md - name: Columnstore indexes href: relational-databases/indexes/columnstore-indexes-overview.md items: From 6108e327c78e5def830db147b85705dce27f7099 Mon Sep 17 00:00:00 2001 From: Mauricio de los Santos Date: Tue, 2 Jul 2019 16:07:27 -0300 Subject: [PATCH 04/46] C93105: Escaping plain text asterisks Localization team has reported source content issue that causes localized version to have broken/different format compared to en-us version. Description: Escape asterisks that must be shown as plain text. --- .../errors-events/mssqlserver-1505-database-engine-error.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/2014/relational-databases/errors-events/mssqlserver-1505-database-engine-error.md b/docs/2014/relational-databases/errors-events/mssqlserver-1505-database-engine-error.md index 2fe78b761bd..1bf59a21e95 100644 --- a/docs/2014/relational-databases/errors-events/mssqlserver-1505-database-engine-error.md +++ b/docs/2014/relational-databases/errors-events/mssqlserver-1505-database-engine-error.md @@ -24,7 +24,7 @@ manager: craigg |Event Source|MSSQLSERVER| |Component|SQLEngine| |Symbolic Name|DUP_KEY| -|Message Text|CREATE UNIQUE INDEX terminated because a duplicate key was found for object name '%.*ls' and index name '%.\*ls'. The duplicate key value is %ls.| +|Message Text|CREATE UNIQUE INDEX terminated because a duplicate key was found for object name '%.\*ls' and index name '%.\*ls'. The duplicate key value is %ls.| ## Explanation This error occurs when you attempt to create a unique index and more than one row in the table contains the specified duplicate value. A unique index is created when you create an index and specify the UNIQUE keyword, or when you create a UNIQUE constraint. The table cannot contain any rows that have duplicate values in the columns defined in the index or constraint. @@ -44,7 +44,7 @@ manager: craigg Error message 1505 returns the first row that violates the uniqueness constraint. There may be other duplicate rows in the table. To find all duplicate rows, query the specified table and use the GROUP BY and HAVING clauses to report the duplicate rows. For example, the following query returns the rows in the **Employee** table that have duplicate first and last names. - SELECT LastName, FirstName, count(*) FROM dbo.Employee GROUP BY LastName, FirstName HAVING count(\*) > 1; + SELECT LastName, FirstName, count(\*) FROM dbo.Employee GROUP BY LastName, FirstName HAVING count(\*) > 1; ## User Action Consider the following solutions. From 9fc02bd746b10d607be7ad6a52955faf50152544 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:03:19 -0700 Subject: [PATCH 05/46] more --- .../specify-computed-columns-in-a-table.md | 207 ++++++++---------- .../tables/delete-columns-from-a-table.md | 7 +- 2 files changed, 95 insertions(+), 119 deletions(-) diff --git a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md index 16fe199633f..4dcbfc0e618 100644 --- a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -14,119 +14,94 @@ ms.author: sstein manager: craigg --- # Specify Computed Columns in a Table - A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Limitations) - - [Security](#Security) - -- **To specify a computed column, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. - -- A computed column cannot be the target of an INSERT or UPDATE statement. - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using SQL Server Management Studio - -### To add a new computed column - -1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. - -2. Enter the column name and accept the default data type (`nchar`(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type `money` and a column of type `int`, the computed column will be of type `money` because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](/sql/t-sql/data-types/data-type-precedence-transact-sql). - -3. In the **Column Properties** tab, expand the **Computed Column Specification** property. - -4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. - - > [!IMPORTANT] - > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type `nvarchar` is combined with a column of type `int`, the integer type must be converted to `nvarchar` as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](/sql/t-sql/functions/cast-and-convert-transact-sql). - -5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. - -6. On the **File** menu, click **Save**_table name_. - -#### To add a computed column definition to an existing column - -1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. - -2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. - -3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. - -## Using Transact-SQL - -#### To add a computed column when creating a table - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and then click **Execute**. The example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. - - ``` - CREATE TABLE dbo.Products - ( - ProductID int IDENTITY (1,1) NOT NULL - , QtyAvailable smallint - , UnitPrice money - , InventoryValue AS QtyAvailable * UnitPrice - ); - - -- Insert values into the table. - INSERT INTO dbo.Products (QtyAvailable, UnitPrice) - VALUES (25, 2.00), (10, 1.5); - - -- Display the rows in the table. - SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue - FROM dbo.Products; - - ``` - -#### To add a new computed column to an existing table - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and then click **Execute**. The following example adds a new column to the table created in the previous example. - - ``` - ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.35); - - ``` - -#### To change an existing column to a computed column - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. To change an existing column to a computed column you must drop and re-create the computed column. Copy and paste the following example into the query window and then click **Execute**. The following example modifies the column added in the previous example. - - ``` - ALTER TABLE dbo.Products DROP COLUMN RetailValue; - GO - ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); - - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). - -### + +A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + +**In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Limitations) + + [Security](#Security) + +- **To specify a computed column, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlExample) + +## Before You Begin + +### Limitations and Restrictions + +- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. +- A computed column cannot be the target of an INSERT or UPDATE statement. + +### Security + +#### Permissions + +Requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To add a new computed column + +1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. +2. Enter the column name and accept the default data type (`nchar`(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type `money` and a column of type `int`, the computed column will be of type `money` because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](/sql/t-sql/data-types/data-type-precedence-transact-sql). +3. In the **Column Properties** tab, expand the **Computed Column Specification** property. +4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. + + > [!IMPORTANT] + > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type `nvarchar` is combined with a column of type `int`, the integer type must be converted to `nvarchar` as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](/sql/t-sql/functions/cast-and-convert-transact-sql). +5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. +6. On the **File** menu, click **Save**_table name_. + +#### To add a computed column definition to an existing column + +1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. +2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. +3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. + +## Using Transact-SQL + +### To add a computed column when creating a table + +The following example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. + +```sql +CREATE TABLE dbo.Products + ( + ProductID int IDENTITY (1,1) NOT NULL + , QtyAvailable smallint + , UnitPrice money + , InventoryValue AS QtyAvailable * UnitPrice + ); +-- Insert values into the table. +INSERT INTO dbo.Products (QtyAvailable, UnitPrice) + VALUES (25, 2.00), (10, 1.5); +-- Display the rows in the table. +SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue +FROM dbo.Products; +``` + +### To add a new computed column to an existing table + +The following example adds a new column to the table created in the previous example. + +```sql +ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.35); +``` + +### To change an existing column to a computed column + +To change an existing column to a computed column you must drop and re-create the computed column. Copy and paste the following example into the query window and then click **Execute**. The following example modifies the column added in the previous example. + +```sql +ALTER TABLE dbo.Products DROP COLUMN RetailValue; +GO +ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); +``` + +For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). diff --git a/docs/relational-databases/tables/delete-columns-from-a-table.md b/docs/relational-databases/tables/delete-columns-from-a-table.md index 2c5f5cedf66..b0643f1e95e 100644 --- a/docs/relational-databases/tables/delete-columns-from-a-table.md +++ b/docs/relational-databases/tables/delete-columns-from-a-table.md @@ -19,6 +19,7 @@ manager: craigg monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Delete Columns from a Table + [!INCLUDE[tsql-appliesto-ss2016-all-md](../../includes/tsql-appliesto-ss2016-all-md.md)] This topic describes how to delete table columns in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. @@ -56,7 +57,7 @@ Requires ALTER permission on the table. ## Using SQL Server Management Studio -#### To delete columns by using Object Explorer +### To delete columns by using Object Explorer 1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. 2. In **Object Explorer**, locate the table from which you want to delete columns, and expand to expose the column names. @@ -65,7 +66,7 @@ Requires ALTER permission on the table. If the column contains constraints or other dependencies, an error message will display in the **Delete Object** dialog box. Resolve the error by deleting the referenced constraints. -#### To delete columns by using Table Designer +### To delete columns by using Table Designer 1. In **Object Explorer**, right-click the table from which you want to delete columns and choose **Design**. 2. Right-click the column you want to delete and choose **Delete Column** from the shortcut menu. @@ -73,7 +74,7 @@ If the column contains constraints or other dependencies, an error message will ## Using Transact-SQL -#### To delete columns +### To delete columns The following example shows you how to delete a column. From 0dda376519ea017bc8f2eed52b3daf31e79916a7 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:17:13 -0700 Subject: [PATCH 06/46] more --- .../tables/create-primary-keys.md | 171 ++++++++---------- 1 file changed, 79 insertions(+), 92 deletions(-) diff --git a/docs/2014/relational-databases/tables/create-primary-keys.md b/docs/2014/relational-databases/tables/create-primary-keys.md index e3afbb0fece..ab0d6f862cd 100644 --- a/docs/2014/relational-databases/tables/create-primary-keys.md +++ b/docs/2014/relational-databases/tables/create-primary-keys.md @@ -14,95 +14,82 @@ ms.author: sstein manager: craigg --- # Create Primary Keys - You can define a primary key in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique, clustered or nonclustered index. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To create a primary key, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- A table can contain only one PRIMARY KEY constraint. - -- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. - -### Security - -#### Permissions - Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - - Creating a primary key in an existing table requires ALTER permission on the table. - -## Using SQL Server Management Studio - -#### To create a primary key - -1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. - -2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. - -3. Right-click the row selector for the column and select **Set Primary Key**. - -> [!CAUTION] -> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. - - A primary key column is identified by a primary key symbol in its row selector. - - If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. - - If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](modify-primary-keys.md). - -## Using Transact-SQL - -#### To create a primary key in an existing table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a primary key on the column `TransactionID`. - - ``` - USE AdventureWorks2012; - GO - ALTER TABLE Production.TransactionHistoryArchive - ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID); - GO - - ``` - -#### To create a primary key in a new table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a primary key on the column `TransactionID`. - - ``` - USE AdventureWorks2012; - GO - CREATE TABLE Production.TransactionHistoryArchive1 - ( - TransactionID int NOT NULL, - CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) - ); - GO - - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). - -### + +You can define a primary key in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique, clustered or nonclustered index. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To create a primary key, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#Example) + +## Before You Begin + +### Limitations and Restrictions + +- A table can contain only one PRIMARY KEY constraint. +- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. + +### Security + +#### Permissions + +Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + +Creating a primary key in an existing table requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To create a primary key + +1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. +2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. +3. Right-click the row selector for the column and select **Set Primary Key**. + +> [!CAUTION] +> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. + +A primary key column is identified by a primary key symbol in its row selector. + +If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. + +If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](modify-primary-keys.md). + +## Using Transact-SQL + +### To create a primary key in an existing table + +The following example creates a primary key on the column `TransactionID` in the AdventureWorks database. + +```sql +ALTER TABLE Production.TransactionHistoryArchive + ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID +; +``` + +### To create a primary key in a new table + +The following example creates a table and defines a primary key on the column `TransactionID` in hte AdventureWorks database. + +```sql +CREATE TABLE Production.TransactionHistoryArchive1 + ( + TransactionID int NOT NULL + , CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) + ) +; +``` + +For more information, see: + +- [ALTER TABLE](/sql/t-sql/statements/alter-table-transact-sql) +- [CREATE TABLE](/sql/t-sql/statements/create-table-transact-sql) +- [Table_constraint](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). From 080a7585664892e8f3bc53a0affc3ba0842858d1 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:24:34 -0700 Subject: [PATCH 07/46] more --- .../tables/rename-columns-database-engine.md | 125 ++++++++---------- 1 file changed, 57 insertions(+), 68 deletions(-) diff --git a/docs/2014/relational-databases/tables/rename-columns-database-engine.md b/docs/2014/relational-databases/tables/rename-columns-database-engine.md index f875a219e55..7e3e079f011 100644 --- a/docs/2014/relational-databases/tables/rename-columns-database-engine.md +++ b/docs/2014/relational-databases/tables/rename-columns-database-engine.md @@ -16,71 +16,60 @@ ms.author: sstein manager: craigg --- # Rename Columns (Database Engine) - You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To rename columns, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](/sql/relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql) to list dependencies on the object before renaming it. - -### Security - -#### Permissions - Requires ALTER permission on the object. - -## Using SQL Server Management Studio - -#### To rename a column using Object Explorer - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. - -3. Type a new column name. - -#### To rename a column using Table Designer - -1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. - -2. Under **Column Name**, select the name you want to change and type a new one. - -3. On the **File** menu, click **Save**_table name_. - -> [!NOTE] -> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. - -## Using Transact-SQL - **To rename a column** - -#### To rename a column - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` to `TerrID`. Copy and paste the following example into the query window and click **Execute**. - - ``` - USE AdventureWorks2012; - GO - EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; - GO - ``` - - For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). - - + +You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + +**In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To rename columns, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlExample) + +## Before You Begin + +### Limitations and Restrictions + +Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](/sql/relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql) to list dependencies on the object before renaming it. + +### Security + +#### Permissions + +Requires ALTER permission on the object. + +## Using SQL Server Management Studio + +### To rename a column using Object Explorer + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. +2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. +3. Type a new column name. + +### To rename a column using Table Designer + +1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. +2. Under **Column Name**, select the name you want to change and type a new one. +3. On the **File** menu, click **Save**_table name_. + +> [!NOTE] +> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. + +## Using Transact-SQL + +### To rename a column + +The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` in the AdventureWorks database to `TerrID`. + +```sql +EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; +``` + +For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). From f2dc79dbbb8799c224f6e37fc7025fa047d7ced9 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:24:56 -0700 Subject: [PATCH 08/46] more --- .../tables/rename-columns-database-engine.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/2014/relational-databases/tables/rename-columns-database-engine.md b/docs/2014/relational-databases/tables/rename-columns-database-engine.md index 7e3e079f011..3b7728d000c 100644 --- a/docs/2014/relational-databases/tables/rename-columns-database-engine.md +++ b/docs/2014/relational-databases/tables/rename-columns-database-engine.md @@ -19,7 +19,7 @@ manager: craigg You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. -**In This Topic** +**In This Topic** - **Before you begin:** @@ -72,4 +72,4 @@ The following example renames the column `TerritoryID` in the table `Sales.Sales EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; ``` -For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). +For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). From 4fb6ebdc54cd8a540b2ba6f99aac9da81232d3e1 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:44:55 -0700 Subject: [PATCH 09/46] more --- .../views/create-indexed-views.md | 378 +++++++++--------- 1 file changed, 183 insertions(+), 195 deletions(-) diff --git a/docs/relational-databases/views/create-indexed-views.md b/docs/relational-databases/views/create-indexed-views.md index 54662b40558..6d40d66b461 100644 --- a/docs/relational-databases/views/create-indexed-views.md +++ b/docs/relational-databases/views/create-indexed-views.md @@ -21,209 +21,197 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Create Indexed Views + [!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] - This topic describes how to create indexes on a view. The first index created on a view must be a unique clustered index. After the unique clustered index has been created, you can create more nonclustered indexes. Creating a unique clustered index on a view improves query performance because the view is stored in the database in the same way a table with a clustered index is stored. The query optimizer may use indexed views to speed up the query execution. The view does not have to be referenced in the query for the optimizer to consider that view for a substitution. - -## Before You Begin - The following steps are required to create an indexed view and are critical to the successful implementation of the indexed view: - -1. Verify the SET options are correct for all existing tables that will be referenced in the view. -2. Verify that the SET options for the session are set correctly before you create any tables and the view. -3. Verify that the view definition is deterministic. -4. Create the view by using the `WITH SCHEMABINDING` option. -5. Create the unique clustered index on the view. + +This article describes how to create indexes on a view. The first index created on a view must be a unique clustered index. After the unique clustered index has been created, you can create more nonclustered indexes. Creating a unique clustered index on a view improves query performance because the view is stored in the database in the same way a table with a clustered index is stored. The query optimizer may use indexed views to speed up the query execution. The view does not have to be referenced in the query for the optimizer to consider that view for a substitution. + +## Before You Begin + +The following steps are required to create an indexed view and are critical to the successful implementation of the indexed view: + +1. Verify the SET options are correct for all existing tables that will be referenced in the view. +2. Verify that the SET options for the session are set correctly before you create any tables and the view. +3. Verify that the view definition is deterministic. +4. Create the view by using the `WITH SCHEMABINDING` option. +5. Create the unique clustered index on the view. > [!IMPORTANT] -> When executing DML1 on a table referenced by a large number of indexed views, or fewer but very complex indexed views, those referenced indexed views will have to be updated as well. As a result, DML query performance can degrade significantly, or in some cases, a query plan cannot even be produced. -> In such scenarios, test your DML queries before production use, analyze the query plan and tune/simplify the DML statement. -> -> 1 Such as UPDATE, DELETE or INSERT operations. - -### Required SET Options for Indexed Views -Evaluating the same expression can produce different results in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] when different SET options are active when the query is executed. For example, after the SET option `CONCAT_NULL_YIELDS_NULL` is set to ON, the expression `'abc' + NULL` returns the value `NULL`. However, after `CONCAT_NULL_YIELDS_NULL` is set to OFF, the same expression produces `'abc'`. - -To make sure that the views can be maintained correctly and return consistent results, indexed views require fixed values for several SET options. The SET options in the following table must be set to the values shown in the **Required Value** column whenever the following conditions occur: - -- The view and subsequent indexes on the view are created. - -- The base tables referenced in the view at the time the table is created. - -- There is any insert, update, or delete operation performed on any table that participates in the indexed view. This requirement includes operations such as bulk copy, replication, and distributed queries. - -- The indexed view is used by the query optimizer to produce the query plan. - -|SET options|Required value|Default server value|Default

OLE DB and ODBC value|Default

DB-Library value| -|-----------------|--------------------|--------------------------|---------------------------------------|-----------------------------------| -|ANSI_NULLS|ON|ON|ON|OFF| -|ANSI_PADDING|ON|ON|ON|OFF| -|ANSI_WARNINGS1|ON|ON|ON|OFF| -|ARITHABORT|ON|ON|OFF|OFF| -|CONCAT_NULL_YIELDS_NULL|ON|ON|ON|OFF| -|NUMERIC_ROUNDABORT|OFF|OFF|OFF|OFF| -|QUOTED_IDENTIFIER|ON|ON|ON|OFF| +> When executing DML1 on a table referenced by a large number of indexed views, or fewer but very complex indexed views, those referenced indexed views will have to be updated as well. As a result, DML query performance can degrade significantly, or in some cases, a query plan cannot even be produced. +> In such scenarios, test your DML queries before production use, analyze the query plan and tune/simplify the DML statement. +> +> 1 Such as UPDATE, DELETE or INSERT operations. + +### Required SET Options for Indexed Views + +Evaluating the same expression can produce different results in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] when different SET options are active when the query is executed. For example, after the SET option `CONCAT_NULL_YIELDS_NULL` is set to ON, the expression `'abc' + NULL` returns the value `NULL`. However, after `CONCAT_NULL_YIELDS_NULL` is set to OFF, the same expression produces `'abc'`. + +To make sure that the views can be maintained correctly and return consistent results, indexed views require fixed values for several SET options. The SET options in the following table must be set to the values shown in the **Required Value** column whenever the following conditions occur: + +- The view and subsequent indexes on the view are created. +- The base tables referenced in the view at the time the table is created. +- There is any insert, update, or delete operation performed on any table that participates in the indexed view. This requirement includes operations such as bulk copy, replication, and distributed queries. +- The indexed view is used by the query optimizer to produce the query plan. + +|SET options|Required value|Default server value|Default

OLE DB and ODBC value|Default

DB-Library value| +|-----------------|--------------------|--------------------------|---------------------------------------|-----------------------------------| +|ANSI_NULLS|ON|ON|ON|OFF| +|ANSI_PADDING|ON|ON|ON|OFF| +|ANSI_WARNINGS1|ON|ON|ON|OFF| +|ARITHABORT|ON|ON|OFF|OFF| +|CONCAT_NULL_YIELDS_NULL|ON|ON|ON|OFF| +|NUMERIC_ROUNDABORT|OFF|OFF|OFF|OFF| +|QUOTED_IDENTIFIER|ON|ON|ON|OFF| | | | | | | - -1 Setting `ANSI_WARNINGS` to ON implicitly sets `ARITHABORT` to ON. - -If you are using an OLE DB or ODBC server connection, the only value that must be modified is the `ARITHABORT` setting. All DB-Library values must be set correctly either at the server level by using **sp_configure** or from the application by using the SET command. - -> [!IMPORTANT] -> We strongly recommend that you set the `ARITHABORT` user option to ON server-wide as soon as the first indexed view or index on a computed column is created in any database on the server. - -### Deterministic Views -The definition of an indexed view must be deterministic. A view is deterministic if all expressions in the select list, as well as the `WHERE` and `GROUP BY` clauses, are deterministic. Deterministic expressions always return the same result any time they are evaluated with a specific set of input values. Only deterministic functions can participate in deterministic expressions. For example, the `DATEADD` function is deterministic because it always returns the same result for any given set of argument values for its three parameters. `GETDATE` is not deterministic because it is always invoked with the same argument, but the value it returns changes each time it is executed. - -To determine whether a view column is deterministic, use the **IsDeterministic** property of the [COLUMNPROPERTY](../../t-sql/functions/columnproperty-transact-sql.md) function. To determine if a deterministic column in a view with schema binding is precise, use the **IsPrecise** property of the `COLUMNPROPERTY` function. `COLUMNPROPERTY` returns 1 if TRUE, 0 if FALSE, and NULL for input that is not valid. This means the column is not deterministic or not precise. - -Even if an expression is deterministic, if it contains float expressions, the exact result may depend on the processor architecture or version of microcode. To ensure data integrity, such expressions can participate only as non-key columns of indexed views. Deterministic expressions that do not contain float expressions are called precise. Only precise deterministic expressions can participate in key columns and in `WHERE` or `GROUP BY` clauses of indexed views. -### Additional Requirements -In addition to the SET options and deterministic function requirements, the following requirements must be met: - -- The user that executes `CREATE INDEX` must be the owner of the view. - -- When you create the index, the `IGNORE_DUP_KEY` option must be set to OFF (the default setting). - -- Tables must be referenced by two-part names, _schema_**.**_tablename_ in the view definition. - -- User-defined functions referenced in the view must be created by using the `WITH SCHEMABINDING` option. - -- Any user-defined functions referenced in the view must be referenced by two-part names, _\_**.**_\_. - -- The data access property of a user-defined function must be `NO SQL`, and external access property must be `NO`. - -- Common language runtime (CLR) functions can appear in the select list of the view, but cannot be part of the definition of the clustered index key. CLR functions cannot appear in the WHERE clause of the view or the ON clause of a JOIN operation in the view. - -- CLR functions and methods of CLR user-defined types used in the view definition must have the properties set as shown in the following table. - - |Property|Note| - |--------------|----------| - |DETERMINISTIC = TRUE|Must be declared explicitly as an attribute of the Microsoft .NET Framework method.| - |PRECISE = TRUE|Must be declared explicitly as an attribute of the .NET Framework method.| - |DATA ACCESS = NO SQL|Determined by setting DataAccess attribute to DataAccessKind.None and SystemDataAccess attribute to SystemDataAccessKind.None.| - |EXTERNAL ACCESS = NO|This property defaults to NO for CLR routines.| - | | | - -- The view must be created by using the `WITH SCHEMABINDING` option. - -- The view must reference only base tables that are in the same database as the view. The view cannot reference other views. - -- The SELECT statement in the view definition must not contain the following Transact-SQL elements: - - |||| - |-|-|-| - |`COUNT`|ROWSET functions (`OPENDATASOURCE`, `OPENQUERY`, `OPENROWSET`, AND `OPENXML`)|`OUTER` joins (`LEFT`, `RIGHT`, or `FULL`)| - |Derived table (defined by specifying a `SELECT` statement in the `FROM` clause)|Self-joins|Specifying columns by using `SELECT *` or `SELECT .*`| - |`DISTINCT`|`STDEV`, `STDEVP`, `VAR`, `VARP`, or `AVG`|Common table expression (CTE)| - |**float**1, **text**, **ntext**, **image**, **XML**, or **filestream** columns|Subquery|`OVER` clause, which includes ranking or aggregate window functions| - |Full-text predicates (`CONTAINS`, `FREETEXT`)|`SUM` function that references a nullable expression|`ORDER BY`| - |CLR user-defined aggregate function|`TOP`|`CUBE`, `ROLLUP`, or `GROUPING SETS` operators| - |`MIN`, `MAX`|`UNION`, `EXCEPT`, or `INTERSECT` operators|`TABLESAMPLE`| - |Table variables|`OUTER APPLY` or `CROSS APPLY`|`PIVOT`, `UNPIVOT`| - |Sparse column sets|Inline (TVF) or multi-statement table-valued functions (MSTVF)|`OFFSET`| - |`CHECKSUM_AGG`||| - | | | | - - 1 The indexed view can contain **float** columns; however, such columns cannot be included in the clustered index key. - -- If `GROUP BY` is present, the VIEW definition must contain `COUNT_BIG(*)` and must not contain `HAVING`. These `GROUP BY` restrictions are applicable only to the indexed view definition. A query can use an indexed view in its execution plan even if it does not satisfy these `GROUP BY` restrictions. - -- If the view definition contains a `GROUP BY` clause, the key of the unique clustered index can reference only the columns specified in the `GROUP BY` clause. - -> [!IMPORTANT] -> Indexed views are not supported on top of temporal queries (queries that use `FOR SYSTEM_TIME` clause). +1 Setting `ANSI_WARNINGS` to ON implicitly sets `ARITHABORT` to ON. + +If you are using an OLE DB or ODBC server connection, the only value that must be modified is the `ARITHABORT` setting. All DB-Library values must be set correctly either at the server level by using **sp_configure** or from the application by using the SET command. + +> [!IMPORTANT] +> We strongly recommend that you set the `ARITHABORT` user option to ON server-wide as soon as the first indexed view or index on a computed column is created in any database on the server. -### Recommendations - When you refer to **datetime** and **smalldatetime** string literals in indexed views, we recommend that you explicitly convert the literal to the date type you want by using a deterministic date format style. For a list of the date format styles that are deterministic, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md). For more information about deterministic and nondeterministic expressions, see the [Considerations](#nondeterministic) section in this page. +### Deterministic Views + +The definition of an indexed view must be deterministic. A view is deterministic if all expressions in the select list, as well as the `WHERE` and `GROUP BY` clauses, are deterministic. Deterministic expressions always return the same result any time they are evaluated with a specific set of input values. Only deterministic functions can participate in deterministic expressions. For example, the `DATEADD` function is deterministic because it always returns the same result for any given set of argument values for its three parameters. `GETDATE` is not deterministic because it is always invoked with the same argument, but the value it returns changes each time it is executed. + +To determine whether a view column is deterministic, use the **IsDeterministic** property of the [COLUMNPROPERTY](../../t-sql/functions/columnproperty-transact-sql.md) function. To determine if a deterministic column in a view with schema binding is precise, use the **IsPrecise** property of the `COLUMNPROPERTY` function. `COLUMNPROPERTY` returns 1 if TRUE, 0 if FALSE, and NULL for input that is not valid. This means the column is not deterministic or not precise. + +Even if an expression is deterministic, if it contains float expressions, the exact result may depend on the processor architecture or version of microcode. To ensure data integrity, such expressions can participate only as non-key columns of indexed views. Deterministic expressions that do not contain float expressions are called precise. Only precise deterministic expressions can participate in key columns and in `WHERE` or `GROUP BY` clauses of indexed views. + +### Additional Requirements + +In addition to the SET options and deterministic function requirements, the following requirements must be met: + +- The user that executes `CREATE INDEX` must be the owner of the view. +- When you create the index, the `IGNORE_DUP_KEY` option must be set to OFF (the default setting). +- Tables must be referenced by two-part names, _schema_**.**_tablename_ in the view definition. +- User-defined functions referenced in the view must be created by using the `WITH SCHEMABINDING` option. +- Any user-defined functions referenced in the view must be referenced by two-part names, _\_**.**_\_. +- The data access property of a user-defined function must be `NO SQL`, and external access property must be `NO`. +- Common language runtime (CLR) functions can appear in the select list of the view, but cannot be part of the definition of the clustered index key. CLR functions cannot appear in the WHERE clause of the view or the ON clause of a JOIN operation in the view. +- CLR functions and methods of CLR user-defined types used in the view definition must have the properties set as shown in the following table. + + |Property|Note| + |--------------|----------| + |DETERMINISTIC = TRUE|Must be declared explicitly as an attribute of the Microsoft .NET Framework method.| + |PRECISE = TRUE|Must be declared explicitly as an attribute of the .NET Framework method.| + |DATA ACCESS = NO SQL|Determined by setting DataAccess attribute to DataAccessKind.None and SystemDataAccess attribute to SystemDataAccessKind.None.| + |EXTERNAL ACCESS = NO|This property defaults to NO for CLR routines.| + | | | + +- The view must be created by using the `WITH SCHEMABINDING` option. +- The view must reference only base tables that are in the same database as the view. The view cannot reference other views. +- The SELECT statement in the view definition must not contain the following Transact-SQL elements: + + |||| + |-|-|-| + |`COUNT`|ROWSET functions (`OPENDATASOURCE`, `OPENQUERY`, `OPENROWSET`, AND `OPENXML`)|`OUTER` joins (`LEFT`, `RIGHT`, or `FULL`)| + |Derived table (defined by specifying a `SELECT` statement in the `FROM` clause)|Self-joins|Specifying columns by using `SELECT *` or `SELECT .*`| + |`DISTINCT`|`STDEV`, `STDEVP`, `VAR`, `VARP`, or `AVG`|Common table expression (CTE)| + |**float**1, **text**, **ntext**, **image**, **XML**, or **filestream** columns|Subquery|`OVER` clause, which includes ranking or aggregate window functions| + |Full-text predicates (`CONTAINS`, `FREETEXT`)|`SUM` function that references a nullable expression|`ORDER BY`| + |CLR user-defined aggregate function|`TOP`|`CUBE`, `ROLLUP`, or `GROUPING SETS` operators| + |`MIN`, `MAX`|`UNION`, `EXCEPT`, or `INTERSECT` operators|`TABLESAMPLE`| + |Table variables|`OUTER APPLY` or `CROSS APPLY`|`PIVOT`, `UNPIVOT`| + |Sparse column sets|Inline (TVF) or multi-statement table-valued functions (MSTVF)|`OFFSET`| + |`CHECKSUM_AGG`||| + | | | | + + 1 The indexed view can contain **float** columns; however, such columns cannot be included in the clustered index key. + +- If `GROUP BY` is present, the VIEW definition must contain `COUNT_BIG(*)` and must not contain `HAVING`. These `GROUP BY` restrictions are applicable only to the indexed view definition. A query can use an indexed view in its execution plan even if it does not satisfy these `GROUP BY` restrictions. +- If the view definition contains a `GROUP BY` clause, the key of the unique clustered index can reference only the columns specified in the `GROUP BY` clause. + +> [!IMPORTANT] +> Indexed views are not supported on top of temporal queries (queries that use `FOR SYSTEM_TIME` clause). + +### Recommendations + +When you refer to **datetime** and **smalldatetime** string literals in indexed views, we recommend that you explicitly convert the literal to the date type you want by using a deterministic date format style. For a list of the date format styles that are deterministic, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md). For more information about deterministic and nondeterministic expressions, see the [Considerations](#nondeterministic) section in this page. When you execute DML (such as `UPDATE`, `DELETE` or `INSERT`) on a table referenced by a large number of indexed views, or fewer but very complex indexed views, those indexed views will have to be updated as well during DML execution. As a result, DML query performance may degrade significantly, or in some cases, a query plan cannot even be produced. In such scenarios, test your DML queries before production use, analyze the query plan and tune/simplify the DML statement. - -### Considerations - The setting of the **large_value_types_out_of_row** option of columns in an indexed view is inherited from the setting of the corresponding column in the base table. This value is set by using [sp_tableoption](../../relational-databases/system-stored-procedures/sp-tableoption-transact-sql.md). The default setting for columns formed from expressions is 0. This means that large value types are stored in-row. - - Indexed views can be created on a partitioned table, and can themselves be partitioned. - - To prevent the [!INCLUDE[ssDE](../../includes/ssde-md.md)] from using indexed views, include the `OPTION (EXPAND VIEWS)` hint on the query. Also, if any of the listed options are incorrectly set, this will prevent the optimizer from using the indexes on the views. For more information about the `OPTION (EXPAND VIEWS)` hint, see [SELECT (Transact-SQL)](../../t-sql/queries/select-transact-sql.md). - - All indexes on a view are dropped when the view is dropped. All nonclustered indexes and auto-created statistics on the view are dropped when the clustered index is dropped. User-created statistics on the view are maintained. Nonclustered indexes can be individually dropped. Dropping the clustered index on the view removes the stored result set, and the optimizer returns to processing the view like a standard view. - - Indexes on tables and views can be disabled. When a clustered index on a table is disabled, indexes on views associated with the table are also disabled. - + +### Considerations + +The setting of the **large_value_types_out_of_row** option of columns in an indexed view is inherited from the setting of the corresponding column in the base table. This value is set by using [sp_tableoption](../../relational-databases/system-stored-procedures/sp-tableoption-transact-sql.md). The default setting for columns formed from expressions is 0. This means that large value types are stored in-row. + +Indexed views can be created on a partitioned table, and can themselves be partitioned. + +To prevent the [!INCLUDE[ssDE](../../includes/ssde-md.md)] from using indexed views, include the `OPTION (EXPAND VIEWS)` hint on the query. Also, if any of the listed options are incorrectly set, this will prevent the optimizer from using the indexes on the views. For more information about the `OPTION (EXPAND VIEWS)` hint, see [SELECT (Transact-SQL)](../../t-sql/queries/select-transact-sql.md). + +All indexes on a view are dropped when the view is dropped. All nonclustered indexes and auto-created statistics on the view are dropped when the clustered index is dropped. User-created statistics on the view are maintained. Nonclustered indexes can be individually dropped. Dropping the clustered index on the view removes the stored result set, and the optimizer returns to processing the view like a standard view. + +Indexes on tables and views can be disabled. When a clustered index on a table is disabled, indexes on views associated with the table are also disabled. + Expressions that involve implicit conversion of character strings to **datetime** or **smalldatetime** are considered nondeterministic. For more information, see [Nondeterministic conversion of literal date strings into DATE values](../../t-sql/data-types/nondeterministic-convert-date-literals.md). +### Security -### Security - -#### Permissions - Requires **CREATE VIEW** permission in the database and **ALTER** permission on the schema in which the view is being created. - -## Using Transact-SQL - -#### To create an indexed view - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a view and an index on that view. Two queries are included that use the indexed view. - - ```sql - USE AdventureWorks2012; - GO - --Set the options to support indexed views. - SET NUMERIC_ROUNDABORT OFF; - SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, - QUOTED_IDENTIFIER, ANSI_NULLS ON; - GO - --Create view with schemabinding. - IF OBJECT_ID ('Sales.vOrders', 'view') IS NOT NULL - DROP VIEW Sales.vOrders ; - GO - CREATE VIEW Sales.vOrders - WITH SCHEMABINDING - AS - SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Revenue, - OrderDate, ProductID, COUNT_BIG(*) AS COUNT - FROM Sales.SalesOrderDetail AS od, Sales.SalesOrderHeader AS o - WHERE od.SalesOrderID = o.SalesOrderID - GROUP BY OrderDate, ProductID; - GO - --Create an index on the view. - CREATE UNIQUE CLUSTERED INDEX IDX_V1 - ON Sales.vOrders (OrderDate, ProductID); - GO - --This query can use the indexed view even though the view is - --not specified in the FROM clause. - SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Rev, - OrderDate, ProductID - FROM Sales.SalesOrderDetail AS od - JOIN Sales.SalesOrderHeader AS o ON od.SalesOrderID=o.SalesOrderID - AND ProductID BETWEEN 700 and 800 - AND OrderDate >= CONVERT(datetime,'05/01/2002',101) - GROUP BY OrderDate, ProductID - ORDER BY Rev DESC; - GO - --This query can use the above indexed view. - SELECT OrderDate, SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Rev - FROM Sales.SalesOrderDetail AS od - JOIN Sales.SalesOrderHeader AS o ON od.SalesOrderID=o.SalesOrderID - AND DATEPART(mm,OrderDate)= 3 - AND DATEPART(yy,OrderDate) = 2002 - GROUP BY OrderDate - ORDER BY OrderDate ASC; - GO - ``` - -For more information, see [CREATE VIEW (Transact-SQL)](../../t-sql/statements/create-view-transact-sql.md). - -## See Also - [CREATE INDEX (Transact-SQL)](../../t-sql/statements/create-index-transact-sql.md) - [SET ANSI_NULLS (Transact-SQL)](../../t-sql/statements/set-ansi-nulls-transact-sql.md) - [SET ANSI_PADDING (Transact-SQL)](../../t-sql/statements/set-ansi-padding-transact-sql.md) - [SET ANSI_WARNINGS (Transact-SQL)](../../t-sql/statements/set-ansi-warnings-transact-sql.md) - [SET ARITHABORT (Transact-SQL)](../../t-sql/statements/set-arithabort-transact-sql.md) - [SET CONCAT_NULL_YIELDS_NULL (Transact-SQL)](../../t-sql/statements/set-concat-null-yields-null-transact-sql.md) - [SET NUMERIC_ROUNDABORT (Transact-SQL)](../../t-sql/statements/set-numeric-roundabort-transact-sql.md) - [SET QUOTED_IDENTIFIER (Transact-SQL)](../../t-sql/statements/set-quoted-identifier-transact-sql.md) - - +#### Permissions + +Requires **CREATE VIEW** permission in the database and **ALTER** permission on the schema in which the view is being created. + +## Using Transact-SQL + +### To create an indexed view + +The following example creates a view and an index on that view. Two queries are included that use the indexed view in the AdventureWorks database. + +```sql +--Set the options to support indexed views. +SET NUMERIC_ROUNDABORT OFF; +SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, + QUOTED_IDENTIFIER, ANSI_NULLS ON; +--Create view with schemabinding. +IF OBJECT_ID ('Sales.vOrders', 'view') IS NOT NULL + DROP VIEW Sales.vOrders ; +GO +CREATE VIEW Sales.vOrders + WITH SCHEMABINDING + AS + SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Revenue, + OrderDate, ProductID, COUNT_BIG(*) AS COUNT + FROM Sales.SalesOrderDetail AS od, Sales.SalesOrderHeader AS o + WHERE od.SalesOrderID = o.SalesOrderID + GROUP BY OrderDate, ProductID; +GO +--Create an index on the view. +CREATE UNIQUE CLUSTERED INDEX IDX_V1 + ON Sales.vOrders (OrderDate, ProductID); +GO +--This query can use the indexed view even though the view is +--not specified in the FROM clause. +SELECT SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Rev, + OrderDate, ProductID +FROM Sales.SalesOrderDetail AS od +JOIN Sales.SalesOrderHeader AS o + ON od.SalesOrderID=o.SalesOrderID + AND ProductID BETWEEN 700 and 800 + AND OrderDate >= CONVERT(datetime,'05/01/2002',101) + GROUP BY OrderDate, ProductID + ORDER BY Rev DESC; +GO +--This query can use the above indexed view. +SELECT OrderDate, SUM(UnitPrice*OrderQty*(1.00-UnitPriceDiscount)) AS Rev +FROM Sales.SalesOrderDetail AS od +JOIN Sales.SalesOrderHeader AS o + ON od.SalesOrderID=o.SalesOrderID + AND DATEPART(mm,OrderDate)= 3 + AND DATEPART(yy,OrderDate) = 2002 + GROUP BY OrderDate + ORDER BY OrderDate ASC; +``` + +For more information, see [CREATE VIEW (Transact-SQL)](../../t-sql/statements/create-view-transact-sql.md). + +## See Also + +- [CREATE INDEX](../../t-sql/statements/create-index-transact-sql.md) +- [SET ANSI_NULLS](../../t-sql/statements/set-ansi-nulls-transact-sql.md) +- [SET ANSI_PADDING](../../t-sql/statements/set-ansi-padding-transact-sql.md) +- [SET ANSI_WARNINGS](../../t-sql/statements/set-ansi-warnings-transact-sql.md) +- [SET ARITHABORT](../../t-sql/statements/set-arithabort-transact-sql.md) +- [SET CONCAT_NULL_YIELDS_NULL](../../t-sql/statements/set-concat-null-yields-null-transact-sql.md) +- [SET NUMERIC_ROUNDABORT](../../t-sql/statements/set-numeric-roundabort-transact-sql.md) +- [SET QUOTED_IDENTIFIER](../../t-sql/statements/set-quoted-identifier-transact-sql.md) From 6491ac32f30c21dbbda9e803cb21e19714b8863c Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 15:56:08 -0700 Subject: [PATCH 10/46] more --- ...table-valued-parameters-database-engine.md | 197 +++++++++--------- 1 file changed, 94 insertions(+), 103 deletions(-) diff --git a/docs/relational-databases/tables/use-table-valued-parameters-database-engine.md b/docs/relational-databases/tables/use-table-valued-parameters-database-engine.md index 377d6f1ee5a..37e833d0773 100644 --- a/docs/relational-databases/tables/use-table-valued-parameters-database-engine.md +++ b/docs/relational-databases/tables/use-table-valued-parameters-database-engine.md @@ -19,108 +19,99 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Use Table-Valued Parameters (Database Engine) + [!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] - Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a [!INCLUDE[tsql](../../includes/tsql-md.md)] statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters. - - Table-valued parameters are like parameter arrays in OLE DB and ODBC, but offer more flexibility and closer integration with [!INCLUDE[tsql](../../includes/tsql-md.md)]. Table-valued parameters also have the benefit of being able to participate in set-based operations. - - [!INCLUDE[tsql](../../includes/tsql-md.md)] passes table-valued parameters to routines by reference to avoid making a copy of the input data. You can create and execute [!INCLUDE[tsql](../../includes/tsql-md.md)] routines with table-valued parameters, and call them from [!INCLUDE[tsql](../../includes/tsql-md.md)] code, managed and native clients in any managed language. - - **In This Topic:** - - [Benefits](#Benefits) - - [Restrictions](#Restrictions) - - [Table-Valued Parameters vs. BULK INSERT Operations](#BulkInsert) - - [Example](#Example) - -## Benefits - A table-valued parameter is scoped to the stored procedure, function, or dynamic [!INCLUDE[tsql](../../includes/tsql-md.md)] text, exactly like other parameters. Similarly, a variable of table type has scope like any other local variable that is created by using a DECLARE statement. You can declare table-valued variables within dynamic [!INCLUDE[tsql](../../includes/tsql-md.md)] statements and pass these variables as table-valued parameters to stored procedures and functions. - - Table-valued parameters offer more flexibility and in some cases better performance than temporary tables or other ways to pass a list of parameters. Table-valued parameters offer the following benefits: - -- Do not acquire locks for the initial population of data from a client. - -- Provide a simple programming model. - -- Enable you to include complex business logic in a single routine. - -- Reduce round trips to the server. - -- Can have a table structure of different cardinality. - -- Are strongly typed. - -- Enable the client to specify sort order and unique keys. - -- Are cached like a temp table when used in a stored procedure. Starting with [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)], table-valued parameters are also cached for parameterized queries. - -## Restrictions - Table-valued parameters have the following restrictions: - -- [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] does not maintain statistics on columns of table-valued parameters. - -- Table-valued parameters must be passed as input READONLY parameters to [!INCLUDE[tsql](../../includes/tsql-md.md)] routines. You cannot perform DML operations such as UPDATE, DELETE, or INSERT on a table-valued parameter in the body of a routine. - -- You cannot use a table-valued parameter as target of a SELECT INTO or INSERT EXEC statement. A table-valued parameter can be in the FROM clause of SELECT INTO or in the INSERT EXEC string or stored procedure. - -## Table-Valued Parameters vs. BULK INSERT Operations - Using table-valued parameters is comparable to other ways of using set-based variables; however, using table-valued parameters frequently can be faster for large data sets. Compared to bulk operations that have a greater startup cost than table-valued parameters, table-valued parameters perform well for inserting less than 1000 rows. - - Table-valued parameters that are reused benefit from temporary table caching. This table caching enables better scalability than equivalent BULK INSERT operations. By using small row-insert operations a small performance benefit might be gained by using parameter lists or batched statements instead of BULK INSERT operations or table-valued parameters. However, these methods are less convenient to program, and performance decreases quickly as rows increase. - - Table-valued parameters perform equally well or better than an equivalent parameter array implementation. - -## Example - The following example uses [!INCLUDE[tsql](../../includes/tsql-md.md)] and shows you how to create a table-valued parameter type, declare a variable to reference it, fill the parameter list, and then pass the values to a stored procedure. - -``` -USE AdventureWorks2012; -GO - -/* Create a table type. */ -CREATE TYPE LocationTableType AS TABLE -( LocationName VARCHAR(50) -, CostRate INT ); -GO - -/* Create a procedure to receive data for the table-valued parameter. */ -CREATE PROCEDURE dbo. usp_InsertProductionLocation - @TVP LocationTableType READONLY - AS - SET NOCOUNT ON - INSERT INTO AdventureWorks2012.Production.Location - (Name - ,CostRate - ,Availability - ,ModifiedDate) - SELECT *, 0, GETDATE() - FROM @TVP; - GO - -/* Declare a variable that references the type. */ -DECLARE @LocationTVP AS LocationTableType; - -/* Add data to the table variable. */ -INSERT INTO @LocationTVP (LocationName, CostRate) - SELECT Name, 0.00 - FROM AdventureWorks2012.Person.StateProvince; - -/* Pass the table variable data to a stored procedure. */ -EXEC usp_InsertProductionLocation @LocationTVP; -GO -``` - -## See Also - [CREATE TYPE (Transact-SQL)](../../t-sql/statements/create-type-transact-sql.md) - [DECLARE @local_variable (Transact-SQL)](../../t-sql/language-elements/declare-local-variable-transact-sql.md) - [sys.types (Transact-SQL)](../../relational-databases/system-catalog-views/sys-types-transact-sql.md) - [sys.parameters (Transact-SQL)](../../relational-databases/system-catalog-views/sys-parameters-transact-sql.md) - [sys.parameter_type_usages (Transact-SQL)](../../relational-databases/system-catalog-views/sys-parameter-type-usages-transact-sql.md) - [CREATE PROCEDURE (Transact-SQL)](../../t-sql/statements/create-procedure-transact-sql.md) - [CREATE FUNCTION (Transact-SQL)](../../t-sql/statements/create-function-transact-sql.md) - - +Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a [!INCLUDE[tsql](../../includes/tsql-md.md)] statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters. + +Table-valued parameters are like parameter arrays in OLE DB and ODBC, but offer more flexibility and closer integration with [!INCLUDE[tsql](../../includes/tsql-md.md)]. Table-valued parameters also have the benefit of being able to participate in set-based operations. + +[!INCLUDE[tsql](../../includes/tsql-md.md)] passes table-valued parameters to routines by reference to avoid making a copy of the input data. You can create and execute [!INCLUDE[tsql](../../includes/tsql-md.md)] routines with table-valued parameters, and call them from [!INCLUDE[tsql](../../includes/tsql-md.md)] code, managed and native clients in any managed language. + + **In This Topic:** + +[Benefits](#Benefits) + +[Restrictions](#Restrictions) + +[Table-Valued Parameters vs. BULK INSERT Operations](#BulkInsert) + +[Example](#Example) + +## Benefits + +A table-valued parameter is scoped to the stored procedure, function, or dynamic [!INCLUDE[tsql](../../includes/tsql-md.md)] text, exactly like other parameters. Similarly, a variable of table type has scope like any other local variable that is created by using a DECLARE statement. You can declare table-valued variables within dynamic [!INCLUDE[tsql](../../includes/tsql-md.md)] statements and pass these variables as table-valued parameters to stored procedures and functions. + +Table-valued parameters offer more flexibility and in some cases better performance than temporary tables or other ways to pass a list of parameters. Table-valued parameters offer the following benefits: + +- Do not acquire locks for the initial population of data from a client. +- Provide a simple programming model. +- Enable you to include complex business logic in a single routine. +- Reduce round trips to the server. +- Can have a table structure of different cardinality. +- Are strongly typed. +- Enable the client to specify sort order and unique keys. +- Are cached like a temp table when used in a stored procedure. Starting with [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)], table-valued parameters are also cached for parameterized queries. + +## Restrictions + +Table-valued parameters have the following restrictions: + +- [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] does not maintain statistics on columns of table-valued parameters. +- Table-valued parameters must be passed as input READONLY parameters to [!INCLUDE[tsql](../../includes/tsql-md.md)] routines. You cannot perform DML operations such as UPDATE, DELETE, or INSERT on a table-valued parameter in the body of a routine. +- You cannot use a table-valued parameter as target of a SELECT INTO or INSERT EXEC statement. A table-valued parameter can be in the FROM clause of SELECT INTO or in the INSERT EXEC string or stored procedure. + +## Table-Valued Parameters vs. BULK INSERT Operations + +Using table-valued parameters is comparable to other ways of using set-based variables; however, using table-valued parameters frequently can be faster for large data sets. Compared to bulk operations that have a greater startup cost than table-valued parameters, table-valued parameters perform well for inserting less than 1000 rows. + +Table-valued parameters that are reused benefit from temporary table caching. This table caching enables better scalability than equivalent BULK INSERT operations. By using small row-insert operations a small performance benefit might be gained by using parameter lists or batched statements instead of BULK INSERT operations or table-valued parameters. However, these methods are less convenient to program, and performance decreases quickly as rows increase. + +Table-valued parameters perform equally well or better than an equivalent parameter array implementation. + +## Example + +The following example uses [!INCLUDE[tsql](../../includes/tsql-md.md)] and shows you how to create a table-valued parameter type, declare a variable to reference it, fill the parameter list, and then pass the values to a stored procedure in the AdventureWorks database. + +```sql +/* Create a table type. */ +CREATE TYPE LocationTableType + AS TABLE + ( LocationName VARCHAR(50) + , CostRate INT ); +GO +/* Create a procedure to receive data for the table-valued parameter. */ +CREATE PROCEDURE dbo. usp_InsertProductionLocation + @TVP LocationTableType READONLY + AS + SET NOCOUNT ON + INSERT INTO AdventureWorks2012.Production.Location + ( + Name + , CostRate + , Availability + , ModifiedDate + ) + SELECT *, 0, GETDATE() + FROM @TVP; +GO +/* Declare a variable that references the type. */ +DECLARE @LocationTVP AS LocationTableType; +/* Add data to the table variable. */ +INSERT INTO @LocationTVP (LocationName, CostRate) + SELECT Name, 0.00 + FROM AdventureWorks2012.Person.StateProvince; + +/* Pass the table variable data to a stored procedure. */ +EXEC usp_InsertProductionLocation @LocationTVP; +``` + +## See Also + +- [CREATE TYPE](../../t-sql/statements/create-type-transact-sql.md) +- [DECLARE @local_variable](../../t-sql/language-elements/declare-local-variable-transact-sql.md) +- [sys.types](../../relational-databases/system-catalog-views/sys-types-transact-sql.md) +- [sys.parameters](../../relational-databases/system-catalog-views/sys-parameters-transact-sql.md) +- [sys.parameter_type_usages](../../relational-databases/system-catalog-views/sys-parameter-type-usages-transact-sql.md) +- [CREATE PROCEDURE](../../t-sql/statements/create-procedure-transact-sql.md) +- [CREATE FUNCTION](../../t-sql/statements/create-function-transact-sql.md) From 01601df6915e390df90eaf803910b5565dd04ad9 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 16:11:27 -0700 Subject: [PATCH 11/46] more --- .../create-foreign-key-relationships.md | 217 ++++++++---------- 1 file changed, 97 insertions(+), 120 deletions(-) diff --git a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md index 669b98553d0..75143ccf345 100644 --- a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md +++ b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md @@ -14,123 +14,100 @@ ms.author: sstein manager: craigg --- # Create Foreign Key Relationships - This topic describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To Create Foreign Key Relationships by using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. - -- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. - -- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER (Transact-SQL)](/sql/t-sql/statements/create-trigger-transact-sql). - -- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. - -- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. - -- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. - -- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. We recommend that a table contain no more than 253 FOREIGN KEY constraints, and that it be referenced by no more than 253 FOREIGN KEY constraints. - -- FOREIGN KEY constraints are not enforced on temporary tables. - -- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). - -- A column of type `varchar(max)` can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type `varchar(max)`. - -### Security - -#### Permissions - Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - - Creating a foreign key in an existing table requires ALTER permission on the table. - -## Using SQL Server Management Studio - -#### To create a foreign key relationship in Table Designer - -1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. - - The table opens in **Table Designer**. - -2. From the **Table Designer** menu, click **Relationships**. - -3. In the **Foreign-key Relationships** dialog box, click **Add**. - - The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. - -4. Click the relationship in the **Selected Relationship** list. - -5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. - -6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. - -7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. - - **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. - -8. Choose **OK** to create the relationship. - -## Using Transact-SQL - -#### To create a foreign key in a new table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. - - ``` - USE AdventureWorks2012; - GO - CREATE TABLE Sales.TempSalesReason (TempID int NOT NULL, Name nvarchar(50), - CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID), - CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE - );GO - - ``` - -#### To create a foreign key in an existing table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table. - - ``` - USE AdventureWorks2012; - GO - ALTER TABLE Sales.TempSalesReason - ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE - ; - GO - - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). - - + +This topic describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. + +**In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To Create Foreign Key Relationships by using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. +- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. +- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER](/sql/t-sql/statements/create-trigger-transact-sql). +- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. +- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. +- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. +- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. We recommend that a table contain no more than 253 FOREIGN KEY constraints, and that it be referenced by no more than 253 FOREIGN KEY constraints. +- FOREIGN KEY constraints are not enforced on temporary tables. +- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). +- A column of type `varchar(max)` can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type `varchar(max)`. + +### Security + +#### Permissions + +Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + +Creating a foreign key in an existing table requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To create a foreign key relationship in Table Designer + +1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. + + The table opens in **Table Designer**. +2. From the **Table Designer** menu, click **Relationships**. +3. In the **Foreign-key Relationships** dialog box, click **Add**. + + The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. +4. Click the relationship in the **Selected Relationship** list. +5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. +6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. +7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. + + **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. +8. Choose **OK** to create the relationship. + +## Using Transact-SQL + +### To create a foreign key in a new table + +The following example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table in the Adventure Works database. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. + +```sql +CREATE TABLE Sales.TempSalesReason + ( + TempID int NOT NULL + , Name nvarchar(50) + , CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID) + , CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE + ) +; +``` + +### To create a foreign key in an existing table + +The following example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table in the AdventureWorks database. + +```sql +ALTER TABLE Sales.TempSalesReason + ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE +; +``` + +For more information, see: + +- [ALTER TABLE](/sql/t-sql/statements/alter-table-transact-sql) +- [CREATE TABLE](/sql/t-sql/statements/create-table-transact-sql) +- [Table_constraint](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). From 59f4b18c796e96cc49bb2f122e44fb98270b8aea Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:03:29 -0700 Subject: [PATCH 12/46] more --- .../codesnippet/tsql/modify-an-index_1.sql | 6 +- .../codesnippet/tsql/modify-an-index_2.sql | 6 +- .../tsql/perform-index-operations_1.sql | 3 - .../tsql/reorganize-and-rebuild-i_1.sql | 6 +- .../tsql/reorganize-and-rebuild-i_2.sql | 6 +- .../codesnippet/tsql/set-index-options_1.sql | 6 +- .../codesnippet/tsql/set-index-options_2.sql | 12 +- .../indexes/modify-an-index.md | 6 +- .../perform-index-operations-online.md | 29 +- .../indexes/reorganize-and-rebuild-indexes.md | 489 ++++++++---------- .../indexes/set-index-options.md | 70 ++- 11 files changed, 279 insertions(+), 360 deletions(-) diff --git a/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_1.sql b/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_1.sql index 951707f8a01..319ccdd8a7f 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_1.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_1.sql @@ -1,8 +1,6 @@ -USE AdventureWorks2012; -GO CREATE NONCLUSTERED INDEX IX_WorkOrder_ProductID ON Production.WorkOrder(ProductID) WITH (FILLFACTOR = 80, PAD_INDEX = ON, - DROP_EXISTING = ON); -GO \ No newline at end of file + DROP_EXISTING = ON) +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_2.sql b/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_2.sql index bf1c828221d..0dc0a837f5c 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_2.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/modify-an-index_2.sql @@ -1,10 +1,8 @@ -USE AdventureWorks2012; -GO ALTER INDEX AK_SalesOrderHeader_SalesOrderNumber ON Sales.SalesOrderHeader SET ( STATISTICS_NORECOMPUTE = ON, IGNORE_DUP_KEY = ON, ALLOW_PAGE_LOCKS = ON - ) ; -GO \ No newline at end of file + ) +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql b/docs/relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql index fceb5bf85f3..9dd4861133c 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql @@ -1,5 +1,3 @@ -USE AdventureWorks2012; -GO --Create a clustered index on the PRIMARY filegroup if the index does not exist. IF NOT EXISTS (SELECT name FROM sys.indexes WHERE name = N'AK_BillOfMaterials_ProductAssemblyID_ComponentID_StartDate') @@ -46,4 +44,3 @@ FROM sys.indexes AS i JOIN sys.filegroups AS f ON i.data_space_id = f.data_space_id JOIN sys.tables as t ON i.object_id = t.object_id AND i.object_id = OBJECT_ID(N'Production.BillOfMaterials','U'); -GO \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql b/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql index e9a8d9af0eb..d36015b7e34 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql @@ -1,5 +1,3 @@ -USE AdventureWorks2012; -GO ALTER INDEX PK_Employee_BusinessEntityID ON HumanResources.Employee -REBUILD; -GO \ No newline at end of file +REBUILD +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql b/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql index dd4cb8bf975..d5ac3926980 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql @@ -1,6 +1,4 @@ -USE AdventureWorks2012; -GO ALTER INDEX ALL ON Production.Product REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON, - STATISTICS_NORECOMPUTE = ON); -GO \ No newline at end of file + STATISTICS_NORECOMPUTE = ON) +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql b/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql index bf1c828221d..0dc0a837f5c 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql @@ -1,10 +1,8 @@ -USE AdventureWorks2012; -GO ALTER INDEX AK_SalesOrderHeader_SalesOrderNumber ON Sales.SalesOrderHeader SET ( STATISTICS_NORECOMPUTE = ON, IGNORE_DUP_KEY = ON, ALLOW_PAGE_LOCKS = ON - ) ; -GO \ No newline at end of file + ) +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql b/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql index dd4cb8bf975..9236eb1b553 100644 --- a/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql +++ b/docs/relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql @@ -1,6 +1,8 @@ -USE AdventureWorks2012; -GO ALTER INDEX ALL ON Production.Product -REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON, - STATISTICS_NORECOMPUTE = ON); -GO \ No newline at end of file +REBUILD WITH + ( + FILLFACTOR = 80 + , SORT_IN_TEMPDB = ON + , STATISTICS_NORECOMPUTE = ON + ) +; \ No newline at end of file diff --git a/docs/relational-databases/indexes/modify-an-index.md b/docs/relational-databases/indexes/modify-an-index.md index a8c8aa90bc1..ee175abd627 100644 --- a/docs/relational-databases/indexes/modify-an-index.md +++ b/docs/relational-databases/indexes/modify-an-index.md @@ -55,11 +55,7 @@ monikerRange: "= azuresqldb-current || >= sql-server-2016 || = sqlallproducts-al #### To modify an index -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. This example drops and re-creates an existing index on the `ProductID` column of the `Production.WorkOrder` table by using the `DROP_EXISTING` option. The options `FILLFACTOR` and `PAD_INDEX` are also set. +The following example drops and re-creates an existing index on the `ProductID` column of the `Production.WorkOrder` table in the AdventureWorks database by using the `DROP_EXISTING` option. The options `FILLFACTOR` and `PAD_INDEX` are also set. [!code-sql[IndexDDL#CreateIndex4](../../relational-databases/indexes/codesnippet/tsql/modify-an-index_1.sql)] diff --git a/docs/relational-databases/indexes/perform-index-operations-online.md b/docs/relational-databases/indexes/perform-index-operations-online.md index f52d321fb3b..9e4916c985b 100644 --- a/docs/relational-databases/indexes/perform-index-operations-online.md +++ b/docs/relational-databases/indexes/perform-index-operations-online.md @@ -88,26 +88,19 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio ## Using Transact-SQL -#### To create, rebuild, or drop an index online +### To create, rebuild, or drop an index online -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. +The following example rebuilds an existing online index in the AdventureWorks database. -2. On the Standard bar, click **New Query**. + ```sql + ALTER INDEX AK_Employee_NationalIDNumber + ON HumanResources.Employee + REBUILD WITH (ONLINE = ON) +; +``` -3. Copy and paste the following example into the query window and click **Execute**. The example rebuilds an existing online - - ``` - USE AdventureWorks2012; - GO - ALTER INDEX AK_Employee_NationalIDNumber ON HumanResources.Employee - REBUILD WITH (ONLINE = ON); - GO - ``` - - The following example deletes a clustered index online and moves the resulting table (heap) to the filegroup `NewGroup` by using the `MOVE TO` clause. The `sys.indexes`, `sys.tables`, and `sys.filegroups` catalog views are queried to verify the index and table placement in the filegroups before and after the move. - - [!code-sql[IndexDDL#DropIndex4](../../relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql)] - - For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). +The following example deletes a clustered index online and moves the resulting table (heap) to the filegroup `NewGroup` by using the `MOVE TO` clause. The `sys.indexes`, `sys.tables`, and `sys.filegroups` catalog views are queried to verify the index and table placement in the filegroups before and after the move. +[!code-sql[IndexDDL#DropIndex4](../../relational-databases/indexes/codesnippet/tsql/perform-index-operations_1.sql)] +For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). diff --git a/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md b/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md index 5da47637c21..7b65837f4b0 100644 --- a/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md +++ b/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md @@ -34,288 +34,239 @@ manager: craigg monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Reorganize and Rebuild Indexes + [!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../../includes/appliesto-ss-asdb-asdw-pdw-md.md)] -This topic describes how to reorganize or rebuild a fragmented index in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] automatically modifies indexes whenever insert, update, or delete operations are made to the underlying data. Over time these modifications can cause the information in the index to become scattered in the database (fragmented). Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. Heavily fragmented indexes can degrade query performance and cause your application to respond slowly, especially scan operations. - -You can remedy index fragmentation by reorganizing or rebuilding an index. For partitioned indexes built on a partition scheme, you can use either of these methods on a complete index or a single partition of an index. -Rebuilding an index drops and re-creates the index. This removes fragmentation, reclaims disk space by compacting the pages based on the specified or existing fill factor setting, and reorders the index rows in contiguous pages. When `ALL` is specified, all indexes on the table are dropped and rebuilt in a single transaction. -Reorganizing an index uses minimal system resources. It defragments the leaf level of clustered and nonclustered indexes on tables and views by physically reordering the leaf-level pages to match the logical, left to right, order of the leaf nodes. Reorganizing also compacts the index pages. Compaction is based on the existing fill factor value. - -## Before You Begin - -### Detecting Fragmentation -The first step in deciding which defragmentation method to use is to analyze the index to determine the degree of fragmentation. By using the system function [sys.dm_db_index_physical_stats](../../relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql.md), you can detect fragmentation in a specific index, all indexes on a table or indexed view, all indexes in a database, or all indexes in all databases. For partitioned indexes, **sys.dm_db_index_physical_stats** also provides fragmentation information for each partition. - -The result set returned by the **sys.dm_db_index_physical_stats** function includes the following columns. - -|Column|Description| -|------------|-----------------| -|**avg_fragmentation_in_percent**|The percent of logical fragmentation (out-of-order pages in the index).| -|**fragment_count**|The number of fragments (physically consecutive leaf pages) in the index.| -|**avg_fragment_size_in_pages**|Average number of pages in one fragment in an index.| - -After the degree of fragmentation is known, use the following table to determine the best method to correct the fragmentation. - -|**avg_fragmentation_in_percent** value|Corrective statement| -|-----------------------------------------------|--------------------------| -|> 5% and < = 30%|ALTER INDEX REORGANIZE| -|> 30%|ALTER INDEX REBUILD WITH (ONLINE = ON) 1| - -1 Rebuilding an index can be executed online or offline. Reorganizing an index is always executed online. To achieve availability similar to the reorganize option, you should rebuild indexes online. - -These values provide a rough guideline for determining the point at which you should switch between `ALTER INDEX REORGANIZE` and `ALTER INDEX REBUILD`. However, the actual values may vary from case to case. It is important that you experiment to determine the best threshold for your environment. -Very low levels of fragmentation (less than 5 percent) should typically not be addressed by either of these commands, because the benefit from removing such a small amount of fragmentation is almost always vastly outweighed by the cost of reorganizing or rebuilding the index. For more information about `ALTER INDEX REORGANIZE` and `ALTER INDEX REBUILD`, refer to [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). - +This article describes how to reorganize or rebuild a fragmented index in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. The [!INCLUDE[ssDEnoversion](../../includes/ssdenoversion-md.md)] automatically modifies indexes whenever insert, update, or delete operations are made to the underlying data. Over time these modifications can cause the information in the index to become scattered in the database (fragmented). Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. Heavily fragmented indexes can degrade query performance and cause your application to respond slowly, especially scan operations. + +You can remedy index fragmentation by reorganizing or rebuilding an index. For partitioned indexes built on a partition scheme, you can use either of these methods on a complete index or a single partition of an index. +Rebuilding an index drops and re-creates the index. This removes fragmentation, reclaims disk space by compacting the pages based on the specified or existing fill factor setting, and reorders the index rows in contiguous pages. When `ALL` is specified, all indexes on the table are dropped and rebuilt in a single transaction. +Reorganizing an index uses minimal system resources. It defragments the leaf level of clustered and nonclustered indexes on tables and views by physically reordering the leaf-level pages to match the logical, left to right, order of the leaf nodes. Reorganizing also compacts the index pages. Compaction is based on the existing fill factor value. + +## Before You Begin + +### Detecting Fragmentation + +The first step in deciding which defragmentation method to use is to analyze the index to determine the degree of fragmentation. By using the system function [sys.dm_db_index_physical_stats](../../relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql.md), you can detect fragmentation in a specific index, all indexes on a table or indexed view, all indexes in a database, or all indexes in all databases. For partitioned indexes, **sys.dm_db_index_physical_stats** also provides fragmentation information for each partition. + +The result set returned by the **sys.dm_db_index_physical_stats** function includes the following columns. + +|Column|Description| +|------------|-----------------| +|**avg_fragmentation_in_percent**|The percent of logical fragmentation (out-of-order pages in the index).| +|**fragment_count**|The number of fragments (physically consecutive leaf pages) in the index.| +|**avg_fragment_size_in_pages**|Average number of pages in one fragment in an index.| + +After the degree of fragmentation is known, use the following table to determine the best method to correct the fragmentation. + +|**avg_fragmentation_in_percent** value|Corrective statement| +|-----------------------------------------------|--------------------------| +|> 5% and < = 30%|ALTER INDEX REORGANIZE| +|> 30%|ALTER INDEX REBUILD WITH (ONLINE = ON) 1| + +1 Rebuilding an index can be executed online or offline. Reorganizing an index is always executed online. To achieve availability similar to the reorganize option, you should rebuild indexes online. + +These values provide a rough guideline for determining the point at which you should switch between `ALTER INDEX REORGANIZE` and `ALTER INDEX REBUILD`. However, the actual values may vary from case to case. It is important that you experiment to determine the best threshold for your environment. +Very low levels of fragmentation (less than 5 percent) should typically not be addressed by either of these commands, because the benefit from removing such a small amount of fragmentation is almost always vastly outweighed by the cost of reorganizing or rebuilding the index. For more information about `ALTER INDEX REORGANIZE` and `ALTER INDEX REBUILD`, refer to [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). + > [!NOTE] -> Rebuilding or reorganizing small indexes often does not reduce fragmentation. The pages of small indexes are sometimes stored on mixed extents. Mixed extents are shared by up to eight objects, so the fragmentation in a small index might not be reduced after reorganizing or rebuilding it. - -### Limitations and Restrictions - -Indexes with more than 128 extents are rebuilt in two separate phases: logical and physical. In the logical phase, the existing allocation units used by the index are marked for deallocation, the data rows are copied and sorted, then moved to new allocation units created to store the rebuilt index. In the physical phase, the allocation units previously marked for deallocation are physically dropped in short transactions that happen in the background, and do not require many locks. For more information about extents, refer to the [Pages and Extents Architecture Guide](../../relational-databases/pages-and-extents-architecture-guide.md). - +> Rebuilding or reorganizing small indexes often does not reduce fragmentation. The pages of small indexes are sometimes stored on mixed extents. Mixed extents are shared by up to eight objects, so the fragmentation in a small index might not be reduced after reorganizing or rebuilding it. + +### Limitations and Restrictions + +Indexes with more than 128 extents are rebuilt in two separate phases: logical and physical. In the logical phase, the existing allocation units used by the index are marked for deallocation, the data rows are copied and sorted, then moved to new allocation units created to store the rebuilt index. In the physical phase, the allocation units previously marked for deallocation are physically dropped in short transactions that happen in the background, and do not require many locks. For more information about extents, refer to the [Pages and Extents Architecture Guide](../../relational-databases/pages-and-extents-architecture-guide.md). + The `ALTER INDEX REORGANIZE` statement requires the data file containing the index to have space available, because the operation can only allocate temporary work pages on the same file, not another file within the filegroup. So although the filegroup might have free pages available, the user can still encounter error 1105: `Could not allocate space for object '###' in database '###' because the '###' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.` - + Creating and rebuilding non-aligned indexes on a table with more than 1,000 partitions is possible, but is not recommended. Doing so may cause degraded performance or excessive memory consumption during these operations. An index cannot be reorganized or rebuilt if the filegroup in which it is located is offline or set to read-only. When the keyword `ALL` is specified and one or more indexes are in an offline or read-only filegroup, the statement fails. - + > [!IMPORTANT] > When an index is created or rebuilt in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], statistics are created or updated by scanning all the rows in the table. -> -> However, starting with [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)], statistics are not created or updated by scanning all the rows in the table when a partitioned index is created or rebuilt. Instead, the query optimizer uses the default sampling algorithm to generate these statistics. To obtain statistics on partitioned indexes by scanning all the rows in the table, use `CREATE STATISTICS` or `UPDATE STATISTICS` with the `FULLSCAN` clause. - -### Security - -#### Permissions +> +> However, starting with [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)], statistics are not created or updated by scanning all the rows in the table when a partitioned index is created or rebuilt. Instead, the query optimizer uses the default sampling algorithm to generate these statistics. To obtain statistics on partitioned indexes by scanning all the rows in the table, use `CREATE STATISTICS` or `UPDATE STATISTICS` with the `FULLSCAN` clause. + +### Security + +#### Permissions + Requires ALTER permission on the table or view. User must be a member of at least one of the following roles: -* **db_ddladmin** database role 1 -* **db_owner** database role -* **sysadmin** server role +- **db_ddladmin** database role 1 +- **db_owner** database role +- **sysadmin** server role 1**db_ddladmin** database role is the [least privileged](/windows-server/identity/ad-ds/plan/security-best-practices/implementing-least-privilege-administrative-models). - -## Check index fragmentation using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] - -#### To check the fragmentation of an index - -1. In Object Explorer, Expand the database that contains the table on which you want to check an index's fragmentation. - -2. Expand the **Tables** folder. - -3. Expand the table on which you want to check an index's fragmentation. - -4. Expand the **Indexes** folder. - -5. Right-click the index of which you want to check the fragmentation and select **Properties**. - -6. Under **Select a page**, select **Fragmentation**. - - The following information is available on the **Fragmentation** page: - - **Page fullness** - Indicates average fullness of the index pages, as a percentage. 100% means the index pages are completely full. 50% means that, on average, each index page is half full. - - **Total fragmentation** - The logical fragmentation percentage. This indicates the number of pages in an index that are not stored in order. - - **Average row size** - The average size of a leaf level row. - - **Depth** - The number of levels in the index, including the leaf level. - - **Forwarded records** - The number of records in a heap that have forward pointers to another data location. (This state occurs during an update, when there is not enough room to store the new row in the original location.) - - **Ghost rows** - The number of rows that are marked as deleted but not yet removed. These rows will be removed by a clean-up thread, when the server is not busy. This value does not include rows that are being retained due to an outstanding snapshot isolation transaction. - - **Index type** - The type of index. Possible values are **Clustered index**, **Nonclustered index**, and **Primary XML**. Tables can also be stored as a heap (without indexes), but then this Index Properties page cannot be opened. - - **Leaf-level rows** - The number of leaf level rows. - - **Maximum row size** - The maximum leaf-level row size. - - **Minimum row size** - The minimum leaf-level row size. - - **Pages** - The total number of data pages. - - **Partition ID** - The partition ID of the b-tree containing the index. - - **Version ghost rows** - The number of ghost records that are being retained due to an outstanding snapshot isolation transaction. - -## Check index fragmentation using [!INCLUDE[tsql](../../includes/tsql-md.md)] - -#### To check the fragmentation of an index - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. - - ```sql - USE AdventureWorks2012; - GO - -- Find the average fragmentation percentage of all indexes - -- in the HumanResources.Employee table. - SELECT a.index_id, name, avg_fragmentation_in_percent - FROM sys.dm_db_index_physical_stats (DB_ID(N'AdventureWorks2012'), - OBJECT_ID(N'HumanResources.Employee'), NULL, NULL, NULL) AS a - JOIN sys.indexes AS b - ON a.object_id = b.object_id AND a.index_id = b.index_id; - GO - ``` - - The statement above might return a result set similar to the following. - - ``` - index_id name avg_fragmentation_in_percent - ----------- ----------------------------------------------------- ---------------------------- - 1 PK_Employee_BusinessEntityID 0 - 2 IX_Employee_OrganizationalNode 0 - 3 IX_Employee_OrganizationalLevel_OrganizationalNode 0 - 5 AK_Employee_LoginID 66.6666666666667 - 6 AK_Employee_NationalIDNumber 50 - 7 AK_Employee_rowguid 0 - - (6 row(s) affected) - ``` - -For more information, see [sys.dm_db_index_physical_stats (Transact-SQL)](../../relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql.md). - -## Remove fragmentation using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] - -#### To reorganize or rebuild an index - -1. In Object Explorer, Expand the database that contains the table on which you want to reorganize an index. - -2. Expand the **Tables** folder. - -3. Expand the table on which you want to reorganize an index. - -4. Expand the **Indexes** folder. - -5. Right-click the index you want to reorganize and select **Reorganize**. - -6. In the **Reorganize Indexes** dialog box, verify that the correct index is in the **Indexes to be reorganized** grid and click **OK**. - -7. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. - -8. Click **OK.** - -#### To reorganize all indexes in a table - -1. In Object Explorer, Expand the database that contains the table on which you want to reorganize the indexes. - -2. Expand the **Tables** folder. - -3. Expand the table on which you want to reorganize the indexes. - -4. Right-click the **Indexes** folder and select **Reorganize All**. - -5. In the **Reorganize Indexes** dialog box, verify that the correct indexes are in the **Indexes to be reorganized**. To remove an index from the **Indexes to be reorganized** grid, select the index and then press the Delete key. - -6. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. - -7. Click **OK.** - -#### To rebuild an index - -1. In Object Explorer, Expand the database that contains the table on which you want to reorganize an index. - -2. Expand the **Tables** folder. - -3. Expand the table on which you want to reorganize an index. - -4. Expand the **Indexes** folder. - -5. Right-click the index you want to reorganize and select **Rebuild**. - -6. In the **Rebuild Indexes** dialog box, verify that the correct index is in the **Indexes to be rebuilt** grid and click **OK**. - -7. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. - -8. Click **OK.** - -## Remove fragmentation using [!INCLUDE[tsql](../../includes/tsql-md.md)] - -#### To reorganize a fragmented index - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. - - ```sql - USE AdventureWorks2012; - GO - -- Reorganize the IX_Employee_OrganizationalLevel_OrganizationalNode - -- index on the HumanResources.Employee table. - - ALTER INDEX IX_Employee_OrganizationalLevel_OrganizationalNode - ON HumanResources.Employee - REORGANIZE ; - GO - ``` - -#### To reorganize all indexes in a table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. - - ```sql - USE AdventureWorks2012; - GO - -- Reorganize all indexes on the HumanResources.Employee table. - ALTER INDEX ALL ON HumanResources.Employee - REORGANIZE ; - GO - ``` - -#### To rebuild a fragmented index - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example rebuilds a single index on the `Employee` table. - - [!code-sql[IndexDDL#AlterIndex1](../../relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql)] - -#### To rebuild all indexes in a table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query The example specifies the keyword `ALL`. This rebuilds all indexes associated with the table. Three options are specified. - - [!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql)] - -For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). - + +## Check index fragmentation using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] + +### To check the fragmentation of an index + +1. In Object Explorer, Expand the database that contains the table on which you want to check an index's fragmentation. +2. Expand the **Tables** folder. +3. Expand the table on which you want to check an index's fragmentation. +4. Expand the **Indexes** folder. +5. Right-click the index of which you want to check the fragmentation and select **Properties**. +6. Under **Select a page**, select **Fragmentation**. + + The following information is available on the **Fragmentation** page: + + **Page fullness** + Indicates average fullness of the index pages, as a percentage. 100% means the index pages are completely full. 50% means that, on average, each index page is half full. + + **Total fragmentation** + The logical fragmentation percentage. This indicates the number of pages in an index that are not stored in order. + + **Average row size** + The average size of a leaf level row. + + **Depth** + The number of levels in the index, including the leaf level. + + **Forwarded records** + The number of records in a heap that have forward pointers to another data location. (This state occurs during an update, when there is not enough room to store the new row in the original location.) + + **Ghost rows** + The number of rows that are marked as deleted but not yet removed. These rows will be removed by a clean-up thread, when the server is not busy. This value does not include rows that are being retained due to an outstanding snapshot isolation transaction. + + **Index type** + The type of index. Possible values are **Clustered index**, **Nonclustered index**, and **Primary XML**. Tables can also be stored as a heap (without indexes), but then this Index Properties page cannot be opened. + + **Leaf-level rows** + The number of leaf level rows. + + **Maximum row size** + The maximum leaf-level row size. + + **Minimum row size** + The minimum leaf-level row size. + + **Pages** + The total number of data pages. + + **Partition ID** + The partition ID of the b-tree containing the index. + + **Version ghost rows** + The number of ghost records that are being retained due to an outstanding snapshot isolation transaction. + +## Check index fragmentation using [!INCLUDE[tsql](../../includes/tsql-md.md)] + +### To check the fragmentation of an index + +The following example Find the average fragmentation percentage of all indexes in the HumanResources.Employee table in the AdventureWorks database. + +```sql +SELECT a.index_id, name, avg_fragmentation_in_percent + FROM sys.dm_db_index_physical_stats + (DB_ID + (N'AdventureWorks2012') + , OBJECT_ID(N'HumanResources.Employee') + , NULL + , NULL + , NULL) AS a + JOIN sys.indexes AS b + ON a.object_id = b.object_id + AND a.index_id = b.index_id; +``` + +The previous statement returns a result set similar to the following. + +```cmd +index_id name avg_fragmentation_in_percent +----------- ----------------------------------------------------- ---------------------------- +1 PK_Employee_BusinessEntityID 0 +2 IX_Employee_OrganizationalNode 0 +3 IX_Employee_OrganizationalLevel_OrganizationalNode 0 +5 AK_Employee_LoginID 66.6666666666667 +6 AK_Employee_NationalIDNumber 50 +7 AK_Employee_rowguid 0 + +(6 row(s) affected) +``` + +For more information, see [sys.dm_db_index_physical_stats](../../relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql.md). + +## Remove fragmentation using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] + +### To reorganize or rebuild an index + +1. In Object Explorer, Expand the database that contains the table on which you want to reorganize an index. +2. Expand the **Tables** folder. +3. Expand the table on which you want to reorganize an index. +4. Expand the **Indexes** folder. +5. Right-click the index you want to reorganize and select **Reorganize**. +6. In the **Reorganize Indexes** dialog box, verify that the correct index is in the **Indexes to be reorganized** grid and click **OK**. +7. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. +8. Click **OK.** + +### To reorganize all indexes in a table + +1. In Object Explorer, Expand the database that contains the table on which you want to reorganize the indexes. +2. Expand the **Tables** folder. +3. Expand the table on which you want to reorganize the indexes. +4. Right-click the **Indexes** folder and select **Reorganize All**. +5. In the **Reorganize Indexes** dialog box, verify that the correct indexes are in the **Indexes to be reorganized**. To remove an index from the **Indexes to be reorganized** grid, select the index and then press the Delete key. +6. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. +7. Click **OK.** + +### To rebuild an index + +1. In Object Explorer, Expand the database that contains the table on which you want to reorganize an index. +2. Expand the **Tables** folder. +3. Expand the table on which you want to reorganize an index. +4. Expand the **Indexes** folder. +5. Right-click the index you want to reorganize and select **Rebuild**. +6. In the **Rebuild Indexes** dialog box, verify that the correct index is in the **Indexes to be rebuilt** grid and click **OK**. +7. Select the **Compact large object column data** check box to specify that all pages that contain large object (LOB) data are also compacted. +8. Click **OK.** + +## Remove fragmentation using [!INCLUDE[tsql](../../includes/tsql-md.md)] + +### To reorganize a fragmented index + +The following example reorganizes the `IX_Employee_OrganizationalLevel_OrganizationalNode` index on the `HumanResources.Employee` table inthe AdventureWorks database. + +```sql +ALTER INDEX IX_Employee_OrganizationalLevel_OrganizationalNode + ON HumanResources.Employee + REORGANIZE +; +``` + +### To reorganize all indexes in a table + +The following example Reorganize all indexes on the HumanResources.Employee table in the AdventureWorks database. + +```sql +ALTER INDEX ALL ON HumanResources.Employee + REORGANIZE +; +``` + +### To rebuild a fragmented index + +The following example rebuilds a single index on the `Employee` table in the AdventureWorks database. + +[!code-sql[IndexDDL#AlterIndex1](../../relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_1.sql)] + +### To rebuild all indexes in a table + +The following example rebuilds all indexes associated with the table in the AdventureWorks database using the `ALL` keyword. Three options are specified. + +[!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/reorganize-and-rebuild-i_2.sql)] + +For more information, see [ALTER INDEX](../../t-sql/statements/alter-index-transact-sql.md). + ### Automatic index and statistics management Leverage solutions such as [Adaptive Index Defrag](https://github.com/Microsoft/tigertoolbox/tree/master/AdaptiveIndexDefrag) to automatically manage index defragmentation and statistics updates for one or more databases. This procedure automatically chooses whether to rebuild or reorganize an index according to its fragmentation level, amongst other parameters, and update statistics with a linear threshold. - -## See Also - [SQL Server Index Design Guide](../../relational-databases/sql-server-index-design-guide.md) - [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md) - [Adaptive Index Defrag](https://github.com/Microsoft/tigertoolbox/tree/master/AdaptiveIndexDefrag) - [CREATE STATISTICS (Transact-SQL)](../../t-sql/statements/create-statistics-transact-sql.md) - [UPDATE STATISTICS (Transact-SQL)](../../t-sql/statements/update-statistics-transact-sql.md) - + +## See Also + +- [SQL Server Index Design Guide](../../relational-databases/sql-server-index-design-guide.md) +- [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md) +- [Adaptive Index Defrag](https://github.com/Microsoft/tigertoolbox/tree/master/AdaptiveIndexDefrag) +- [CREATE STATISTICS (Transact-SQL)](../../t-sql/statements/create-statistics-transact-sql.md) +- [UPDATE STATISTICS (Transact-SQL)](../../t-sql/statements/update-statistics-transact-sql.md) diff --git a/docs/relational-databases/indexes/set-index-options.md b/docs/relational-databases/indexes/set-index-options.md index c9b25864807..407fd4b9681 100644 --- a/docs/relational-databases/indexes/set-index-options.md +++ b/docs/relational-databases/indexes/set-index-options.md @@ -101,50 +101,40 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio #### To see the properties of all the indexes in a table -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. - - ``` - USE AdventureWorks2012; - GO - SELECT i.name AS index_name, - i.type_desc, - i.is_unique, - ds.type_desc AS filegroup_or_partition_scheme, - ds.name AS filegroup_or_partition_scheme_name, - i.ignore_dup_key, - i.is_primary_key, - i.is_unique_constraint, - i.fill_factor, - i.is_padded, - i.is_disabled, - i.allow_row_locks, - i.allow_page_locks, - i.has_filter, - i.filter_definition - FROM sys.indexes AS i - INNER JOIN sys.data_spaces AS ds ON i.data_space_id = ds.data_space_id - WHERE is_hypothetical = 0 AND i.index_id <> 0 - AND i.object_id = OBJECT_ID('HumanResources.Employee'); - GO - - ``` +The following example shows the properties of all indexes in a table in the AdventureWorks database. + +```sql +SELECT i.name AS index_name + , i.type_desc + , i.is_unique + , ds.type_desc AS filegroup_or_partition_scheme + , ds.name AS filegroup_or_partition_scheme_name + , i.ignore_dup_key + , i.is_primary_key + , i.is_unique_constraint + , i.fill_factor + , i.is_padded + , i.is_disabled + , i.allow_row_locks + , i.allow_page_locks + , i.has_filter + , i.filter_definition +FROM sys.indexes AS i + INNER JOIN sys.data_spaces AS ds + ON i.data_space_id = ds.data_space_id + WHERE is_hypothetical = 0 AND i.index_id <> 0 + AND i.object_id = OBJECT_ID('HumanResources.Employee') +; + +``` #### To set the properties of an index -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. +The following example sets the properties of indexes in the AdventureWorks database. -2. On the Standard bar, click **New Query**. +[!code-sql[IndexDDL#AlterIndex4](../../relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql)] -3. Copy and paste the following examples into the query window and click **Execute**. - - [!code-sql[IndexDDL#AlterIndex4](../../relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql)] - - [!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql)] +[!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql)] For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). - - + \ No newline at end of file From 6be4ab221d171fefd0416730047704d13ca2d8a2 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:08:35 -0700 Subject: [PATCH 13/46] more --- .../indexes/set-index-options.md | 165 ++++++++---------- 1 file changed, 75 insertions(+), 90 deletions(-) diff --git a/docs/relational-databases/indexes/set-index-options.md b/docs/relational-databases/indexes/set-index-options.md index 407fd4b9681..b464362230b 100644 --- a/docs/relational-databases/indexes/set-index-options.md +++ b/docs/relational-databases/indexes/set-index-options.md @@ -28,82 +28,69 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Set Index Options + [!INCLUDE[appliesto-ss-asdb-xxxx-xxx-md](../../includes/appliesto-ss-asdb-xxxx-xxx-md.md)] - This topic describes how to modify the properties of an index in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To modify the properties of an index, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- The following options are immediately applied to the index by using the SET clause in the ALTER INDEX statement: ALLOW_PAGE_LOCKS, ALLOW_ROW_LOCKS, OPTIMIZE_FOR_SEQUENTIAL_KEY, IGNORE_DUP_KEY, and STATISTICS_NORECOMPUTE. - -- The following options can be set when you rebuild an index by using either ALTER INDEX REBUILD or CREATE INDEX WITH DROP_EXISTING: PAD_INDEX, FILLFACTOR, SORT_IN_TEMPDB, IGNORE_DUP_KEY, STATISTICS_NORECOMPUTE, ONLINE, ALLOW_ROW_LOCKS, ALLOW_PAGE_LOCKS, MAXDOP, and DROP_EXISTING (CREATE INDEX only). - -### Security - -#### Permissions - Requires ALTER permission on the table or view. - -## Using SQL Server Management Studio - -#### To modify the properties of an index in Table Designer - -1. In Object Explorer, click the plus sign to expand the database that contains the table on which you want to modify an index's properties. - -2. Click the plus sign to expand the **Tables** folder. - -3. Right-click the table on which you want to modify an index's properties and select **Design**. - -4. On the **Table Designer** menu, click **Indexes/Keys**. - -5. Select the index that you want to modify. Its properties will show up in the main grid. - -6. Change the settings of any and all properties to customize the index. - -7. Click **Close**. - -8. On the **File** menu, select **Save**_table_name_. - -#### To modify the properties of an index in Object Explorer - -1. In Object Explorer, click the plus sign to expand the database that contains the table on which you want to modify an index's properties. - -2. Click the plus sign to expand the **Tables** folder. - -3. Click the plus sign to expand the table on which you want to modify an index's properties. - -4. Click the plus sign to expand the **Indexes** folder. - -5. Right-click the index of which you want to modify the properties and select **Properties**. - -6. Under **Select a page**, select **Options**. - -7. Change the settings of any and all properties to customize the index. - -8. To add, remove, or change the position of an index column, select the **General** page from the **Index Properties -** _index_name_ dialog box. For more information, see [Index Properties F1 Help](../../relational-databases/indexes/index-properties-f1-help.md) - -## Using Transact-SQL - -#### To see the properties of all the indexes in a table - -The following example shows the properties of all indexes in a table in the AdventureWorks database. - -```sql +This topic describes how to modify the properties of an index in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To modify the properties of an index, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- The following options are immediately applied to the index by using the SET clause in the ALTER INDEX statement: ALLOW_PAGE_LOCKS, ALLOW_ROW_LOCKS, OPTIMIZE_FOR_SEQUENTIAL_KEY, IGNORE_DUP_KEY, and STATISTICS_NORECOMPUTE. +- The following options can be set when you rebuild an index by using either ALTER INDEX REBUILD or CREATE INDEX WITH DROP_EXISTING: PAD_INDEX, FILLFACTOR, SORT_IN_TEMPDB, IGNORE_DUP_KEY, STATISTICS_NORECOMPUTE, ONLINE, ALLOW_ROW_LOCKS, ALLOW_PAGE_LOCKS, MAXDOP, and DROP_EXISTING (CREATE INDEX only). + +### Security + +#### Permissions + +Requires ALTER permission on the table or view. + +## Using SQL Server Management Studio + +### To modify the properties of an index in Table Designer + +1. In Object Explorer, click the plus sign to expand the database that contains the table on which you want to modify an index's properties. +2. Click the plus sign to expand the **Tables** folder. +3. Right-click the table on which you want to modify an index's properties and select **Design**. +4. On the **Table Designer** menu, click **Indexes/Keys**. +5. Select the index that you want to modify. Its properties will show up in the main grid. +6. Change the settings of any and all properties to customize the index. +7. Click **Close**. +8. On the **File** menu, select **Save**_table_name_. + +### To modify the properties of an index in Object Explorer + +1. In Object Explorer, click the plus sign to expand the database that contains the table on which you want to modify an index's properties. +2. Click the plus sign to expand the **Tables** folder. +3. Click the plus sign to expand the table on which you want to modify an index's properties. +4. Click the plus sign to expand the **Indexes** folder. +5. Right-click the index of which you want to modify the properties and select **Properties**. +6. Under **Select a page**, select **Options**. +7. Change the settings of any and all properties to customize the index. +8. To add, remove, or change the position of an index column, select the **General** page from the **Index Properties -** _index_name_ dialog box. For more information, see [Index Properties F1 Help](../../relational-databases/indexes/index-properties-f1-help.md) + +## Using Transact-SQL + +### To see the properties of all the indexes in a table + +The following example shows the properties of all indexes in a table in the AdventureWorks database. + +```sql SELECT i.name AS index_name , i.type_desc , i.is_unique @@ -118,23 +105,21 @@ SELECT i.name AS index_name , i.allow_row_locks , i.allow_page_locks , i.has_filter - , i.filter_definition -FROM sys.indexes AS i + , i.filter_definition +FROM sys.indexes AS i INNER JOIN sys.data_spaces AS ds - ON i.data_space_id = ds.data_space_id + ON i.data_space_id = ds.data_space_id WHERE is_hypothetical = 0 AND i.index_id <> 0 AND i.object_id = OBJECT_ID('HumanResources.Employee') ; - -``` - -#### To set the properties of an index - -The following example sets the properties of indexes in the AdventureWorks database. - -[!code-sql[IndexDDL#AlterIndex4](../../relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql)] - -[!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql)] - - For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). - \ No newline at end of file +``` + +#### To set the properties of an index + +The following examples set the properties of indexes in the AdventureWorks database. + +[!code-sql[IndexDDL#AlterIndex4](../../relational-databases/indexes/codesnippet/tsql/set-index-options_1.sql)] + +[!code-sql[IndexDDL#AlterIndex2](../../relational-databases/indexes/codesnippet/tsql/set-index-options_2.sql)] + +For more information, see [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md). From 795b6e7696ac5313866f18e76d082522c1cf1356 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:15:39 -0700 Subject: [PATCH 14/46] more --- ...ered-and-nonclustered-indexes-described.md | 86 ++++++++++--------- docs/toc.yml | 2 +- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md index 83c288d2f52..77928cfc8e7 100644 --- a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md +++ b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md @@ -15,45 +15,47 @@ ms.author: mikeray manager: craigg --- # Clustered and Nonclustered Indexes Described - An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. - - A table or view can contain the following types of indexes: - -- Clustered - - - Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order. - - - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. - -- Nonclustered - - - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. - - - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. - - - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, 900 bytes and 16 key columns, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](create-indexes-with-included-columns.md). - - Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](create-unique-indexes.md). - - Indexes are automatically maintained for a table or view whenever the table data is modified. - - See [Indexes](indexes.md) for additional types of special purpose indexes. - -## Indexes and Constraints - Indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns. For example, when you create a table and identify a particular column to be the primary key, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a PRIMARY KEY constraint and index on that column. For more information, see [Create Primary Keys](../tables/create-primary-keys.md) and [Create Unique Constraints](../tables/create-unique-constraints.md). - -## How Indexes Are Used by the Query Optimizer - Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. - - When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. - - When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. - - The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. - -## Related Tasks - [Create Clustered Indexes](create-clustered-indexes.md) - - [Create Nonclustered Indexes](create-nonclustered-indexes.md) - - + +An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. + +A table or view can contain the following types of indexes: + +- Clustered + + - Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order. + + - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. + +- Nonclustered + + - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. + + - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. + + - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, 900 bytes and 16 key columns, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](create-indexes-with-included-columns.md). + +Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](create-unique-indexes.md). + +Indexes are automatically maintained for a table or view whenever the table data is modified. + +See [Indexes](indexes.md) for additional types of special purpose indexes. + +## Indexes and Constraints + +Indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns. For example, when you create a table and identify a particular column to be the primary key, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a PRIMARY KEY constraint and index on that column. For more information, see [Create Primary Keys](../tables/create-primary-keys.md) and [Create Unique Constraints](../tables/create-unique-constraints.md). + +## How Indexes Are Used by the Query Optimizer + +Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. + +When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. + +When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. + +The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. + +## Related Tasks + +- [Create Clustered Indexes](create-clustered-indexes.md) + +- [Create Nonclustered Indexes](create-nonclustered-indexes.md) diff --git a/docs/toc.yml b/docs/toc.yml index e30630da5f6..38377a3c660 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1338,7 +1338,7 @@ items: - name: Heaps (Tables without Clustered Indexes) href: relational-databases/indexes/heaps-tables-without-clustered-indexes.md - - name: Clustered & Nonclustered Indexes Described + - name: Clustered & Nonclustered Indexes href: relational-databases/indexes/clustered-and-nonclustered-indexes-described.md items: - name: Create From 97af803e4803fe0a8e1e2dbbfcfd846dbc7733b0 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:22:03 -0700 Subject: [PATCH 15/46] more --- .../add-columns-to-a-table-database-engine.md | 90 +++++++++---------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/docs/relational-databases/tables/add-columns-to-a-table-database-engine.md b/docs/relational-databases/tables/add-columns-to-a-table-database-engine.md index 11a9e90bcdb..cf9cec07e33 100644 --- a/docs/relational-databases/tables/add-columns-to-a-table-database-engine.md +++ b/docs/relational-databases/tables/add-columns-to-a-table-database-engine.md @@ -18,56 +18,52 @@ manager: craigg monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Add Columns to a Table (Database Engine) + [!INCLUDE[tsql-appliesto-ss2016-all-md](../../includes/tsql-appliesto-ss2016-all-md.md)] - This topic describes how to add new columns to a table in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. +This article describes how to add new columns to a table in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - ## Before You Begin - -### Limitations and Restrictions - Using the ALTER TABLE statement to add columns to a table automatically adds those columns to the end of the table. If you want the columns in a specific order in the table, use [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. However, note that this is not a database design best practice. Best practice is to specify the order in which the columns are returned at the application and query level. You should not rely on the use of SELECT * to return all columns in an expected order based on the order in which they are defined in the table. Always specify the columns by name in your queries and applications in the order in which you would like them to appear. - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using SQL Server Management Studio - -#### To insert columns into a table with Table Designer - -1. In **Object Explorer**, right-click the table to which you want to add columns and choose **Design**. - -2. Click in the first blank cell in the **Column Name** column. - -3. Type the column name in the cell. The column name is a required value. - -4. Press the TAB key to go to the **Data Type** cell and select a data type from the dropdown. This is a required value, and will be assigned the default value if you don't choose one. - - > [!NOTE] - > You can change the default value in the **Options** dialog box under **Database Tools**. - -5. Continue to define any other column properties in the **Column Properties** tab. - - > [!NOTE] - > The default values for your column properties are added when you create a new column, but you can change them in the **Column Properties** tab. - -6. When you are finished adding columns, from the **File** menu, choose **Save** _table name_. - -## Using Transact-SQL - -#### To insert columns into a table - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. The following example adds two columns to the table `dbo.doc_exa`. Copy and paste the following example into the query window and click **Execute**. - -``` -ALTER TABLE dbo.doc_exa ADD column_b VARCHAR(20) NULL, column_c INT NULL ; -``` +## Before You Begin + +### Limitations and Restrictions + + Using the ALTER TABLE statement to add columns to a table automatically adds those columns to the end of the table. If you want the columns in a specific order in the table, use [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]. However, note that this is not a database design best practice. Best practice is to specify the order in which the columns are returned at the application and query level. You should not rely on the use of SELECT * to return all columns in an expected order based on the order in which they are defined in the table. Always specify the columns by name in your queries and applications in the order in which you would like them to appear. + +### Security + +#### Permissions + +Requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To insert columns into a table with Table Designer + +1. In **Object Explorer**, right-click the table to which you want to add columns and choose **Design**. +2. Click in the first blank cell in the **Column Name** column. +3. Type the column name in the cell. The column name is a required value. +4. Press the TAB key to go to the **Data Type** cell and select a data type from the dropdown. + + This is a required value, and will be assigned the default value if you don't choose one. + + > [!NOTE] + > You can change the default value in the **Options** dialog box under **Database Tools**. + +5. Continue to define any other column properties in the **Column Properties** tab. + + > [!NOTE] + > The default values for your column properties are added when you create a new column, but you can change them in the **Column Properties** tab. + +6. When you are finished adding columns, from the **File** menu, choose **Save** _table name_. -#### For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md) +## Using Transact-SQL +### To insert columns into a table +The following example adds two columns to the table `dbo.doc_exa`. + +```sql +ALTER TABLE dbo.doc_exa ADD column_b VARCHAR(20) NULL, column_c INT NULL ; +``` + +#### For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md) From 4621b5e4aa74d9549d060ec2ebf3cc1d4914edc0 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:29:24 -0700 Subject: [PATCH 16/46] more --- .../tables/create-primary-keys.md | 171 ++++++++++-------- .../tables/graph-edge-constraints.md | 2 +- 2 files changed, 93 insertions(+), 80 deletions(-) diff --git a/docs/2014/relational-databases/tables/create-primary-keys.md b/docs/2014/relational-databases/tables/create-primary-keys.md index ab0d6f862cd..59577824028 100644 --- a/docs/2014/relational-databases/tables/create-primary-keys.md +++ b/docs/2014/relational-databases/tables/create-primary-keys.md @@ -14,82 +14,95 @@ ms.author: sstein manager: craigg --- # Create Primary Keys - -You can define a primary key in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique, clustered or nonclustered index. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To create a primary key, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#Example) - -## Before You Begin - -### Limitations and Restrictions - -- A table can contain only one PRIMARY KEY constraint. -- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. - -### Security - -#### Permissions - -Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - -Creating a primary key in an existing table requires ALTER permission on the table. - -## Using SQL Server Management Studio - -### To create a primary key - -1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. -2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. -3. Right-click the row selector for the column and select **Set Primary Key**. - -> [!CAUTION] -> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. - -A primary key column is identified by a primary key symbol in its row selector. - -If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. - -If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](modify-primary-keys.md). - -## Using Transact-SQL - -### To create a primary key in an existing table - -The following example creates a primary key on the column `TransactionID` in the AdventureWorks database. - -```sql -ALTER TABLE Production.TransactionHistoryArchive - ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID -; -``` - -### To create a primary key in a new table - -The following example creates a table and defines a primary key on the column `TransactionID` in hte AdventureWorks database. - -```sql -CREATE TABLE Production.TransactionHistoryArchive1 - ( - TransactionID int NOT NULL - , CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) - ) -; -``` - -For more information, see: - -- [ALTER TABLE](/sql/t-sql/statements/alter-table-transact-sql) -- [CREATE TABLE](/sql/t-sql/statements/create-table-transact-sql) -- [Table_constraint](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). + You can define a primary key in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique, clustered or nonclustered index. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To create a primary key, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- A table can contain only one PRIMARY KEY constraint. + +- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. + +### Security + +#### Permissions + Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + + Creating a primary key in an existing table requires ALTER permission on the table. + +## Using SQL Server Management Studio + +#### To create a primary key + +1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. + +2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. + +3. Right-click the row selector for the column and select **Set Primary Key**. + +> [!CAUTION] +> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. + + A primary key column is identified by a primary key symbol in its row selector. + + If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. + + If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](modify-primary-keys.md). + +## Using Transact-SQL + +#### To create a primary key in an existing table + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. On the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and click **Execute**. The example creates a primary key on the column `TransactionID`. + + ``` + USE AdventureWorks2012; + GO + ALTER TABLE Production.TransactionHistoryArchive + ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID); + GO + + ``` + +#### To create a primary key in a new table + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. On the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a primary key on the column `TransactionID`. + + ``` + USE AdventureWorks2012; + GO + CREATE TABLE Production.TransactionHistoryArchive1 + ( + TransactionID int NOT NULL, + CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) + ); + GO + + ``` + + For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). + +### \ No newline at end of file diff --git a/docs/relational-databases/tables/graph-edge-constraints.md b/docs/relational-databases/tables/graph-edge-constraints.md index 38ae8fabef5..31d376fd941 100644 --- a/docs/relational-databases/tables/graph-edge-constraints.md +++ b/docs/relational-databases/tables/graph-edge-constraints.md @@ -297,4 +297,4 @@ WHERE EC.parent_object_id = object_id('bought'); ## Related tasks -For information about graph technology in SQL Server, see [Graph processing with SQL Server and Azure SQL Database](../graphs/sql-graph-overview?view=sql-server-2017). +For information about graph technology in SQL Server, see [Graph processing with SQL Server and Azure SQL Database](../graphs/sql-graph-overview.md?view=sql-server-2017). From b6671147ef6b4ba5c62b402fe7e62e740f7b0821 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:37:08 -0700 Subject: [PATCH 17/46] more --- .../tables/create-primary-keys.md | 182 ++++++++---------- 1 file changed, 81 insertions(+), 101 deletions(-) diff --git a/docs/relational-databases/tables/create-primary-keys.md b/docs/relational-databases/tables/create-primary-keys.md index c75c148a659..6181b03be5d 100644 --- a/docs/relational-databases/tables/create-primary-keys.md +++ b/docs/relational-databases/tables/create-primary-keys.md @@ -16,108 +16,88 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Create Primary Keys + [!INCLUDE[tsql-appliesto-ss2016-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2016-asdb-xxxx-xxx-md.md)] - You can define a primary key in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique clustered index, or a nonclustered index if specified as such. - -## Before You Begin - -### Limitations and Restrictions - -- A table can contain only one PRIMARY KEY constraint. - -- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. - -### Security - -#### Permissions - Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - - Creating a primary key in an existing table requires ALTER permission on the table. - -## Using SQL Server Management Studio - -#### To create a primary key - -1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. - -2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. - -3. Right-click the row selector for the column and select **Set Primary Key**. - -> [!CAUTION] -> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. - - A primary key column is identified by a primary key symbol in its row selector. - - If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. - - If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](../../relational-databases/tables/modify-primary-keys.md). - -## Using Transact-SQL +You can define a primary key in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. Creating a primary key automatically creates a corresponding unique clustered index, or a nonclustered index if specified as such. -### To create a primary key in an existing table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a primary key on the column `TransactionID`. - - ```sql - USE AdventureWorks2012; - GO - ALTER TABLE Production.TransactionHistoryArchive - ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID); - GO - ``` - -### To create a primary key in a new table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a primary key on the column `TransactionID`. - - ```sql - USE AdventureWorks2012; - GO - CREATE TABLE Production.TransactionHistoryArchive1 - ( - TransactionID int IDENTITY (1,1) NOT NULL, - CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) - ); - GO - ``` - -### To create a primary key with nonclustered index in a new table - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a primary key on the column `CustomerID` and a clustered index on `TransactionID`. +## Before You Begin + +### Limitations and Restrictions + +- A table can contain only one PRIMARY KEY constraint. + +- All columns defined within a PRIMARY KEY constraint must be defined as NOT NULL. If nullability is not specified, all columns participating in a PRIMARY KEY constraint have their nullability set to NOT NULL. + +### Security + +#### Permissions + +Creating a new table with a primary key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + +Creating a primary key in an existing table requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To create a primary key + +1. In Object Explorer, right-click the table to which you want to add a unique constraint, and click **Design**. +2. In **Table Designer**, click the row selector for the database column you want to define as the primary key. If you want to select multiple columns, hold down the CTRL key while you click the row selectors for the other columns. +3. Right-click the row selector for the column and select **Set Primary Key**. + +> [!CAUTION] +> If you want to redefine the primary key, any relationships to the existing primary key must be deleted before the new primary key can be created. A message will warn you that existing relationships will be automatically deleted as part of this process. + +A primary key column is identified by a primary key symbol in its row selector. + +If a primary key consists of more than one column, duplicate values are allowed in one column, but each combination of values from all the columns in the primary key must be unique. + +If you define a compound key, the order of columns in the primary key matches the order of columns as shown in the table. However, you can change the order of columns after the primary key is created. For more information, see [Modify Primary Keys](../../relational-databases/tables/modify-primary-keys.md). + +## Using Transact-SQL + +### To create a primary key in an existing table - ```sql - -- Select appropriate database - USE AdventureWorks2012; - GO - -- Create table to add the clustered index - CREATE TABLE Production.TransactionHistoryArchive1 - ( - CustomerID uniqueidentifier DEFAULT NEWSEQUENTIALID(), - TransactionID int IDENTITY (1,1) NOT NULL, - CONSTRAINT PK_TransactionHistoryArchive1_CustomerID PRIMARY KEY NONCLUSTERED (CustomerID) - ); - GO - - -- Now add the clustered index - CREATE CLUSTERED INDEX CIX_TransactionID ON Production.TransactionHistoryArchive1 (TransactionID); - GO - ``` - -## See Also -[ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md) -[CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md) -[table_constraint (Transact-SQL)](../../t-sql/statements/alter-table-table-constraint-transact-sql.md) +The following example creates a primary key on the column `TransactionID` in the AdventureWorks database. + +```sql +ALTER TABLE Production.TransactionHistoryArchive + ADD CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID); +``` + +### To create a primary key in a new table + +The following example creates a table and defines a primary key on the column `TransactionID` in the AdventureWorks database. + +```sql +CREATE TABLE Production.TransactionHistoryArchive1 + ( + TransactionID int IDENTITY (1,1) NOT NULL + , CONSTRAINT PK_TransactionHistoryArchive_TransactionID PRIMARY KEY CLUSTERED (TransactionID) + ) +; +``` + +### To create a primary key with nonclustered index in a new table + +The following example creates a table and defines a primary key on the column `CustomerID` and a clustered index on `TransactionID` in the AdventureWorks database. + +```sql +-- Create table to add the clustered index +CREATE TABLE Production.TransactionHistoryArchive1 + ( + CustomerID uniqueidentifier DEFAULT NEWSEQUENTIALID() + , TransactionID int IDENTITY (1,1) NOT NULL + , CONSTRAINT PK_TransactionHistoryArchive1_CustomerID PRIMARY KEY NONCLUSTERED (CustomerID) + ) +; + +-- Now add the clustered index +CREATE CLUSTERED INDEX CIX_TransactionID ON Production.TransactionHistoryArchive1 (TransactionID); +``` + +## See Also + +- [ALTER TABLE](../../t-sql/statements/alter-table-transact-sql.md) +- [CREATE TABLE](../../t-sql/statements/create-table-transact-sql.md) +- [table_constraint](../../t-sql/statements/alter-table-table-constraint-transact-sql.md) From 33543e5ac8df15434a29574f9f6c5d09d768e761 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:40:09 -0700 Subject: [PATCH 18/46] more --- .../indexes/index-properties-f1-help.md | 116 +++++++++--------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/docs/2014/relational-databases/indexes/index-properties-f1-help.md b/docs/2014/relational-databases/indexes/index-properties-f1-help.md index 2f1b7e1dcbf..8b69e548ac3 100644 --- a/docs/2014/relational-databases/indexes/index-properties-f1-help.md +++ b/docs/2014/relational-databases/indexes/index-properties-f1-help.md @@ -20,64 +20,62 @@ ms.author: mikeray manager: craigg --- # Index Properties F1 Help - -The sections in this topic refer to various index properties that are available by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] dialogs. - -**In This Topic:** - -[Index Properties General Page](#General) - -[Select (Index) Columns Dialog Box](#Columns) - -[Index Properties Storage Page](#Storage) - -[Index Properties Spatial Page](#Spatial) - -[Index Properties Filter Page](#Filter) - -## Index Properties General Page - -Use the General page to view or modify index properties for the selected table or view. The options for each page may change based on the type of index selected. - -**Table name** -Displays the name of the table or view that the index was created on. This field is read-only. To select a different table, close the Index Properties page, select the correct table, and then open the Index Properties page again. - -Spatial indexes cannot be specified on indexed views. Spatial indexes can be defined only for a table that has a primary key. The maximum number of primary key columns on the table is 15. The combined per-row size of the primary-key columns is limited to a maximum of 895 bytes. - -**Index name** -Displays the name of the index. This field is read-only for an existing index. When creating a new index, type the name of the index. - -**Index type** -Indicates the type of index. For new indexes, indicates the type of index selected when opening the dialog box. Indexes can be: **Clustered**, **Nonclustered**, **Primary XML**, **Secondary XML**, **Spatial**, **Clustered columnstore**, or **Nonclustered Columnstore**. - -**Note** Only one clustered index is allowed for each table. Only one xVelocity memory optimized columnstore index is allowed for each table. - -**Unique** -Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this check box is cleared. When modifying an existing index, index creation will fail if two rows have the same value. For columns where NULL is permitted, a unique index permits one NULL value. - -If you select **Spatial** in the **Index type** field, the **Unique** check box is dimmed. - -**Index key columns** -Add the desired columns to the **Index key columns** grid. When more than one column is added, the columns must be listed in the order desired. The column order in an index can have a great impact on the index performance. - -No more than 16 columns can participate in a single composite index. For greater than 16 columns, see included columns at the end of this topic. - -A spatial index can be defined only on a single column that contains a spatial data type (a *spatial column*). - -**Name** -Displays the name of the column that participates in the index key. - -**Sort Order** -Specifies the sort direction of the selected index column, either **Ascending** or **Descending**. - -> [!NOTE] -> If the index type is **Primary XML** or **Spatial**, this column does not appear in the table. - - **Data Type** - Displays the data type information. - -> [!NOTE] -> If the table column is a computed column, **Data type** displays "computed column." + The sections in this topic refer to various index properties that are available by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] dialogs. + + **In This Topic:** + + [Index Properties General Page](#General) + + [Select (Index) Columns Dialog Box](#Columns) + + [Index Properties Storage Page](#Storage) + + [Index Properties Spatial Page](#Spatial) + + [Index Properties Filter Page](#Filter) + +## Index Properties General Page + Use the General page to view or modify index properties for the selected table or view. The options for each page may change based on the type of index selected. + + **Table name** + Displays the name of the table or view that the index was created on. This field is read-only. To select a different table, close the Index Properties page, select the correct table, and then open the Index Properties page again. + + Spatial indexes cannot be specified on indexed views. Spatial indexes can be defined only for a table that has a primary key. The maximum number of primary key columns on the table is 15. The combined per-row size of the primary-key columns is limited to a maximum of 895 bytes. + + **Index name** + Displays the name of the index. This field is read-only for an existing index. When creating a new index, type the name of the index. + + **Index type** + Indicates the type of index. For new indexes, indicates the type of index selected when opening the dialog box. Indexes can be: **Clustered**, **Nonclustered**, **Primary XML**, **Secondary XML**, **Spatial**, **Clustered columnstore**, or **Nonclustered Columnstore**. + + **Note** Only one clustered index is allowed for each table. Only one xVelocity memory optimized columnstore index is allowed for each table. + + **Unique** + Selecting this check box makes the index unique. No two rows are permitted to have the same index value. By default, this check box is cleared. When modifying an existing index, index creation will fail if two rows have the same value. For columns where NULL is permitted, a unique index permits one NULL value. + + If you select **Spatial** in the **Index type** field, the **Unique** check box is dimmed. + + **Index key columns** + Add the desired columns to the **Index key columns** grid. When more than one column is added, the columns must be listed in the order desired. The column order in an index can have a great impact on the index performance. + + No more than 16 columns can participate in a single composite index. For greater than 16 columns, see included columns at the end of this topic. + + A spatial index can be defined only on a single column that contains a spatial data type (a *spatial column*). + + **Name** + Displays the name of the column that participates in the index key. + + **Sort Order** + Specifies the sort direction of the selected index column, either **Ascending** or **Descending**. + +> [!NOTE] +> If the index type is **Primary XML** or **Spatial**, this column does not appear in the table. + + **Data Type** + Displays the data type information. + +> [!NOTE] +> If the table column is a computed column, **Data type** displays "computed column." **Size** Displays the maximum number of bytes required to store the column data type. Displays zero (0) for a spatial or XML column. @@ -239,4 +237,4 @@ Specifies the sort direction of the selected index column, either **Ascending** [INDEXPROPERTY (Transact-SQL)](/sql/t-sql/functions/indexproperty-transact-sql) [sys.indexes (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql) - + \ No newline at end of file From 3ef65db48beda1fcc5e274f1c7c590a30741f300 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 17:55:26 -0700 Subject: [PATCH 19/46] more --- .../create-foreign-key-relationships.md | 217 ++++++++++-------- .../create-foreign-key-relationships.md | 194 +++++++--------- 2 files changed, 203 insertions(+), 208 deletions(-) diff --git a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md index 75143ccf345..3b59e0da026 100644 --- a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md +++ b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md @@ -14,100 +14,123 @@ ms.author: sstein manager: craigg --- # Create Foreign Key Relationships - -This topic describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. - -**In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To Create Foreign Key Relationships by using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. -- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. -- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER](/sql/t-sql/statements/create-trigger-transact-sql). -- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. -- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. -- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. -- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. We recommend that a table contain no more than 253 FOREIGN KEY constraints, and that it be referenced by no more than 253 FOREIGN KEY constraints. -- FOREIGN KEY constraints are not enforced on temporary tables. -- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). -- A column of type `varchar(max)` can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type `varchar(max)`. - -### Security - -#### Permissions - -Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - -Creating a foreign key in an existing table requires ALTER permission on the table. - -## Using SQL Server Management Studio - -### To create a foreign key relationship in Table Designer - -1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. - - The table opens in **Table Designer**. -2. From the **Table Designer** menu, click **Relationships**. -3. In the **Foreign-key Relationships** dialog box, click **Add**. - - The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. -4. Click the relationship in the **Selected Relationship** list. -5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. -6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. -7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. - - **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. -8. Choose **OK** to create the relationship. - -## Using Transact-SQL - -### To create a foreign key in a new table - -The following example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table in the Adventure Works database. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. - -```sql -CREATE TABLE Sales.TempSalesReason - ( - TempID int NOT NULL - , Name nvarchar(50) - , CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID) - , CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE - ) -; -``` - -### To create a foreign key in an existing table - -The following example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table in the AdventureWorks database. - -```sql -ALTER TABLE Sales.TempSalesReason - ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE -; -``` - -For more information, see: - -- [ALTER TABLE](/sql/t-sql/statements/alter-table-transact-sql) -- [CREATE TABLE](/sql/t-sql/statements/create-table-transact-sql) -- [Table_constraint](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). + This topic describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To Create Foreign Key Relationships by using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. + +- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. + +- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER (Transact-SQL)](/sql/t-sql/statements/create-trigger-transact-sql). + +- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. + +- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. + +- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. + +- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. We recommend that a table contain no more than 253 FOREIGN KEY constraints, and that it be referenced by no more than 253 FOREIGN KEY constraints. + +- FOREIGN KEY constraints are not enforced on temporary tables. + +- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). + +- A column of type `varchar(max)` can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type `varchar(max)`. + +### Security + +#### Permissions + Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + + Creating a foreign key in an existing table requires ALTER permission on the table. + +## Using SQL Server Management Studio + +#### To create a foreign key relationship in Table Designer + +1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. + + The table opens in **Table Designer**. + +2. From the **Table Designer** menu, click **Relationships**. + +3. In the **Foreign-key Relationships** dialog box, click **Add**. + + The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. + +4. Click the relationship in the **Selected Relationship** list. + +5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. + +6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. + +7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. + + **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. + +8. Choose **OK** to create the relationship. + +## Using Transact-SQL + +#### To create a foreign key in a new table + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. On the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. + + ``` + USE AdventureWorks2012; + GO + CREATE TABLE Sales.TempSalesReason (TempID int NOT NULL, Name nvarchar(50), + CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID), + CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE + );GO + + ``` + +#### To create a foreign key in an existing table + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. On the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and click **Execute**. The example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table. + + ``` + USE AdventureWorks2012; + GO + ALTER TABLE Sales.TempSalesReason + ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE + ; + GO + + ``` + + For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). + + \ No newline at end of file diff --git a/docs/relational-databases/tables/create-foreign-key-relationships.md b/docs/relational-databases/tables/create-foreign-key-relationships.md index ddb816c88b5..caa8d3c1535 100644 --- a/docs/relational-databases/tables/create-foreign-key-relationships.md +++ b/docs/relational-databases/tables/create-foreign-key-relationships.md @@ -16,116 +16,88 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Create Foreign Key Relationships + [!INCLUDE[tsql-appliesto-ss2016-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2016-asdb-xxxx-xxx-md.md)] - This topic describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. - -## Before You Begin! Limits and Restrictions - -- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. - -- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. - -- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER (Transact-SQL)](../../t-sql/statements/create-trigger-transact-sql.md). - -- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. - -- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. - -- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. - -- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. A table can reference a maximum of 253 other tables and columns as foreign keys (outgoing references). [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] increases the limit for the number of other table and columns that can reference columns in a single table (incoming references), from 253 to 10,000. (Requires at least 130 compatibility level.) The increase has the following restrictions: - - - Greater than 253 foreign key references are supported for DELETE and UPDATE DML operations. MERGE operations are not supported. - - - A table with a foreign key reference to itself is still limited to 253 foreign key references. - - - Greater than 253 foreign key references are not currently available for columnstore indexes, memory-optimized tables, or Stretch Database. - -- FOREIGN KEY constraints are not enforced on temporary tables. - -- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../../relational-databases/clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). - -- A column of type **varchar(max)** can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type **varchar(max)**. - - - -## Permissions - Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. - - Creating a foreign key in an existing table requires ALTER permission on the table. - - -## Create a foreign key relationship in Table Designer -#### Using SQL Server Management Studio - -1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. - - The table opens in **Table Designer**. - -2. From the **Table Designer** menu, click **Relationships**. - -3. In the **Foreign-key Relationships** dialog box, click **Add**. - - The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. - -4. Click the relationship in the **Selected Relationship** list. - -5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. - -6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. - -7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. - - **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. - -8. Choose **OK** to create the relationship. - -## Create a foreign key in a new table -#### Using Transact-SQL - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. - - ``` - USE AdventureWorks2012; - GO - CREATE TABLE Sales.TempSalesReason (TempID int NOT NULL, Name nvarchar(50), - CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID), - CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE - ); - GO - - ``` - -## Create a foreign key in an existing table -#### Using Transact-SQL - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and click **Execute**. The example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table. - - ``` - USE AdventureWorks2012; - GO - ALTER TABLE Sales.TempSalesReason - ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) - REFERENCES Sales.SalesReason (SalesReasonID) - ON DELETE CASCADE - ON UPDATE CASCADE - ; - GO - - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md), [CREATE TABLE (Transact-SQL)](../../t-sql/statements/create-table-transact-sql.md), and [table_constraint (Transact-SQL)](../../t-sql/statements/alter-table-table-constraint-transact-sql.md). - - +This article describes how to create foreign key relationships in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. You create a relationship between two tables when you want to associate rows of one table with rows of another. + +## Before You Begin! Limits and Restrictions + +- A foreign key constraint does not have to be linked only to a primary key constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. +- When a value other than NULL is entered into the column of a FOREIGN KEY constraint, the value must exist in the referenced column; otherwise, a foreign key violation error message is returned. To make sure that all values of a composite foreign key constraint are verified, specify NOT NULL on all the participating columns. +- FOREIGN KEY constraints can reference only tables within the same database on the same server. Cross-database referential integrity must be implemented through triggers. For more information, see [CREATE TRIGGER](../../t-sql/statements/create-trigger-transact-sql.md). +- FOREIGN KEY constraints can reference another column in the same table. This is referred to as a self-reference. +- A FOREIGN KEY constraint specified at the column level can list only one reference column. This column must have the same data type as the column on which the constraint is defined. +- A FOREIGN KEY constraint specified at the table level must have the same number of reference columns as the number of columns in the constraint column list. The data type of each reference column must also be the same as the corresponding column in the column list. +- The [!INCLUDE[ssDE](../../includes/ssde-md.md)] does not have a predefined limit on either the number of FOREIGN KEY constraints a table can contain that reference other tables, or the number of FOREIGN KEY constraints that are owned by other tables that reference a specific table. Nevertheless, the actual number of FOREIGN KEY constraints that can be used is limited by the hardware configuration and by the design of the database and application. A table can reference a maximum of 253 other tables and columns as foreign keys (outgoing references). [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] increases the limit for the number of other table and columns that can reference columns in a single table (incoming references), from 253 to 10,000. (Requires at least 130 compatibility level.) The increase has the following restrictions: + + - Greater than 253 foreign key references are supported for DELETE and UPDATE DML operations. MERGE operations are not supported. + - A table with a foreign key reference to itself is still limited to 253 foreign key references. + - Greater than 253 foreign key references are not currently available for columnstore indexes, memory-optimized tables, or Stretch Database. + +- FOREIGN KEY constraints are not enforced on temporary tables. +- If a foreign key is defined on a CLR user-defined type column, the implementation of the type must support binary ordering. For more information, see [CLR User-Defined Types](../../relational-databases/clr-integration-database-objects-user-defined-types/clr-user-defined-types.md). +- A column of type **varchar(max)** can participate in a FOREIGN KEY constraint only if the primary key it references is also defined as type **varchar(max)**. + +## Permissions + +Creating a new table with a foreign key requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created. + +Creating a foreign key in an existing table requires ALTER permission on the table. + +## Create a foreign key relationship in Table Designer + +### Using SQL Server Management Studio + +1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click **Design**. + + The table opens in **Table Designer**. +2. From the **Table Designer** menu, click **Relationships**. +3. In the **Foreign-key Relationships** dialog box, click **Add**. + + The relationship appears in the **Selected Relationship** list with a system-provided name in the format FK_\<*tablename*>_\<*tablename*>, where *tablename* is the name of the foreign key table. +4. Click the relationship in the **Selected Relationship** list. +5. Click **Tables and Columns Specification** in the grid to the right and click the ellipses (**...**) to the right of the property. +6. In the **Tables and Columns** dialog box, in the **Primary Key** drop-down list, choose the table that will be on the primary-key side of the relationship. +7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table. + + **Table Designer** suggests a name for the relationship. To change this name, edit the contents of the **Relationship Name** text box. +8. Choose **OK** to create the relationship. + +## Create a foreign key in a new table + +### Using Transact-SQL + +The following example creates a table and defines a foreign key constraint on the column `TempID` that references the column `SalesReasonID` in the `Sales.SalesReason` table in the AdventureWorks database. The ON DELETE CASCADE and ON UPDATE CASCADE clauses are used to ensure that changes made to `Sales.SalesReason` table are automatically propagated to the `Sales.TempSalesReason` table. + +```sql +CREATE TABLE Sales.TempSalesReason + ( + TempID int NOT NULL, Name nvarchar(50) + , CONSTRAINT PK_TempSales PRIMARY KEY NONCLUSTERED (TempID) + , CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE + ) +; +``` + +## Create a foreign key in an existing table + +### Using Transact-SQL +The following example creates a foreign key on the column `TempID` and references the column `SalesReasonID` in the `Sales.SalesReason` table in the AdventureWorks database. + +```sql +ALTER TABLE Sales.TempSalesReason + ADD CONSTRAINT FK_TempSales_SalesReason FOREIGN KEY (TempID) + REFERENCES Sales.SalesReason (SalesReasonID) + ON DELETE CASCADE + ON UPDATE CASCADE +; +``` +For more information, see: + +- [ALTER TABLE](../../t-sql/statements/alter-table-transact-sql.md) +- [CREATE TABLE](../../t-sql/statements/create-table-transact-sql.md) +- [table_constraint](../../t-sql/statements/alter-table-table-constraint-transact-sql.md). From de47a4be26ce6d3e39e25c5af17de5fc7143901c Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:04:22 -0700 Subject: [PATCH 20/46] more --- .../tables/rename-columns-database-engine.md | 125 +++++++++-------- .../tables/rename-columns-database-engine.md | 127 ++++++++---------- 2 files changed, 127 insertions(+), 125 deletions(-) diff --git a/docs/2014/relational-databases/tables/rename-columns-database-engine.md b/docs/2014/relational-databases/tables/rename-columns-database-engine.md index 3b7728d000c..03890be4fc4 100644 --- a/docs/2014/relational-databases/tables/rename-columns-database-engine.md +++ b/docs/2014/relational-databases/tables/rename-columns-database-engine.md @@ -16,60 +16,71 @@ ms.author: sstein manager: craigg --- # Rename Columns (Database Engine) - -You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - -**In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To rename columns, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlExample) - -## Before You Begin - -### Limitations and Restrictions - -Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](/sql/relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql) to list dependencies on the object before renaming it. - -### Security - -#### Permissions - -Requires ALTER permission on the object. - -## Using SQL Server Management Studio - -### To rename a column using Object Explorer - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. -2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. -3. Type a new column name. - -### To rename a column using Table Designer - -1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. -2. Under **Column Name**, select the name you want to change and type a new one. -3. On the **File** menu, click **Save**_table name_. - -> [!NOTE] -> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. - -## Using Transact-SQL - -### To rename a column - -The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` in the AdventureWorks database to `TerrID`. - -```sql -EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; -``` - -For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). + You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To rename columns, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](/sql/relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql) to list dependencies on the object before renaming it. + +### Security + +#### Permissions + Requires ALTER permission on the object. + +## Using SQL Server Management Studio + +#### To rename a column using Object Explorer + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. + +3. Type a new column name. + +#### To rename a column using Table Designer + +1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. + +2. Under **Column Name**, select the name you want to change and type a new one. + +3. On the **File** menu, click **Save**_table name_. + +> [!NOTE] +> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. + +## Using Transact-SQL + **To rename a column** + +#### To rename a column + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. On the Standard bar, click **New Query**. + +3. The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` to `TerrID`. Copy and paste the following example into the query window and click **Execute**. + + ``` + USE AdventureWorks2012; + GO + EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; + GO + ``` + + For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). + + \ No newline at end of file diff --git a/docs/relational-databases/tables/rename-columns-database-engine.md b/docs/relational-databases/tables/rename-columns-database-engine.md index 6bf081de57c..943ccb02301 100644 --- a/docs/relational-databases/tables/rename-columns-database-engine.md +++ b/docs/relational-databases/tables/rename-columns-database-engine.md @@ -18,73 +18,64 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Rename Columns (Database Engine) + [!INCLUDE[tsql-appliesto-ss2016-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2016-asdb-xxxx-xxx-md.md)] - You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Restrictions) - - [Security](#Security) - -- **To rename columns, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](../../relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql.md) to list dependencies on the object before renaming it. - -### Security - -#### Permissions - Requires ALTER permission on the object. - -## Using SQL Server Management Studio - -#### To rename a column using Object Explorer - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. - -3. Type a new column name. - -#### To rename a column using Table Designer - -1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. - -2. Under **Column Name**, select the name you want to change and type a new one. - -3. On the **File** menu, click **Save**_table name_. - -> [!NOTE] -> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. - -## Using Transact-SQL - **To rename a column** - -#### To rename a column - -1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. On the Standard bar, click **New Query**. - -3. The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` to `TerrID`. Copy and paste the following example into the query window and click **Execute**. - - ``` - USE AdventureWorks2012; - GO - EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; - GO - ``` - - For more information, see [sp_rename (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-rename-transact-sql.md). - - +You can rename a table column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + +**In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Restrictions) + + [Security](#Security) + +- **To rename columns, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +Renaming a column will not automatically rename references to that column. You must modify any objects that reference the renamed column manually. For example, if you rename a table column and that column is referenced in a trigger, you must modify the trigger to reflect the new column name. Use [sys.sql_expression_dependencies](../../relational-databases/system-catalog-views/sys-sql-expression-dependencies-transact-sql.md) to list dependencies on the object before renaming it. + +### Security + +#### Permissions + +Requires ALTER permission on the object. + +## Using SQL Server Management Studio + +### To rename a column using Object Explorer + +1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../includes/ssde-md.md)]. +2. In **Object Explorer**, right-click the table in which you want to rename columns and choose **Rename**. +3. Type a new column name. + +### To rename a column using Table Designer + +1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**. +2. Under **Column Name**, select the name you want to change and type a new one. +3. On the **File** menu, click **Save**_table name_. + +> [!NOTE] +> You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**. + +## Using Transact-SQL + +**To rename a column** + +### To rename a column + +The following example renames the column `TerritoryID` in the table `Sales.SalesTerritory` to `TerrID` in the AdventureWorks database. + +```sql +EXEC sp_rename 'Sales.SalesTerritory.TerritoryID', 'TerrID', 'COLUMN'; +``` + +For more information, see [sp_rename (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-rename-transact-sql.md). From bff94364c5552d34f35a19e237c30be6c14de194 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:13:00 -0700 Subject: [PATCH 21/46] more --- .../specify-computed-columns-in-a-table.md | 207 +++++++++------- .../specify-computed-columns-in-a-table.md | 226 ++++++++---------- 2 files changed, 221 insertions(+), 212 deletions(-) diff --git a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md index 4dcbfc0e618..7b4eba22dd0 100644 --- a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -14,94 +14,119 @@ ms.author: sstein manager: craigg --- # Specify Computed Columns in a Table - -A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - -**In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Limitations) - - [Security](#Security) - -- **To specify a computed column, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlExample) - -## Before You Begin - -### Limitations and Restrictions - -- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. -- A computed column cannot be the target of an INSERT or UPDATE statement. - -### Security - -#### Permissions - -Requires ALTER permission on the table. - -## Using SQL Server Management Studio - -### To add a new computed column - -1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. -2. Enter the column name and accept the default data type (`nchar`(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type `money` and a column of type `int`, the computed column will be of type `money` because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](/sql/t-sql/data-types/data-type-precedence-transact-sql). -3. In the **Column Properties** tab, expand the **Computed Column Specification** property. -4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. - - > [!IMPORTANT] - > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type `nvarchar` is combined with a column of type `int`, the integer type must be converted to `nvarchar` as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](/sql/t-sql/functions/cast-and-convert-transact-sql). -5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. -6. On the **File** menu, click **Save**_table name_. - -#### To add a computed column definition to an existing column - -1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. -2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. -3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. - -## Using Transact-SQL - -### To add a computed column when creating a table - -The following example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. - -```sql -CREATE TABLE dbo.Products - ( - ProductID int IDENTITY (1,1) NOT NULL - , QtyAvailable smallint - , UnitPrice money - , InventoryValue AS QtyAvailable * UnitPrice - ); --- Insert values into the table. -INSERT INTO dbo.Products (QtyAvailable, UnitPrice) - VALUES (25, 2.00), (10, 1.5); --- Display the rows in the table. -SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue -FROM dbo.Products; -``` - -### To add a new computed column to an existing table - -The following example adds a new column to the table created in the previous example. - -```sql -ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.35); -``` - -### To change an existing column to a computed column - -To change an existing column to a computed column you must drop and re-create the computed column. Copy and paste the following example into the query window and then click **Execute**. The following example modifies the column added in the previous example. - -```sql -ALTER TABLE dbo.Products DROP COLUMN RetailValue; -GO -ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); -``` - -For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). + A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + + **In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Limitations) + + [Security](#Security) + +- **To specify a computed column, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. + +- A computed column cannot be the target of an INSERT or UPDATE statement. + +### Security + +#### Permissions + Requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To add a new computed column + +1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. + +2. Enter the column name and accept the default data type (`nchar`(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type `money` and a column of type `int`, the computed column will be of type `money` because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](/sql/t-sql/data-types/data-type-precedence-transact-sql). + +3. In the **Column Properties** tab, expand the **Computed Column Specification** property. + +4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. + + > [!IMPORTANT] + > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type `nvarchar` is combined with a column of type `int`, the integer type must be converted to `nvarchar` as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](/sql/t-sql/functions/cast-and-convert-transact-sql). + +5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. + +6. On the **File** menu, click **Save**_table name_. + +#### To add a computed column definition to an existing column + +1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. + +2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. + +3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. + +## Using Transact-SQL + +#### To add a computed column when creating a table + +1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. From the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and then click **Execute**. The example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. + + ``` + CREATE TABLE dbo.Products + ( + ProductID int IDENTITY (1,1) NOT NULL + , QtyAvailable smallint + , UnitPrice money + , InventoryValue AS QtyAvailable * UnitPrice + ); + + -- Insert values into the table. + INSERT INTO dbo.Products (QtyAvailable, UnitPrice) + VALUES (25, 2.00), (10, 1.5); + + -- Display the rows in the table. + SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue + FROM dbo.Products; + + ``` + +#### To add a new computed column to an existing table + +1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. From the Standard bar, click **New Query**. + +3. Copy and paste the following example into the query window and then click **Execute**. The following example adds a new column to the table created in the previous example. + + ``` + ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.35); + + ``` + +#### To change an existing column to a computed column + +1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. + +2. From the Standard bar, click **New Query**. + +3. To change an existing column to a computed column you must drop and re-create the computed column. Copy and paste the following example into the query window and then click **Execute**. The following example modifies the column added in the previous example. + + ``` + ALTER TABLE dbo.Products DROP COLUMN RetailValue; + GO + ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); + + ``` + + For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). + +### \ No newline at end of file diff --git a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md index 698948c13e4..21eee45dec1 100644 --- a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -16,126 +16,110 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Specify Computed Columns in a Table + [!INCLUDE[tsql-appliesto-ss-asdb-xxxx-xxx-md](../../includes/appliesto-ss-asdb-xxxx-xxx-md.md)] - A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. - - **In This Topic** - -- **Before you begin:** - - [Limitations and Restrictions](#Limitations) - - [Security](#Security) - -- **To specify a computed column, using:** - - [SQL Server Management Studio](#SSMSProcedure) - - [Transact-SQL](#TsqlProcedure) - -## Before You Begin - -### Limitations and Restrictions - -- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. - -- A computed column cannot be the target of an INSERT or UPDATE statement. - -### Security - -#### Permissions - Requires ALTER permission on the table. - -## Using SQL Server Management Studio - -### To add a new computed column - -1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. - -2. Enter the column name and accept the default data type (**nchar**(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type **money** and a column of type **int**, the computed column will be of type **money** because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](../../t-sql/data-types/data-type-precedence-transact-sql.md). - -3. In the **Column Properties** tab, expand the **Computed Column Specification** property. - -4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. - - > [!IMPORTANT] - > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type **nvarchar** is combined with a column of type **int**, the integer type must be converted to **nvarchar** as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md). - -5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. - -6. On the **File** menu, click **Save**_table name_. - -#### To add a computed column definition to an existing column - -1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. - -2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. - -3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. - -## Using Transact-SQL - -#### To add a computed column when creating a table - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and then click **Execute**. The example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. - - ```sql - CREATE TABLE dbo.Products - ( - ProductID int IDENTITY (1,1) NOT NULL - , QtyAvailable smallint - , UnitPrice money - , InventoryValue AS QtyAvailable * UnitPrice - ); - - -- Insert values into the table. - INSERT INTO dbo.Products (QtyAvailable, UnitPrice) - VALUES (25, 2.00), (10, 1.5); - - -- Display the rows in the table. - SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue - FROM dbo.Products; - - ``` - -#### To add a new computed column to an existing table - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. Copy and paste the following example into the query window and then click **Execute**. The following example adds a new column to the table created in the previous example. - - ```sql - ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); - ``` - - Optionally, add the PERSISTED argument to physically store the computed values in the table: - - ```sql - ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5) PERSISTED; - ``` - - -#### To change an existing column to a computed column - -1. Connect to the [!INCLUDE[ssDE](../../includes/ssde-md.md)]. - -2. From the Standard bar, click **New Query**. - -3. To change an existing column to a computed column you must drop and re-create the computed column. Copy and paste the following example into the query window and then click **Execute**. The following example modifies the column added in the previous example. - - ```sql - ALTER TABLE dbo.Products DROP COLUMN RetailValue; - GO - ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5); - ``` - - For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md). - -### +A computed column is a virtual column that is not physically stored in the table, unless the column is marked PERSISTED. A computed column expression can use data from other columns to calculate a value for the column to which it belongs. You can specify an expression for a computed column in [!INCLUDE[ssCurrent](../../includes/sscurrent-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)]. + +**In This Topic** + +- **Before you begin:** + + [Limitations and Restrictions](#Limitations) + + [Security](#Security) + +- **To specify a computed column, using:** + + [SQL Server Management Studio](#SSMSProcedure) + + [Transact-SQL](#TsqlProcedure) + +## Before You Begin + +### Limitations and Restrictions + +- A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition or with a NOT NULL constraint definition. However, if the computed column value is defined by a deterministic expression and the data type of the result is allowed in index columns, a computed column can be used as a key column in an index or as part of any PRIMARY KEY or UNIQUE constraint. For example, if the table has integer columns a and b, the computed column a + b may be indexed, but computed column a + DATEPART(dd, GETDATE()) cannot be indexed, because the value might change in subsequent invocations. +- A computed column cannot be the target of an INSERT or UPDATE statement. + +### Security + +#### Permissions + +Requires ALTER permission on the table. + +## Using SQL Server Management Studio + +### To add a new computed column + +1. In **Object Explorer**, expand the table for which you want to add the new computed column. Right-click **Columns** and select **New Column**. +2. Enter the column name and accept the default data type (**nchar**(10)). The [!INCLUDE[ssDE](../../includes/ssde-md.md)] determines the data type of the computed column by applying the rules of data type precedence to the expressions specified in the formula. For example, if the formula references a column of type **money** and a column of type **int**, the computed column will be of type **money** because that data type has the higher precedence. For more information, see [Data Type Precedence (Transact-SQL)](../../t-sql/data-types/data-type-precedence-transact-sql.md). +3. In the **Column Properties** tab, expand the **Computed Column Specification** property. +4. In the **(Formula)** child property, enter the expression for this column in the grid cell to the right. For example, in a `SalesTotal` column, the formula you enter might be `SubTotal+TaxAmt+Freight`, which adds the value in these columns for each row in the table. + + > [!IMPORTANT] + > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type **nvarchar** is combined with a column of type **int**, the integer type must be converted to **nvarchar** as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md). + +5.Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. +6.On the **File** menu, click **Save**_table name_. + +#### To add a computed column definition to an existing column + +1. In **Object Explorer**, right-click the table with the column for which you want to change and expand the **Columns** folder. +2. Right-click the column for which you want to specify a computed column formula and click **Delete**. Click **OK**. +3. Add a new column and specify the computed column formula by following the previous procedure to add a new computed column. + +## Using Transact-SQL + +### To add a computed column when creating a table + +The following example creates a table with a computed column that multiplies the value in the `QtyAvailable` column times the value in the `UnitPrice` column. + +```sql +CREATE TABLE dbo.Products + ( + ProductID int IDENTITY (1,1) NOT NULL + , QtyAvailable smallint + , UnitPrice money + , InventoryValue AS QtyAvailable * UnitPrice + ) +; +-- Insert values into the table. +INSERT INTO dbo.Products (QtyAvailable, UnitPrice) + VALUES (25, 2.00), (10, 1.5) +; +-- Display the rows in the table. +SELECT ProductID, QtyAvailable, UnitPrice, InventoryValue +FROM dbo.Products +; +``` + +### To add a new computed column to an existing table + +The following example adds a new column to the table created in the previous example. + +```sql +ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5) +; +``` + +Optionally, add the PERSISTED argument to physically store the computed values in the table: + +```sql +ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5) PERSISTED +; +``` + +### To change an existing column to a computed column + +The following example modifies the column added in the previous example. + +```sql +ALTER TABLE dbo.Products DROP COLUMN RetailValue +; +GO +ALTER TABLE dbo.Products ADD RetailValue AS (QtyAvailable * UnitPrice * 1.5) +; +``` + +For more information, see [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md). From 68bf1fe54160cc7e19683738f447bec73704bad7 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:21:32 -0700 Subject: [PATCH 22/46] more --- ...ered-and-nonclustered-indexes-described.md | 272 ++++++++++++++---- ...ered-and-nonclustered-indexes-described.md | 85 +++--- 2 files changed, 263 insertions(+), 94 deletions(-) diff --git a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md index 77928cfc8e7..1e45eeac96a 100644 --- a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md +++ b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md @@ -1,61 +1,231 @@ --- -title: "Clustered and Nonclustered Indexes Described | Microsoft Docs" +title: "Columnstore Indexes Described | Microsoft Docs" ms.custom: "" -ms.date: "06/13/2017" +ms.date: "03/07/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: table-view-index ms.topic: conceptual helpviewer_keywords: - - "query optimizer [SQL Server], index usage" - - "index concepts [SQL Server]" -ms.assetid: b7d6b323-728d-4763-a987-92e6292f6f7a -author: MikeRayMSFT + - "indexes creation, columnstore" + - "indexes [SQL Server], columnstore" + - "columnstore index" + - "columnstore index, described" + - "xVelocity, columnstore indexes" +ms.assetid: f98af4a5-4523-43b1-be8d-1b03c3217839 +author: mikeraymsft ms.author: mikeray manager: craigg --- -# Clustered and Nonclustered Indexes Described - -An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. - -A table or view can contain the following types of indexes: - -- Clustered - - - Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order. - - - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. - -- Nonclustered - - - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. - - - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. - - - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, 900 bytes and 16 key columns, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](create-indexes-with-included-columns.md). - -Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](create-unique-indexes.md). - -Indexes are automatically maintained for a table or view whenever the table data is modified. - -See [Indexes](indexes.md) for additional types of special purpose indexes. - -## Indexes and Constraints - -Indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns. For example, when you create a table and identify a particular column to be the primary key, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a PRIMARY KEY constraint and index on that column. For more information, see [Create Primary Keys](../tables/create-primary-keys.md) and [Create Unique Constraints](../tables/create-unique-constraints.md). - -## How Indexes Are Used by the Query Optimizer - -Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. - -When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. - -When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. - -The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. - -## Related Tasks - -- [Create Clustered Indexes](create-clustered-indexes.md) - -- [Create Nonclustered Indexes](create-nonclustered-indexes.md) +# Columnstore Indexes Described + The [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] *in-memory columnstore index* stores and manages data by using column-based data storage and column-based query processing. Columnstore indexes work well for data warehousing workloads that primarily perform bulk loads and read-only queries. Use the columnstore index to achieve up to **10x query performance** gains over traditional row-oriented storage, and up to **7x data compression** over the uncompressed data size. + +> [!NOTE] +> We view the clustered columnstore index as the standard for storing large data warehousing fact tables, and expect it will be used in most data warehousing scenarios. Since the clustered columnstore index is updateable, your workload can perform a large number of insert, update, and delete operations. + +## Contents + +- [Basics](#basics) + +- [Loading Data](#dataload) + +- [Performance Tips](#performance) + +- [Related Tasks and Topics](#related) + +## Basics + A *columnstore index* is a technology for storing, retrieving and managing data by using a columnar data format, called a columnstore. [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] supports both clustered and nonclustered columnstore indexes. Both use the same in-memory columnstore technology, but they do have differences in purpose and in features they support. + +### Benefits + Columnstore indexes work well for mostly read-only queries that perform analysis on large data sets. Often, these are queries for data warehousing workloads. Columnstore indexes give high performance gains for queries that use full table scans, and are not well-suited for queries that seek into the data, searching for a particular value. + + Columnstore Index benefits: + +- Columns often have similar data, which results in high compression rates. + +- High compression rates improve query performance by using a smaller in-memory footprint. In turn, query performance can improve because [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] can perform more query and data operations in-memory. + +- A new query execution mechanism called batch-mode execution has been added to SQL Server that reduces CPU usage by a large amount. Batch-mode execution is closely integrated with, and optimized around, the columnstore storage format. Batch-mode execution is sometimes known as vector-based or vectorized execution. + +- Queries often select only a few columns from a table, which reduces total I/O from the physical media. + +### Columnstore Versions + SQL Server 2012, SQL Server 2012 Parallel Data Warehouse, and SQL Server 2014 all use columnstore indexes to accelerate common data warehouse queries. SQL Server 2012 introduced two new features: a nonclustered columnstore index and a vector-based query execution capability that processes data in units called "batches." SQL Server 2014 has the features of SQL Server 2012 plus updateable clustered columnstore indexes. + +### Key Characteristics + +|| +|-| +|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)].| + + In [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], a clustered columnstore index: + +- Is available in Enterprise, Developer, and Evaluation editions. + +- Is updateable. + +- Is the primary storage method for the entire table. + +- Has no key columns. All columns are included columns. + +- Is the only index on the table. It cannot be combined with any other indexes. + +- Can be configured to use columnstore or columnstore archival compression. + +- Does not physically store columns in a sorted order. Instead, it stores data to improve compression and performance. + +|| +|-| +|**Applies to**: [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] through [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)].| + + In [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], a nonclustered columnstore index: + +- Can index a subset of columns in the clustered index or heap. For example, it can index the frequently used columns. + +- Requires extra storage to store a copy of the columns in the index. + +- Is updated by rebuilding the index or switching partitions in and out. It is not updateable by using the DML operations such as insert, update, and delete. + +- Can be combined with other indexes on the table. + +- Can be configured to use columnstore or columnstore archival compression. + +- Does not physically store columns in a sorted order. Instead, it stores data to improve compression and performance. Pre-sorting the data before creating the columnstore index is not required, but can improve columnstore compression. + +### Key Concepts and Terms + The following key terms and concepts are associated with columnstore indexes. + + columnstore index + A *columnstore index* is a technology for storing, retrieving and managing data by using a columnar data format, called a columnstore. [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] supports both clustered and nonclustered columnstore indexes. Both use the same in-memory columnstore technology, but they do have differences in purpose and in features they support. + + columnstore + A *columnstore* is data that is logically organized as a table with rows and columns, and physically stored in a column-wise data format. + + rowstore + A *rowstore* is data that is logically organized as a table with rows and columns, and then physically stored in a row-wise data format. This has been the traditional way to store relational table data. + + rowgroups and column segments + For high performance and high compression rates, the columnstore index slices the table into groups of rows, called row groups, and then compresses each row group in a column-wise manner. The number of rows in the row group must be large enough to improve compression rates, and small enough to benefit from in-memory operations. + + row group + A *rowgroup* is a group of rows that are compressed into columnstore format at the same time. + + column segment + A *column segment* is a column of data from within the rowgroup. + +- A rowgroup usually contains the maximum number of rows per rowgroup which is 1,048,576 rows. + +- Each rowgroup contains one column segment for every column in the table. + +- Each column segment is compressed together and stored on physical media. + + ![Column segment](../../database-engine/media/sql-server-pdw-columnstore-columnsegment.gif "Column segment") + + nonclustered columnstore index + A *nonclustered columnstore index* is a read-only index created on an existing clustered index or heap table. It contains a copy of a subset of columns, up to and including all of the columns in the table.. The table is read-only while it contains a non-clustered columnstore index. + + A nonclustered columnstore index provides a way to have a columnstore index for running analysis queries while at the same time performing read-only operations on the original table. + + ![Nonclustered columnstore index](../../database-engine/media/sql-server-pdw-columnstore-physicalstorage-nonclustered.gif "Nonclustered columnstore index") + + clustered columnstore index + A *clustered columnstore index* is the physical storage for the entire table and is the only index for the table. The clustered index is updateable. You can perform insert, delete, and update operations on the index and you can bulk load data into the index. + + ![Clustered Columnstore Index](../../database-engine/media/sql-server-pdw-columnstore-physicalstorage.gif "Clustered Columnstore Index") + + To reduce fragmentation of the column segments and improve performance, the columnstore index might store some data temporarily into a rowstore table, called a deltastore, plus a B-Tree of IDs for deleted rows. The deltastore operations are handled behind the scenes. To return the correct query results, the clustered columnstore index combines query results from both the columnstore and the deltastore. + + deltastore + Used with clustered columnstore indexes only, a *deltastore* is a rowstore table that stores rows until the number of rows is large enough to be moved into the columnstore. A deltastore is used with clustered columnstore indexes to improve performance for loading and other DML operations. + + During a large bulk load, most of the rows go directly to the columnstore without passing through the deltastore. Some rows at the end of the bulk load might be too few in number to meet the minimum size of a rowgroup which is 102,400 rows. When this happens, the final rows go to the deltastore instead of the columnstore. For small bulk loads with less than 102,400 rows, all of the rows go directly to the deltastore. + + When the deltastore reaches the maximum number of rows, it becomes closed. A tuple-move process checks for closed row groups. When it finds the closed rowgroup, it compresses it and stores it into the columnstore. + +## Loading Data + +### Loading Data into a Nonclustered Columnstore Index + To load data into a nonclustered columnstore index, first load data into a traditional rowstore table stored as a heap or clustered index, and then create the nonclustered columnstore index with [CREATE COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql). + + ![Loading data into a columnstore index](../../database-engine/media/sql-server-pdw-columnstore-loadprocess-nonclustered.gif "Loading data into a columnstore index") + + A table with a nonclustered columnstore index is read-only until the index is dropped or disabled. To update the table and the nonclustered columnstore index you can switch partitions in and out. You can also disable the index, update the table, and then rebuild the index. + + For more information see [Using Nonclustered Columnstore Indexes](indexes.md) + +### Loading Data into a Clustered Columnstore Index + ![Loading into a clustered columnstore index](../../database-engine/media/sql-server-pdw-columnstore-loadprocess.gif "Loading into a clustered columnstore index") + + As the diagram suggests, to load data into a clustered columnstore index, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]: + +1. Inserts maximum-size rowgroups directly into the columnstore. As the data is loaded, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] assigns the data rows in a first-come first-serve order into an open rowgroup. + +2. For each rowgroup, after it reaches the maximum size, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]: + + 1. Marks the rowgroup as CLOSED. + + 2. Bypasses the deltastore. + + 3. Compresses each column segment with the rowgroup with columnstore compression. + + 4. Physically stores each compressed column segment into the columnstore. + +3. Inserts the remaining rows into the columnstore or the deltastore as follows: + + 1. If the number of rows meets the minimum rows per rowgroup requirement, the rows are added to the columnstore. + + 2. If the number of rows is less than the minimum rows per rowgroup, the rows are added to the deltastore. + + For more information about deltastore tasks and processes, see [Using Clustered Columnstore Indexes](../../database-engine/using-clustered-columnstore-indexes.md) + +## Performance Tips + +### Plan for enough memory to create columnstore indexes in parallel + Creating a columnstore index is by default a parallel operation unless memory is constrained. Creating the index in parallel requires more memory than creating the index serially. When there is ample memory, creating a columnstore index takes on the order of 1.5 times as long as building a B-tree on the same columns. + + The memory required for creating a columnstore index depends on the number of columns, the number of string columns, the degree of parallelism (DOP), and the characteristics of the data. For example, if your table has fewer than one million rows, SQL Server will use only one thread to create the columnstore index. + + If your table has more than one million rows, but SQL Server cannot get a large enough memory grant to create the index using MAXDOP, SQL Server will automatically decrease MAXDOP as needed to fit into the available memory grant. In some cases, DOP must be decreased to one in order to build the index under constrained memory. + +## Related Tasks and Topics + +### Nonclustered Columnstore Indexes + For common tasks, see [Using Nonclustered Columnstore Indexes](../../database-engine/using-nonclustered-columnstore-indexes.md). + +- [CREATE COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql) + +- [ALTER INDEX (Transact-SQL)](/sql/t-sql/statements/alter-index-transact-sql) with REBUILD. + +- [DROP INDEX (Transact-SQL)](/sql/t-sql/statements/drop-index-transact-sql) + +### Clustered Columnstore Indexes + For common tasks, see [Using Clustered Columnstore Indexes](../../database-engine/using-clustered-columnstore-indexes.md). + +- [CREATE CLUSTERED COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql) + +- [ALTER INDEX (Transact-SQL)](/sql/t-sql/statements/alter-index-transact-sql) with REBUILD or REORGANIZE. + +- [DROP INDEX (Transact-SQL)](/sql/t-sql/statements/drop-index-transact-sql) + +- [INSERT (Transact-SQL)](/sql/t-sql/statements/insert-transact-sql) + +- [UPDATE (Transact-SQL)](/sql/t-sql/queries/update-transact-sql) + +- [DELETE (Transact-SQL)](/sql/t-sql/statements/delete-transact-sql) + +### Metadata + All of the columns in a columnstore index are stored in the metadata as included columns. The columnstore index does not have key columns. + +- [sys.indexes (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql) + +- [sys.index_columns (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-index-columns-transact-sql) + +- [sys.partitions (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-partitions-transact-sql) + +- [sys.column_store_segments (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-segments-transact-sql) + +- [sys.column_store_dictionaries (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-dictionaries-transact-sql) + +- [sys.column_store_row_groups (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-row-groups-transact-sql) + + \ No newline at end of file diff --git a/docs/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md b/docs/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md index 1b07bdf6e7b..54ced08f631 100644 --- a/docs/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md +++ b/docs/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md @@ -17,53 +17,52 @@ manager: craigg monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- # Clustered and Nonclustered Indexes Described + [!INCLUDE[appliesto-ss-asdb-xxxx-xxx-md](../../includes/appliesto-ss-asdb-xxxx-xxx-md.md)] - An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. - - A table or view can contain the following types of indexes: - -- Clustered - - -   Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be stored in only one order.   - - - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. - -- Nonclustered - - - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. - - - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. - - - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](../../relational-databases/indexes/create-indexes-with-included-columns.md). For details about index key limits see [Maximum Capacity Specifications for SQL Server](../../sql-server/maximum-capacity-specifications-for-sql-server.md). - - Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](../../relational-databases/indexes/create-unique-indexes.md). - - Indexes are automatically maintained for a table or view whenever the table data is modified. - - See [Indexes](../../relational-databases/indexes/indexes.md) for additional types of special purpose indexes. - -## Indexes and Constraints +An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. + +A table or view can contain the following types of indexes: + +- Clustered + + - Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be stored in only one order.   + - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. + +- Nonclustered + + - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. + - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. + + - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](../../relational-databases/indexes/create-indexes-with-included-columns.md). For details about index key limits see [Maximum Capacity Specifications for SQL Server](../../sql-server/maximum-capacity-specifications-for-sql-server.md). + +Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](../../relational-databases/indexes/create-unique-indexes.md). + +Indexes are automatically maintained for a table or view whenever the table data is modified. + +See [Indexes](../../relational-databases/indexes/indexes.md) for additional types of special purpose indexes. + +## Indexes and Constraints Indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns. For example, when you create a table with a UNIQUE constraint, [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a non-clustered index. If you configure a PRIMARY KEY, [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a clustered index, unless a clustered index already exists. When you try to enforce a PRIMARY KEY constraint on an existing table and a clustered index already exists on that table, SQL Server enforces the primary key using a nonclustered index. -For more information, see [Create Primary Keys](../../relational-databases/tables/create-primary-keys.md) and [Create Unique Constraints](../../relational-databases/tables/create-unique-constraints.md). - -## How Indexes are used by the Query Optimizer - Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. - - When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. - - When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. - - The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../../relational-databases/performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. - -> [!IMPORTANT] +For more information, see [Create Primary Keys](../../relational-databases/tables/create-primary-keys.md) and [Create Unique Constraints](../../relational-databases/tables/create-unique-constraints.md). + +## How Indexes are used by the Query Optimizer + +Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. + +When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. + +When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. + + The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../../relational-databases/performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. + +> [!IMPORTANT] > For more information about index design guidelines and internals, refer to the [SQL Server Index Design Guide](../../relational-databases/sql-server-index-design-guide.md). -## Related content - [SQL Server Index Design Guide](../../relational-databases/sql-server-index-design-guide.md) - [Create Clustered Indexes](../../relational-databases/indexes/create-clustered-indexes.md) - [Create Nonclustered Indexes](../../relational-databases/indexes/create-nonclustered-indexes.md) - - +## Related content + +- [SQL Server Index Design Guide](../../relational-databases/sql-server-index-design-guide.md) +- [Create Clustered Indexes](../../relational-databases/indexes/create-clustered-indexes.md) +- [Create Nonclustered Indexes](../../relational-databases/indexes/create-nonclustered-indexes.md) From 2c110d0f83eeebc18380170f9d2c01fe5f6c5f8d Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:27:07 -0700 Subject: [PATCH 23/46] more --- .../relational-databases/indexes/index-properties-f1-help.md | 2 +- .../tables/create-foreign-key-relationships.md | 2 +- docs/2014/relational-databases/tables/create-primary-keys.md | 1 - .../tables/rename-columns-database-engine.md | 2 +- .../tables/specify-computed-columns-in-a-table.md | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/2014/relational-databases/indexes/index-properties-f1-help.md b/docs/2014/relational-databases/indexes/index-properties-f1-help.md index 8b69e548ac3..6e7f846a5f1 100644 --- a/docs/2014/relational-databases/indexes/index-properties-f1-help.md +++ b/docs/2014/relational-databases/indexes/index-properties-f1-help.md @@ -237,4 +237,4 @@ manager: craigg [INDEXPROPERTY (Transact-SQL)](/sql/t-sql/functions/indexproperty-transact-sql) [sys.indexes (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql) - \ No newline at end of file + diff --git a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md index 3b59e0da026..669b98553d0 100644 --- a/docs/2014/relational-databases/tables/create-foreign-key-relationships.md +++ b/docs/2014/relational-databases/tables/create-foreign-key-relationships.md @@ -133,4 +133,4 @@ manager: craigg For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). - \ No newline at end of file + diff --git a/docs/2014/relational-databases/tables/create-primary-keys.md b/docs/2014/relational-databases/tables/create-primary-keys.md index 59577824028..e1becd995b6 100644 --- a/docs/2014/relational-databases/tables/create-primary-keys.md +++ b/docs/2014/relational-databases/tables/create-primary-keys.md @@ -105,4 +105,3 @@ manager: craigg For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). -### \ No newline at end of file diff --git a/docs/2014/relational-databases/tables/rename-columns-database-engine.md b/docs/2014/relational-databases/tables/rename-columns-database-engine.md index 03890be4fc4..f875a219e55 100644 --- a/docs/2014/relational-databases/tables/rename-columns-database-engine.md +++ b/docs/2014/relational-databases/tables/rename-columns-database-engine.md @@ -83,4 +83,4 @@ manager: craigg For more information, see [sp_rename (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-rename-transact-sql). - \ No newline at end of file + diff --git a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md index 7b4eba22dd0..10aea16d0bf 100644 --- a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -129,4 +129,3 @@ manager: craigg For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). -### \ No newline at end of file From 9f87a21b6e1e5338e2817832380fea5f077b35e7 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:29:40 -0700 Subject: [PATCH 24/46] more --- ...ered-and-nonclustered-indexes-described.md | 230 +++--------------- 1 file changed, 29 insertions(+), 201 deletions(-) diff --git a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md index 1e45eeac96a..83c288d2f52 100644 --- a/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md +++ b/docs/2014/relational-databases/indexes/clustered-and-nonclustered-indexes-described.md @@ -1,231 +1,59 @@ --- -title: "Columnstore Indexes Described | Microsoft Docs" +title: "Clustered and Nonclustered Indexes Described | Microsoft Docs" ms.custom: "" -ms.date: "03/07/2017" +ms.date: "06/13/2017" ms.prod: "sql-server-2014" ms.reviewer: "" ms.technology: table-view-index ms.topic: conceptual helpviewer_keywords: - - "indexes creation, columnstore" - - "indexes [SQL Server], columnstore" - - "columnstore index" - - "columnstore index, described" - - "xVelocity, columnstore indexes" -ms.assetid: f98af4a5-4523-43b1-be8d-1b03c3217839 -author: mikeraymsft + - "query optimizer [SQL Server], index usage" + - "index concepts [SQL Server]" +ms.assetid: b7d6b323-728d-4763-a987-92e6292f6f7a +author: MikeRayMSFT ms.author: mikeray manager: craigg --- -# Columnstore Indexes Described - The [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] *in-memory columnstore index* stores and manages data by using column-based data storage and column-based query processing. Columnstore indexes work well for data warehousing workloads that primarily perform bulk loads and read-only queries. Use the columnstore index to achieve up to **10x query performance** gains over traditional row-oriented storage, and up to **7x data compression** over the uncompressed data size. +# Clustered and Nonclustered Indexes Described + An index is an on-disk structure associated with a table or view that speeds retrieval of rows from the table or view. An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] to find the row or rows associated with the key values quickly and efficiently. -> [!NOTE] -> We view the clustered columnstore index as the standard for storing large data warehousing fact tables, and expect it will be used in most data warehousing scenarios. Since the clustered columnstore index is updateable, your workload can perform a large number of insert, update, and delete operations. + A table or view can contain the following types of indexes: -## Contents +- Clustered -- [Basics](#basics) + - Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition. There can be only one clustered index per table, because the data rows themselves can be sorted in only one order. -- [Loading Data](#dataload) + - The only time the data rows in a table are stored in sorted order is when the table contains a clustered index. When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap. -- [Performance Tips](#performance) +- Nonclustered -- [Related Tasks and Topics](#related) + - Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value. -## Basics - A *columnstore index* is a technology for storing, retrieving and managing data by using a columnar data format, called a columnstore. [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] supports both clustered and nonclustered columnstore indexes. Both use the same in-memory columnstore technology, but they do have differences in purpose and in features they support. + - The pointer from an index row in a nonclustered index to a data row is called a row locator. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered table. For a heap, a row locator is a pointer to the row. For a clustered table, the row locator is the clustered index key. -### Benefits - Columnstore indexes work well for mostly read-only queries that perform analysis on large data sets. Often, these are queries for data warehousing workloads. Columnstore indexes give high performance gains for queries that use full table scans, and are not well-suited for queries that seek into the data, searching for a particular value. + - You can add nonkey columns to the leaf level of the nonclustered index to by-pass existing index key limits, 900 bytes and 16 key columns, and execute fully covered, indexed, queries. For more information, see [Create Indexes with Included Columns](create-indexes-with-included-columns.md). - Columnstore Index benefits: + Both clustered and nonclustered indexes can be unique. This means no two rows can have the same value for the index key. Otherwise, the index is not unique and multiple rows can share the same key value. For more information, see [Create Unique Indexes](create-unique-indexes.md). -- Columns often have similar data, which results in high compression rates. + Indexes are automatically maintained for a table or view whenever the table data is modified. -- High compression rates improve query performance by using a smaller in-memory footprint. In turn, query performance can improve because [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] can perform more query and data operations in-memory. + See [Indexes](indexes.md) for additional types of special purpose indexes. -- A new query execution mechanism called batch-mode execution has been added to SQL Server that reduces CPU usage by a large amount. Batch-mode execution is closely integrated with, and optimized around, the columnstore storage format. Batch-mode execution is sometimes known as vector-based or vectorized execution. +## Indexes and Constraints + Indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns. For example, when you create a table and identify a particular column to be the primary key, the [!INCLUDE[ssDE](../../includes/ssde-md.md)] automatically creates a PRIMARY KEY constraint and index on that column. For more information, see [Create Primary Keys](../tables/create-primary-keys.md) and [Create Unique Constraints](../tables/create-unique-constraints.md). -- Queries often select only a few columns from a table, which reduces total I/O from the physical media. +## How Indexes Are Used by the Query Optimizer + Well-designed indexes can reduce disk I/O operations and consume fewer system resources therefore improving query performance. Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, DELETE, or MERGE statements. Consider the query `SELECT Title, HireDate FROM HumanResources.Employee WHERE EmployeeID = 250` in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database. When this query is executed, the query optimizer evaluates each available method for retrieving the data and selects the most efficient method. The method may be a table scan, or may be scanning one or more indexes if they exist. -### Columnstore Versions - SQL Server 2012, SQL Server 2012 Parallel Data Warehouse, and SQL Server 2014 all use columnstore indexes to accelerate common data warehouse queries. SQL Server 2012 introduced two new features: a nonclustered columnstore index and a vector-based query execution capability that processes data in units called "batches." SQL Server 2014 has the features of SQL Server 2012 plus updateable clustered columnstore indexes. + When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates many disk I/O operations and can be resource intensive. However, a table scan could be the most efficient method if, for example, the result set of the query is a high percentage of rows from the table. -### Key Characteristics + When the query optimizer uses an index, it searches the index key columns, finds the storage location of the rows needed by the query and extracts the matching rows from that location. Generally, searching the index is much faster than searching the table because unlike a table, an index frequently contains very few columns per row and the rows are in sorted order. -|| -|-| -|**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] through [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)].| + The query optimizer typically selects the most efficient method when executing queries. However, if no indexes are available, the query optimizer must use a table scan. Your task is to design and create indexes that are best suited to your environment so that the query optimizer has a selection of efficient indexes from which to select. [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] provides the [Database Engine Tuning Advisor](../performance/database-engine-tuning-advisor.md) to help with the analysis of your database environment and in the selection of appropriate indexes. - In [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], a clustered columnstore index: +## Related Tasks + [Create Clustered Indexes](create-clustered-indexes.md) -- Is available in Enterprise, Developer, and Evaluation editions. + [Create Nonclustered Indexes](create-nonclustered-indexes.md) -- Is updateable. -- Is the primary storage method for the entire table. - -- Has no key columns. All columns are included columns. - -- Is the only index on the table. It cannot be combined with any other indexes. - -- Can be configured to use columnstore or columnstore archival compression. - -- Does not physically store columns in a sorted order. Instead, it stores data to improve compression and performance. - -|| -|-| -|**Applies to**: [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] through [!INCLUDE[ssCurrent](../../../includes/sscurrent-md.md)].| - - In [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)], a nonclustered columnstore index: - -- Can index a subset of columns in the clustered index or heap. For example, it can index the frequently used columns. - -- Requires extra storage to store a copy of the columns in the index. - -- Is updated by rebuilding the index or switching partitions in and out. It is not updateable by using the DML operations such as insert, update, and delete. - -- Can be combined with other indexes on the table. - -- Can be configured to use columnstore or columnstore archival compression. - -- Does not physically store columns in a sorted order. Instead, it stores data to improve compression and performance. Pre-sorting the data before creating the columnstore index is not required, but can improve columnstore compression. - -### Key Concepts and Terms - The following key terms and concepts are associated with columnstore indexes. - - columnstore index - A *columnstore index* is a technology for storing, retrieving and managing data by using a columnar data format, called a columnstore. [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] supports both clustered and nonclustered columnstore indexes. Both use the same in-memory columnstore technology, but they do have differences in purpose and in features they support. - - columnstore - A *columnstore* is data that is logically organized as a table with rows and columns, and physically stored in a column-wise data format. - - rowstore - A *rowstore* is data that is logically organized as a table with rows and columns, and then physically stored in a row-wise data format. This has been the traditional way to store relational table data. - - rowgroups and column segments - For high performance and high compression rates, the columnstore index slices the table into groups of rows, called row groups, and then compresses each row group in a column-wise manner. The number of rows in the row group must be large enough to improve compression rates, and small enough to benefit from in-memory operations. - - row group - A *rowgroup* is a group of rows that are compressed into columnstore format at the same time. - - column segment - A *column segment* is a column of data from within the rowgroup. - -- A rowgroup usually contains the maximum number of rows per rowgroup which is 1,048,576 rows. - -- Each rowgroup contains one column segment for every column in the table. - -- Each column segment is compressed together and stored on physical media. - - ![Column segment](../../database-engine/media/sql-server-pdw-columnstore-columnsegment.gif "Column segment") - - nonclustered columnstore index - A *nonclustered columnstore index* is a read-only index created on an existing clustered index or heap table. It contains a copy of a subset of columns, up to and including all of the columns in the table.. The table is read-only while it contains a non-clustered columnstore index. - - A nonclustered columnstore index provides a way to have a columnstore index for running analysis queries while at the same time performing read-only operations on the original table. - - ![Nonclustered columnstore index](../../database-engine/media/sql-server-pdw-columnstore-physicalstorage-nonclustered.gif "Nonclustered columnstore index") - - clustered columnstore index - A *clustered columnstore index* is the physical storage for the entire table and is the only index for the table. The clustered index is updateable. You can perform insert, delete, and update operations on the index and you can bulk load data into the index. - - ![Clustered Columnstore Index](../../database-engine/media/sql-server-pdw-columnstore-physicalstorage.gif "Clustered Columnstore Index") - - To reduce fragmentation of the column segments and improve performance, the columnstore index might store some data temporarily into a rowstore table, called a deltastore, plus a B-Tree of IDs for deleted rows. The deltastore operations are handled behind the scenes. To return the correct query results, the clustered columnstore index combines query results from both the columnstore and the deltastore. - - deltastore - Used with clustered columnstore indexes only, a *deltastore* is a rowstore table that stores rows until the number of rows is large enough to be moved into the columnstore. A deltastore is used with clustered columnstore indexes to improve performance for loading and other DML operations. - - During a large bulk load, most of the rows go directly to the columnstore without passing through the deltastore. Some rows at the end of the bulk load might be too few in number to meet the minimum size of a rowgroup which is 102,400 rows. When this happens, the final rows go to the deltastore instead of the columnstore. For small bulk loads with less than 102,400 rows, all of the rows go directly to the deltastore. - - When the deltastore reaches the maximum number of rows, it becomes closed. A tuple-move process checks for closed row groups. When it finds the closed rowgroup, it compresses it and stores it into the columnstore. - -## Loading Data - -### Loading Data into a Nonclustered Columnstore Index - To load data into a nonclustered columnstore index, first load data into a traditional rowstore table stored as a heap or clustered index, and then create the nonclustered columnstore index with [CREATE COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql). - - ![Loading data into a columnstore index](../../database-engine/media/sql-server-pdw-columnstore-loadprocess-nonclustered.gif "Loading data into a columnstore index") - - A table with a nonclustered columnstore index is read-only until the index is dropped or disabled. To update the table and the nonclustered columnstore index you can switch partitions in and out. You can also disable the index, update the table, and then rebuild the index. - - For more information see [Using Nonclustered Columnstore Indexes](indexes.md) - -### Loading Data into a Clustered Columnstore Index - ![Loading into a clustered columnstore index](../../database-engine/media/sql-server-pdw-columnstore-loadprocess.gif "Loading into a clustered columnstore index") - - As the diagram suggests, to load data into a clustered columnstore index, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]: - -1. Inserts maximum-size rowgroups directly into the columnstore. As the data is loaded, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] assigns the data rows in a first-come first-serve order into an open rowgroup. - -2. For each rowgroup, after it reaches the maximum size, [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)]: - - 1. Marks the rowgroup as CLOSED. - - 2. Bypasses the deltastore. - - 3. Compresses each column segment with the rowgroup with columnstore compression. - - 4. Physically stores each compressed column segment into the columnstore. - -3. Inserts the remaining rows into the columnstore or the deltastore as follows: - - 1. If the number of rows meets the minimum rows per rowgroup requirement, the rows are added to the columnstore. - - 2. If the number of rows is less than the minimum rows per rowgroup, the rows are added to the deltastore. - - For more information about deltastore tasks and processes, see [Using Clustered Columnstore Indexes](../../database-engine/using-clustered-columnstore-indexes.md) - -## Performance Tips - -### Plan for enough memory to create columnstore indexes in parallel - Creating a columnstore index is by default a parallel operation unless memory is constrained. Creating the index in parallel requires more memory than creating the index serially. When there is ample memory, creating a columnstore index takes on the order of 1.5 times as long as building a B-tree on the same columns. - - The memory required for creating a columnstore index depends on the number of columns, the number of string columns, the degree of parallelism (DOP), and the characteristics of the data. For example, if your table has fewer than one million rows, SQL Server will use only one thread to create the columnstore index. - - If your table has more than one million rows, but SQL Server cannot get a large enough memory grant to create the index using MAXDOP, SQL Server will automatically decrease MAXDOP as needed to fit into the available memory grant. In some cases, DOP must be decreased to one in order to build the index under constrained memory. - -## Related Tasks and Topics - -### Nonclustered Columnstore Indexes - For common tasks, see [Using Nonclustered Columnstore Indexes](../../database-engine/using-nonclustered-columnstore-indexes.md). - -- [CREATE COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql) - -- [ALTER INDEX (Transact-SQL)](/sql/t-sql/statements/alter-index-transact-sql) with REBUILD. - -- [DROP INDEX (Transact-SQL)](/sql/t-sql/statements/drop-index-transact-sql) - -### Clustered Columnstore Indexes - For common tasks, see [Using Clustered Columnstore Indexes](../../database-engine/using-clustered-columnstore-indexes.md). - -- [CREATE CLUSTERED COLUMNSTORE INDEX (Transact-SQL)](/sql/t-sql/statements/create-columnstore-index-transact-sql) - -- [ALTER INDEX (Transact-SQL)](/sql/t-sql/statements/alter-index-transact-sql) with REBUILD or REORGANIZE. - -- [DROP INDEX (Transact-SQL)](/sql/t-sql/statements/drop-index-transact-sql) - -- [INSERT (Transact-SQL)](/sql/t-sql/statements/insert-transact-sql) - -- [UPDATE (Transact-SQL)](/sql/t-sql/queries/update-transact-sql) - -- [DELETE (Transact-SQL)](/sql/t-sql/statements/delete-transact-sql) - -### Metadata - All of the columns in a columnstore index are stored in the metadata as included columns. The columnstore index does not have key columns. - -- [sys.indexes (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-indexes-transact-sql) - -- [sys.index_columns (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-index-columns-transact-sql) - -- [sys.partitions (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-partitions-transact-sql) - -- [sys.column_store_segments (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-segments-transact-sql) - -- [sys.column_store_dictionaries (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-dictionaries-transact-sql) - -- [sys.column_store_row_groups (Transact-SQL)](/sql/relational-databases/system-catalog-views/sys-column-store-row-groups-transact-sql) - - \ No newline at end of file From 0024d964021e7447a31743c665b9503cce390e09 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 2 Jul 2019 18:31:23 -0700 Subject: [PATCH 25/46] more --- docs/2014/relational-databases/tables/create-primary-keys.md | 1 + .../tables/specify-computed-columns-in-a-table.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/2014/relational-databases/tables/create-primary-keys.md b/docs/2014/relational-databases/tables/create-primary-keys.md index e1becd995b6..e3afbb0fece 100644 --- a/docs/2014/relational-databases/tables/create-primary-keys.md +++ b/docs/2014/relational-databases/tables/create-primary-keys.md @@ -105,3 +105,4 @@ manager: craigg For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql), [CREATE TABLE (Transact-SQL)](/sql/t-sql/statements/create-table-transact-sql), and [table_constraint (Transact-SQL)](/sql/relational-databases/system-information-schema-views/table-constraints-transact-sql). +### diff --git a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md index 10aea16d0bf..16fe199633f 100644 --- a/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/2014/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -129,3 +129,4 @@ manager: craigg For more information, see [ALTER TABLE (Transact-SQL)](/sql/t-sql/statements/alter-table-transact-sql). +### From 5e16e62ce4a8aa2ba7c1aeb7351e511beda05928 Mon Sep 17 00:00:00 2001 From: Jason Roth Date: Tue, 9 Jul 2019 15:07:38 -0400 Subject: [PATCH 26/46] Big data cluster and polybase owners --- .../app-deployment-extension.md | 2 +- .../big-data-cluster-consume-apps.md | 3 +-- .../big-data-cluster-create-apps.md | 3 +-- .../big-data-cluster-overview.md | 6 +++--- .../cluster-troubleshooting-commands.md | 6 +++--- .../concept-application-deployment.md | 3 +-- docs/big-data-cluster/concept-compute-pool.md | 6 +++--- docs/big-data-cluster/concept-controller.md | 3 +-- .../concept-data-persistence.md | 6 +++--- docs/big-data-cluster/concept-data-pool.md | 6 +++--- .../concept-master-instance.md | 6 +++--- docs/big-data-cluster/concept-security.md | 3 +-- docs/big-data-cluster/concept-storage-pool.md | 6 +++--- .../connect-to-big-data-cluster.md | 5 +++-- docs/big-data-cluster/data-ingestion-curl.md | 6 +++--- .../data-ingestion-restore-database.md | 6 +++--- docs/big-data-cluster/deploy-big-data-tools.md | 6 +++--- docs/big-data-cluster/deploy-get-started.md | 5 +++-- .../deploy-install-mssqlctl.md | 5 +++-- docs/big-data-cluster/deploy-offline.md | 5 +++-- docs/big-data-cluster/deploy-on-aks.md | 6 +++--- docs/big-data-cluster/deploy-on-minikube.md | 6 +++--- docs/big-data-cluster/deploy-with-kubeadm.md | 6 +++--- .../deployment-custom-configuration.md | 5 +++-- docs/big-data-cluster/deployment-guidance.md | 6 +++--- docs/big-data-cluster/deployment-upgrade.md | 5 +++-- .../hdfs-tiering-mount-adlsgen2.md | 2 +- docs/big-data-cluster/hdfs-tiering-mount-s3.md | 2 +- docs/big-data-cluster/hdfs-tiering.md | 2 +- docs/big-data-cluster/notebooks-guidance.md | 6 +++--- .../notebooks-how-to-manage.md | 6 +++--- .../quickstart-big-data-cluster-deploy.md | 18 +++++++++--------- .../reference-deployment-config.md | 5 +++-- .../reference-mssqlctl-app-template.md | 5 +++-- .../big-data-cluster/reference-mssqlctl-app.md | 5 +++-- .../reference-mssqlctl-bdc-config-section.md | 5 +++-- .../reference-mssqlctl-bdc-config.md | 5 +++-- .../reference-mssqlctl-bdc-control-status.md | 5 +++-- .../reference-mssqlctl-bdc-control.md | 5 +++-- .../reference-mssqlctl-bdc-debug.md | 5 +++-- .../reference-mssqlctl-bdc-endpoint.md | 5 +++-- .../reference-mssqlctl-bdc-pool-status.md | 5 +++-- .../reference-mssqlctl-bdc-pool.md | 5 +++-- .../reference-mssqlctl-bdc-status.md | 5 +++-- ...eference-mssqlctl-bdc-storage-pool-mount.md | 5 +++-- .../reference-mssqlctl-bdc-storage-pool.md | 5 +++-- .../big-data-cluster/reference-mssqlctl-bdc.md | 5 +++-- .../reference-mssqlctl-hdfs.md | 5 +++-- .../big-data-cluster/reference-mssqlctl-sql.md | 5 +++-- docs/big-data-cluster/reference-mssqlctl.md | 5 +++-- .../release-notes-big-data-cluster.md | 6 +++--- .../spark-create-machine-learning-model.md | 3 +-- docs/big-data-cluster/spark-history-server.md | 3 +-- docs/big-data-cluster/spark-mssql-connector.md | 5 +++-- .../spark-submit-job-intellij-tool-plugin.md | 2 +- docs/big-data-cluster/spark-submit-job.md | 2 +- docs/big-data-cluster/sparklyr-from-RStudio.md | 2 +- .../tutorial-data-pool-ingest-spark.md | 6 +++--- .../tutorial-data-pool-ingest-sql.md | 6 +++--- .../tutorial-load-sample-data.md | 6 +++--- .../tutorial-notebook-spark.md | 6 +++--- .../tutorial-query-hdfs-storage-pool.md | 6 +++--- docs/big-data-cluster/tutorial-query-oracle.md | 6 +++--- .../use-prose-for-big-data-automation.md | 6 +++--- docs/big-data-cluster/view-cluster-status.md | 3 ++- .../configure-scale-out-groups-windows.md | 7 +++---- .../polybase/data-virtualization-csv.md | 2 +- .../polybase/data-virtualization.md | 2 +- .../polybase/polybase-configuration.md | 7 +++---- .../polybase-configure-azure-blob-storage.md | 7 +++---- .../polybase/polybase-configure-hadoop.md | 7 +++---- .../polybase/polybase-configure-mongodb.md | 3 +-- .../polybase-configure-odbc-generic.md | 3 +-- .../polybase/polybase-configure-oracle.md | 3 +-- .../polybase/polybase-configure-sql-server.md | 3 +-- .../polybase/polybase-configure-teradata.md | 3 +-- .../polybase/polybase-faq.md | 3 +-- .../polybase/polybase-guide.md | 7 +++---- .../polybase/polybase-installation.md | 7 +++---- .../polybase/polybase-pushdown-computation.md | 7 +++---- .../polybase/polybase-queries.md | 7 +++---- .../polybase/polybase-scale-out-groups.md | 7 +++---- .../polybase/polybase-t-sql-objects.md | 7 +++---- .../polybase-troubleshoot-connectivity.md | 3 +-- .../polybase/polybase-troubleshooting.md | 7 +++---- .../polybase/polybase-type-mapping.md | 6 +++--- .../polybase-versioned-feature-summary.md | 7 +++---- 87 files changed, 220 insertions(+), 220 deletions(-) diff --git a/docs/big-data-cluster/app-deployment-extension.md b/docs/big-data-cluster/app-deployment-extension.md index f60f67316a8..2d53d9bf898 100644 --- a/docs/big-data-cluster/app-deployment-extension.md +++ b/docs/big-data-cluster/app-deployment-extension.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: Deploy a Python or R script as an application on SQL Server 2019 big data cluster (preview). author: jeroenterheerdt ms.author: jterh -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 02/28/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/big-data-cluster-consume-apps.md b/docs/big-data-cluster/big-data-cluster-consume-apps.md index 56e1ac81667..8067fbc656c 100644 --- a/docs/big-data-cluster/big-data-cluster-consume-apps.md +++ b/docs/big-data-cluster/big-data-cluster-consume-apps.md @@ -4,13 +4,12 @@ titleSuffix: SQL Server big data clusters description: Consume an application deployed on SQL Server 2019 big data cluster using a RESTful web service (preview). author: jeroenterheerdt ms.author: jterh -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 03/18/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Consume an app deployed on SQL Server big data cluster using a RESTful web service diff --git a/docs/big-data-cluster/big-data-cluster-create-apps.md b/docs/big-data-cluster/big-data-cluster-create-apps.md index 68addb53806..b4864a73fb9 100644 --- a/docs/big-data-cluster/big-data-cluster-create-apps.md +++ b/docs/big-data-cluster/big-data-cluster-create-apps.md @@ -4,13 +4,12 @@ titleSuffix: SQL Server big data clusters description: Deploy a Python or R script as an application on SQL Server 2019 big data cluster (preview). author: jeroenterheerdt ms.author: jterh -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # How to deploy an app on SQL Server big data cluster (preview) diff --git a/docs/big-data-cluster/big-data-cluster-overview.md b/docs/big-data-cluster/big-data-cluster-overview.md index c2a1445610f..63419841c67 100644 --- a/docs/big-data-cluster/big-data-cluster-overview.md +++ b/docs/big-data-cluster/big-data-cluster-overview.md @@ -2,14 +2,14 @@ title: What are big data clusters? titleSuffix: SQL Server big data clusters description: Learn about SQL Server 2019 big data clusters (preview) that run on Kubernetes and provide scale-out options for both relational and HDFS data. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: overview ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What are SQL Server big data clusters? diff --git a/docs/big-data-cluster/cluster-troubleshooting-commands.md b/docs/big-data-cluster/cluster-troubleshooting-commands.md index 847b15f0958..72ebd00d1d5 100644 --- a/docs/big-data-cluster/cluster-troubleshooting-commands.md +++ b/docs/big-data-cluster/cluster-troubleshooting-commands.md @@ -2,14 +2,14 @@ title: Monitor and troubleshoot titleSuffix: SQL Server big data clusters description: This article provides useful commands for monitoring and troubleshooting a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: mihaelablendea +ms.author: mihaelab +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Monitoring and troubleshoot SQL Server big data clusters diff --git a/docs/big-data-cluster/concept-application-deployment.md b/docs/big-data-cluster/concept-application-deployment.md index d8e19ceb693..3ade94f5e68 100644 --- a/docs/big-data-cluster/concept-application-deployment.md +++ b/docs/big-data-cluster/concept-application-deployment.md @@ -3,13 +3,12 @@ title: What is Application Deployment? titleSuffix: SQL Server 2019 big data clusters description: This article describes application deployment on a SQL Server 2019 big data cluster (preview). author: jterh -ms.author: jroth +ms.author: mikeray manager: jroth ms.date: 03/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What is Application Deployment on a SQL Server 2019 big data cluster? diff --git a/docs/big-data-cluster/concept-compute-pool.md b/docs/big-data-cluster/concept-compute-pool.md index a69f1df6798..6ba98b58479 100644 --- a/docs/big-data-cluster/concept-compute-pool.md +++ b/docs/big-data-cluster/concept-compute-pool.md @@ -2,14 +2,14 @@ title: What are compute pools? titleSuffix: SQL Server big data clusters description: This article describes the compute pool in a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 02/28/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What are compute pools in a SQL Server big data cluster? diff --git a/docs/big-data-cluster/concept-controller.md b/docs/big-data-cluster/concept-controller.md index 8f5e51ed160..06beb66cb61 100644 --- a/docs/big-data-cluster/concept-controller.md +++ b/docs/big-data-cluster/concept-controller.md @@ -4,13 +4,12 @@ titleSuffix: SQL Server big data clusters description: This article describes the controller of a SQL Server 2019 big data cluster (preview). author: mihaelablendea ms.author: mihaelab -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What is the controller on a SQL Server big data cluster? diff --git a/docs/big-data-cluster/concept-data-persistence.md b/docs/big-data-cluster/concept-data-persistence.md index 008c0410416..a427fe46c19 100644 --- a/docs/big-data-cluster/concept-data-persistence.md +++ b/docs/big-data-cluster/concept-data-persistence.md @@ -2,14 +2,14 @@ title: Data persistence on Kubernetes titleSuffix: SQL Server big data clusters description: Learn about how data persistence works in a SQL Server 2019 big data cluster. -author: rothja -ms.author: jroth +author: mihaelablendea +ms.author: mihaelab +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Data persistence with SQL Server big data cluster on Kubernetes diff --git a/docs/big-data-cluster/concept-data-pool.md b/docs/big-data-cluster/concept-data-pool.md index 18d02601aca..26756509128 100644 --- a/docs/big-data-cluster/concept-data-pool.md +++ b/docs/big-data-cluster/concept-data-pool.md @@ -2,14 +2,14 @@ title: What are data pools? titleSuffix: SQL Server big data clusters description: This article describes the data pool in a SQL Server 2019 big data cluster. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What are data pools in a SQL Server big data cluster? diff --git a/docs/big-data-cluster/concept-master-instance.md b/docs/big-data-cluster/concept-master-instance.md index 82e06eae11b..6244c8add14 100644 --- a/docs/big-data-cluster/concept-master-instance.md +++ b/docs/big-data-cluster/concept-master-instance.md @@ -2,14 +2,14 @@ title: What is the master instance? titleSuffix: SQL Server big data clusters description: This article describes the SQL Server master instance in a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 02/28/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What is the master instance in a SQL Server big data cluster? diff --git a/docs/big-data-cluster/concept-security.md b/docs/big-data-cluster/concept-security.md index 15fbccd19e0..538bcec08bb 100644 --- a/docs/big-data-cluster/concept-security.md +++ b/docs/big-data-cluster/concept-security.md @@ -4,13 +4,12 @@ titleSuffix: SQL Server big data clusters description: This article describes security concepts for SQL Server 2019 big data cluster (preview). This includes describing the cluster endpoints and cluster authentication. author: nelgson ms.author: negust -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Security concepts for SQL Server big data clusters diff --git a/docs/big-data-cluster/concept-storage-pool.md b/docs/big-data-cluster/concept-storage-pool.md index f5a3c64e001..ebd093d6d0f 100644 --- a/docs/big-data-cluster/concept-storage-pool.md +++ b/docs/big-data-cluster/concept-storage-pool.md @@ -2,14 +2,14 @@ title: What is the storage pool? titleSuffix: SQL Server big data clusters description: This article describes the storage pool in a SQL Server 2019 big data cluster. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # What is the storage pool (SQL Server big data clusters)? diff --git a/docs/big-data-cluster/connect-to-big-data-cluster.md b/docs/big-data-cluster/connect-to-big-data-cluster.md index dac13b03bcd..b02d8f0d06c 100644 --- a/docs/big-data-cluster/connect-to-big-data-cluster.md +++ b/docs/big-data-cluster/connect-to-big-data-cluster.md @@ -2,8 +2,9 @@ title: Connect to master and HDFS titleSuffix: SQL Server big data clusters description: Learn how to connect to the SQL Server master instance and the HDFS/Spark gateway for a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 05/22/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/data-ingestion-curl.md b/docs/big-data-cluster/data-ingestion-curl.md index a2a3c57614e..27548128717 100644 --- a/docs/big-data-cluster/data-ingestion-curl.md +++ b/docs/big-data-cluster/data-ingestion-curl.md @@ -2,14 +2,14 @@ title: Use curl to load data into HDFS | Microsoft Docs titleSuffix: SQL Server big data clusters description: Use curl to load data into HDFS on SQL Server 2019 big data clusters. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 04/23/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Use curl to load data into HDFS on SQL Server big data clusters diff --git a/docs/big-data-cluster/data-ingestion-restore-database.md b/docs/big-data-cluster/data-ingestion-restore-database.md index f3d3ef22068..3e9c2f5d571 100644 --- a/docs/big-data-cluster/data-ingestion-restore-database.md +++ b/docs/big-data-cluster/data-ingestion-restore-database.md @@ -2,14 +2,14 @@ title: Restore a database titleSuffix: SQL Server big data clusters description: This article shows how to restore a database into the master instance of a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Restore a database into the SQL Server big data cluster master instance diff --git a/docs/big-data-cluster/deploy-big-data-tools.md b/docs/big-data-cluster/deploy-big-data-tools.md index e2768694940..a9835064584 100644 --- a/docs/big-data-cluster/deploy-big-data-tools.md +++ b/docs/big-data-cluster/deploy-big-data-tools.md @@ -2,14 +2,14 @@ title: Install big data tools titleSuffix: SQL Server big data clusters description: Learn how to install tools used with SQL Server 2019 big data clusters (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 01/17/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Install SQL Server 2019 big data tools diff --git a/docs/big-data-cluster/deploy-get-started.md b/docs/big-data-cluster/deploy-get-started.md index 781db49bbb9..9c61c0a9488 100644 --- a/docs/big-data-cluster/deploy-get-started.md +++ b/docs/big-data-cluster/deploy-get-started.md @@ -2,8 +2,9 @@ title: Get started titleSuffix: SQL Server big data clusters description: Learn the steps and resources for deploying SQL Server 2019 big data clusters (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/deploy-install-mssqlctl.md b/docs/big-data-cluster/deploy-install-mssqlctl.md index 10480adc4c9..1d64911da5d 100644 --- a/docs/big-data-cluster/deploy-install-mssqlctl.md +++ b/docs/big-data-cluster/deploy-install-mssqlctl.md @@ -2,8 +2,9 @@ title: Install mssqlctl titleSuffix: SQL Server big data clusters description: Learn how to install the mssqlctl tool for installing and managing SQL Server 2019 big data clusters (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/28/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/deploy-offline.md b/docs/big-data-cluster/deploy-offline.md index 6617d7e4962..fcee5ed9a25 100644 --- a/docs/big-data-cluster/deploy-offline.md +++ b/docs/big-data-cluster/deploy-offline.md @@ -2,8 +2,9 @@ title: Deploy offline titleSuffix: SQL Server big data clusters description: Learn how to perform an offline deployment of a SQL Server big data cluster. -author: rothja -ms.author: jroth +author: mihaelablendea +ms.author: mihaelab +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/deploy-on-aks.md b/docs/big-data-cluster/deploy-on-aks.md index d837d0de179..33349391b5c 100644 --- a/docs/big-data-cluster/deploy-on-aks.md +++ b/docs/big-data-cluster/deploy-on-aks.md @@ -2,14 +2,14 @@ title: Configure Azure Kubernetes Service titleSuffix: SQL Server big data clusters description: Learn how to configure Azure Kubernetes Service (AKS) for SQL Server 2019 big data cluster (preview) deployments. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 02/28/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Configure Azure Kubernetes Service for SQL Server big data cluster deployments diff --git a/docs/big-data-cluster/deploy-on-minikube.md b/docs/big-data-cluster/deploy-on-minikube.md index 3417ac126e1..848a9a4c403 100644 --- a/docs/big-data-cluster/deploy-on-minikube.md +++ b/docs/big-data-cluster/deploy-on-minikube.md @@ -2,14 +2,14 @@ title: Configure minikube titleSuffix: SQL Server big data clusters description: Learn how to configure minikube for SQL Server 2019 big data cluster (preview) deployments on a single machine. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 04/23/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Configure minikube for SQL Server big data cluster deployments diff --git a/docs/big-data-cluster/deploy-with-kubeadm.md b/docs/big-data-cluster/deploy-with-kubeadm.md index c23089fe60b..6f989cdd740 100644 --- a/docs/big-data-cluster/deploy-with-kubeadm.md +++ b/docs/big-data-cluster/deploy-with-kubeadm.md @@ -2,14 +2,14 @@ title: Configure Kubernetes with kubeadm titleSuffix: SQL Server big data clusters description: Learn how to configure Kubernetes on multiple Ubuntu 16.04 or 18.04 machines (physical or virtual) for SQL Server 2019 big data cluster (preview) deployments. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 02/28/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Configure Kubernetes on multiple machines for SQL Server big data cluster deployments diff --git a/docs/big-data-cluster/deployment-custom-configuration.md b/docs/big-data-cluster/deployment-custom-configuration.md index c4b066faa2d..e28007039df 100644 --- a/docs/big-data-cluster/deployment-custom-configuration.md +++ b/docs/big-data-cluster/deployment-custom-configuration.md @@ -2,8 +2,9 @@ title: Configure deployments titleSuffix: SQL Server big data clusters description: Learn how to customize a big data cluster deployment with configuration files. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/deployment-guidance.md b/docs/big-data-cluster/deployment-guidance.md index 9a9b2dbdc46..04f5282df0d 100644 --- a/docs/big-data-cluster/deployment-guidance.md +++ b/docs/big-data-cluster/deployment-guidance.md @@ -2,14 +2,14 @@ title: Deployment guidance titleSuffix: SQL Server big data clusters description: Learn how to deploy SQL Server 2019 big data clusters (preview) on Kubernetes. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # How to deploy SQL Server big data clusters on Kubernetes diff --git a/docs/big-data-cluster/deployment-upgrade.md b/docs/big-data-cluster/deployment-upgrade.md index 93e831b72c3..47805c4a1cc 100644 --- a/docs/big-data-cluster/deployment-upgrade.md +++ b/docs/big-data-cluster/deployment-upgrade.md @@ -2,8 +2,9 @@ title: Upgrade to a new release titleSuffix: SQL Server big data clusters description: Learn how to upgrade SQL Server 2019 big data clusters (preview) to a new release. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/hdfs-tiering-mount-adlsgen2.md b/docs/big-data-cluster/hdfs-tiering-mount-adlsgen2.md index 90b3731e0b2..de5554784d1 100644 --- a/docs/big-data-cluster/hdfs-tiering-mount-adlsgen2.md +++ b/docs/big-data-cluster/hdfs-tiering-mount-adlsgen2.md @@ -4,7 +4,7 @@ titleSuffix: How to mount ADLS Gen2 description: This article explains how to configure HDFS tiering to mount an external Azure Data Lake Storage file system into HDFS on a SQL Server 2019 big data cluster (preview). author: nelgson ms.author: negust -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 06/27/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/hdfs-tiering-mount-s3.md b/docs/big-data-cluster/hdfs-tiering-mount-s3.md index cf57d3705a8..eff81b5cf88 100644 --- a/docs/big-data-cluster/hdfs-tiering-mount-s3.md +++ b/docs/big-data-cluster/hdfs-tiering-mount-s3.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: This article explains how to configure HDFS tiering to mount an external S3 file system into HDFS on a SQL Server 2019 big data cluster (preview). author: nelgson ms.author: negust -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/hdfs-tiering.md b/docs/big-data-cluster/hdfs-tiering.md index d55b136c439..29bf2d9bdce 100644 --- a/docs/big-data-cluster/hdfs-tiering.md +++ b/docs/big-data-cluster/hdfs-tiering.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: This article explains how to configure HDFS tiering to mount an external Azure Data Lake Storage file system into HDFS on a SQL Server 2019 big data cluster (preview). author: nelgson ms.author: negust -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 04/23/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/notebooks-guidance.md b/docs/big-data-cluster/notebooks-guidance.md index 8aaf797d399..11cc20e7dc8 100644 --- a/docs/big-data-cluster/notebooks-guidance.md +++ b/docs/big-data-cluster/notebooks-guidance.md @@ -2,14 +2,14 @@ title: Run notebooks in Azure Data Studio titleSuffix: SQL Server big data clusters description: This article explains how to run Jupyter Notebooks in Azure Data Studio connected to a SQL Server 2019 big data cluster. -author: achatter -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 05/08/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # How to use notebooks in SQL Server 2019 preview diff --git a/docs/big-data-cluster/notebooks-how-to-manage.md b/docs/big-data-cluster/notebooks-how-to-manage.md index e18997a9c64..a3f640db9fb 100644 --- a/docs/big-data-cluster/notebooks-how-to-manage.md +++ b/docs/big-data-cluster/notebooks-how-to-manage.md @@ -2,14 +2,14 @@ title: Manage notebooks in Azure Data Studio titleSuffix: SQL Server big data clusters description: Learn how to manage notebooks in Azure Data Studio. This includes opening notebooks, saving them, and changing your big data cluster connection. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # How to manage notebooks in Azure Data Studio diff --git a/docs/big-data-cluster/quickstart-big-data-cluster-deploy.md b/docs/big-data-cluster/quickstart-big-data-cluster-deploy.md index 97971472d70..419fced3e70 100644 --- a/docs/big-data-cluster/quickstart-big-data-cluster-deploy.md +++ b/docs/big-data-cluster/quickstart-big-data-cluster-deploy.md @@ -1,27 +1,27 @@ --- -title: Deployment quickstart +title: Deployment script titleSuffix: SQL Server big data clusters description: Walkthrough a deployment of SQL Server 2019 big data clusters (preview) on Azure Kubernetes Service (AKS). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 05/22/2019 -ms.topic: quickstart +ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- -# Quickstart: Deploy SQL Server big data cluster on Azure Kubernetes Service (AKS) +# Deploy SQL Server big data cluster on Azure Kubernetes Service (AKS) [!INCLUDE[tsql-appliesto-ssver15-xxxx-xxxx-xxx](../includes/tsql-appliesto-ssver15-xxxx-xxxx-xxx.md)] -In this quickstart, you use a sample deployment script to deploy SQL Server 2019 big data cluster (preview) to Azure Kubernetes Service (AKS). +In this tutorial, you use a sample deployment script to deploy SQL Server 2019 big data cluster (preview) to Azure Kubernetes Service (AKS). > [!TIP] > AKS is only one option for hosting Kubernetes for your big data cluster. To learn about other deployment options as well as how to customize deployment options, see [How to deploy SQL Server big data clusters on Kubernetes](deployment-guidance.md). -The default big data cluster deployment used here consists of a SQL Master instance, one compute pool instance, two data pool instances, and two storage pool instances. Data is persisted using Kubernetes persistent volumes that use the AKS default storage classes. The default configuration used in this quickstart is suitable for dev/test environments. +The default big data cluster deployment used here consists of a SQL Master instance, one compute pool instance, two data pool instances, and two storage pool instances. Data is persisted using Kubernetes persistent volumes that use the AKS default storage classes. The default configuration used in this tutorial is suitable for dev/test environments. [!INCLUDE [Limited public preview note](../includes/big-data-cluster-preview-note.md)] @@ -45,7 +45,7 @@ az login ## Download the deployment script -This quickstart automates the creation of the big data cluster on AKS using a python script **deploy-sql-big-data-aks.py**. If you already installed python for **mssqlctl**, you should be able to run the script successfully in this quickstart. +This tutorial automates the creation of the big data cluster on AKS using a python script **deploy-sql-big-data-aks.py**. If you already installed python for **mssqlctl**, you should be able to run the script successfully in this tutorial. In a Windows PowerShell or Linux bash prompt, run the following command to download the deployment script from GitHub. diff --git a/docs/big-data-cluster/reference-deployment-config.md b/docs/big-data-cluster/reference-deployment-config.md index fcda6d304aa..7be85971c4d 100644 --- a/docs/big-data-cluster/reference-deployment-config.md +++ b/docs/big-data-cluster/reference-deployment-config.md @@ -2,8 +2,9 @@ title: Deployment configuration file reference titleSuffix: SQL Server big data clusters description: Reference for a big data cluster deployment configuration file. -author: rothja -ms.author: jroth +author: mihaelablendea +ms.author: mihaelab +ms.reviewer: mikeray manager: jroth ms.date: 04/23/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-app-template.md b/docs/big-data-cluster/reference-mssqlctl-app-template.md index 02a3c3a27da..795a33b8536 100644 --- a/docs/big-data-cluster/reference-mssqlctl-app-template.md +++ b/docs/big-data-cluster/reference-mssqlctl-app-template.md @@ -2,8 +2,9 @@ title: mssqlctl app template reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl app template commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-app.md b/docs/big-data-cluster/reference-mssqlctl-app.md index 43718415f3f..27c211dd101 100644 --- a/docs/big-data-cluster/reference-mssqlctl-app.md +++ b/docs/big-data-cluster/reference-mssqlctl-app.md @@ -2,8 +2,9 @@ title: mssqlctl app reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl app commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-config-section.md b/docs/big-data-cluster/reference-mssqlctl-bdc-config-section.md index 0ecf3075223..172c806b90f 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-config-section.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-config-section.md @@ -2,8 +2,9 @@ title: mssqlctl bdc config section reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc config section commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-config.md b/docs/big-data-cluster/reference-mssqlctl-bdc-config.md index 346fbfa68dc..5461974108b 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-config.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-config.md @@ -2,8 +2,9 @@ title: mssqlctl bdc config reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-control-status.md b/docs/big-data-cluster/reference-mssqlctl-bdc-control-status.md index a7536131f23..a5339b570d5 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-control-status.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-control-status.md @@ -2,8 +2,9 @@ title: mssqlctl bdc control status reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc control status commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-control.md b/docs/big-data-cluster/reference-mssqlctl-bdc-control.md index 3c4ccfa521a..00bc0268bb6 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-control.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-control.md @@ -2,8 +2,9 @@ title: mssqlctl bdc control reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc control commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-debug.md b/docs/big-data-cluster/reference-mssqlctl-bdc-debug.md index 37de78113ca..e36b1b1e1a1 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-debug.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-debug.md @@ -2,8 +2,9 @@ title: mssqlctl bdc debug reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc debug commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-endpoint.md b/docs/big-data-cluster/reference-mssqlctl-bdc-endpoint.md index 804ecdfd651..22f40130c1e 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-endpoint.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-endpoint.md @@ -2,8 +2,9 @@ title: mssqlctl bdc endpoint reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc endpoint commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-pool-status.md b/docs/big-data-cluster/reference-mssqlctl-bdc-pool-status.md index 6f40832056b..c3000a33604 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-pool-status.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-pool-status.md @@ -2,8 +2,9 @@ title: mssqlctl bdc pool status reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc pool status commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-pool.md b/docs/big-data-cluster/reference-mssqlctl-bdc-pool.md index 8edbbb0bb53..ecb4d8bb561 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-pool.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-pool.md @@ -2,8 +2,9 @@ title: mssqlctl bdc pool reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc pool commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-status.md b/docs/big-data-cluster/reference-mssqlctl-bdc-status.md index 853d9441213..8d95eade26e 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-status.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-status.md @@ -2,8 +2,9 @@ title: mssqlctl bdc status reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc status commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool-mount.md b/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool-mount.md index fb1c4ef910e..68b5a34bbfa 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool-mount.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool-mount.md @@ -2,8 +2,9 @@ title: mssqlctl bdc storage-pool mount reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc storage-pool mount commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool.md b/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool.md index 45bb93f26dd..4c71e76c01f 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc-storage-pool.md @@ -2,8 +2,9 @@ title: mssqlctl bdc storage-pool reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc storage-pool commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-bdc.md b/docs/big-data-cluster/reference-mssqlctl-bdc.md index f4b8d19e5e5..7cc3ef8da0a 100644 --- a/docs/big-data-cluster/reference-mssqlctl-bdc.md +++ b/docs/big-data-cluster/reference-mssqlctl-bdc.md @@ -2,8 +2,9 @@ title: mssqlctl bdc reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl bdc commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-hdfs.md b/docs/big-data-cluster/reference-mssqlctl-hdfs.md index b9e6d02c708..e2825f7a777 100644 --- a/docs/big-data-cluster/reference-mssqlctl-hdfs.md +++ b/docs/big-data-cluster/reference-mssqlctl-hdfs.md @@ -2,8 +2,9 @@ title: mssqlctl hdfs reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl hdfs commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl-sql.md b/docs/big-data-cluster/reference-mssqlctl-sql.md index da554ab522d..fdd8f04487e 100644 --- a/docs/big-data-cluster/reference-mssqlctl-sql.md +++ b/docs/big-data-cluster/reference-mssqlctl-sql.md @@ -2,8 +2,9 @@ title: mssqlctl sql reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl sql commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/reference-mssqlctl.md b/docs/big-data-cluster/reference-mssqlctl.md index 531db804834..a189ded222c 100644 --- a/docs/big-data-cluster/reference-mssqlctl.md +++ b/docs/big-data-cluster/reference-mssqlctl.md @@ -2,8 +2,9 @@ title: mssqlctl reference titleSuffix: SQL Server big data clusters description: Reference article for mssqlctl commands. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: reference diff --git a/docs/big-data-cluster/release-notes-big-data-cluster.md b/docs/big-data-cluster/release-notes-big-data-cluster.md index 005741c721f..b4a6095ca0d 100644 --- a/docs/big-data-cluster/release-notes-big-data-cluster.md +++ b/docs/big-data-cluster/release-notes-big-data-cluster.md @@ -2,14 +2,14 @@ title: Release notes titleSuffix: SQL Server big data clusters description: This article describes the latest updates and known issues for SQL Server 2019 big data clusters (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Release notes for big data clusters on SQL Server diff --git a/docs/big-data-cluster/spark-create-machine-learning-model.md b/docs/big-data-cluster/spark-create-machine-learning-model.md index d1e3fcdcc60..d888abb399e 100644 --- a/docs/big-data-cluster/spark-create-machine-learning-model.md +++ b/docs/big-data-cluster/spark-create-machine-learning-model.md @@ -4,8 +4,7 @@ titleSuffix: SQL Server big data clusters description: Use PySpark to train and create machine learning models with Spark on SQL Server big data clusters (preview). Export with MLeap, and then score the model with Java in SQL Server. author: lgongmsft ms.author: lgong -ms.manager: craigg -ms.reviewer: jroth +ms.reviewer: mikeray ms.date: 06/26/2019 ms.topic: conceptual ms.prod: sql diff --git a/docs/big-data-cluster/spark-history-server.md b/docs/big-data-cluster/spark-history-server.md index 96937f1bb77..2257377bc02 100644 --- a/docs/big-data-cluster/spark-history-server.md +++ b/docs/big-data-cluster/spark-history-server.md @@ -4,13 +4,12 @@ titleSuffix: SQL Server big data clusters description: Use Spark History Server to debug and diagnose Spark applications running on SQL Server 2019 big data clusters. author: jejiang ms.author: jejiang -ms.reviewer: jroth +ms.reviewer: mikeray manager: jroth ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Debug and Diagnose Spark Applications on SQL Server big data clusters in Spark History Server diff --git a/docs/big-data-cluster/spark-mssql-connector.md b/docs/big-data-cluster/spark-mssql-connector.md index 46c5a713eed..e1783fec492 100644 --- a/docs/big-data-cluster/spark-mssql-connector.md +++ b/docs/big-data-cluster/spark-mssql-connector.md @@ -2,8 +2,9 @@ title: Connect Spark to SQL Server titleSuffix: SQL Server big data clusters description: Learn how to use the MSSQL Spark Connector in Spark to read and write to SQL Server. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: shivsood manager: jroth ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/big-data-cluster/spark-submit-job-intellij-tool-plugin.md b/docs/big-data-cluster/spark-submit-job-intellij-tool-plugin.md index b692b965113..0c2acf91f1c 100644 --- a/docs/big-data-cluster/spark-submit-job-intellij-tool-plugin.md +++ b/docs/big-data-cluster/spark-submit-job-intellij-tool-plugin.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: Submit Spark jobs on SQL Server big data clusters in Azure Toolkit for IntelliJ. author: jejiang ms.author: jejiang -ms.reviewer: jroth +ms.reviewer: mikeray ms.date: 02/28/2019 ms.topic: conceptual ms.date: 02/28/2019 diff --git a/docs/big-data-cluster/spark-submit-job.md b/docs/big-data-cluster/spark-submit-job.md index 3791f39fc3e..0388eaef9f7 100644 --- a/docs/big-data-cluster/spark-submit-job.md +++ b/docs/big-data-cluster/spark-submit-job.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: Submit Spark jobs on SQL Server big data clusters in Azure Data Studio. author: jejiang ms.author: jejiang -ms.reviewer: jroth +ms.reviewer: mikeray ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql diff --git a/docs/big-data-cluster/sparklyr-from-RStudio.md b/docs/big-data-cluster/sparklyr-from-RStudio.md index 291af2f5ae2..506067d66ab 100644 --- a/docs/big-data-cluster/sparklyr-from-RStudio.md +++ b/docs/big-data-cluster/sparklyr-from-RStudio.md @@ -4,7 +4,7 @@ titleSuffix: SQL Server big data clusters description: Connect to big data cluster using sparklyr from RStudio. author: jejiang ms.author: jejiang -ms.reviewer: jroth +ms.reviewer: mikeray ms.date: 04/08/2019 ms.topic: conceptual ms.prod: sql diff --git a/docs/big-data-cluster/tutorial-data-pool-ingest-spark.md b/docs/big-data-cluster/tutorial-data-pool-ingest-spark.md index 05ace38bdec..604fa3b2df7 100644 --- a/docs/big-data-cluster/tutorial-data-pool-ingest-spark.md +++ b/docs/big-data-cluster/tutorial-data-pool-ingest-spark.md @@ -2,14 +2,14 @@ title: Ingest data with Spark jobs titleSuffix: SQL Server big data clusters description: This tutorial demonstrates how to ingest data into the data pool of a SQL Server 2019 big data cluster (preview) using Spark jobs in Azure Data Studio. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: shivsood manager: jroth ms.date: 06/26/2019 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Ingest data into a SQL Server data pool with Spark jobs diff --git a/docs/big-data-cluster/tutorial-data-pool-ingest-sql.md b/docs/big-data-cluster/tutorial-data-pool-ingest-sql.md index d596c98e701..2e60743a705 100644 --- a/docs/big-data-cluster/tutorial-data-pool-ingest-sql.md +++ b/docs/big-data-cluster/tutorial-data-pool-ingest-sql.md @@ -2,14 +2,14 @@ title: Ingest data into a SQL Server data pool titleSuffix: SQL Server big data clusters description: This tutorial demonstrates how to ingest data into the data pool of a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Ingest data into a SQL Server data pool with Transact-SQL diff --git a/docs/big-data-cluster/tutorial-load-sample-data.md b/docs/big-data-cluster/tutorial-load-sample-data.md index da711651a90..32fe3e5e900 100644 --- a/docs/big-data-cluster/tutorial-load-sample-data.md +++ b/docs/big-data-cluster/tutorial-load-sample-data.md @@ -2,14 +2,14 @@ title: Load sample data titleSuffix: SQL Server big data clusters description: This tutorial demonstrates how to load sample data into a SQL Server big data cluster. The sample data includes relational data in the SQL Server master instance. It also includes HDFS data in the storage pool. This data supports other tutorials in this section. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 04/23/2019 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Load sample data into a SQL Server big data cluster diff --git a/docs/big-data-cluster/tutorial-notebook-spark.md b/docs/big-data-cluster/tutorial-notebook-spark.md index 68475765cf4..1f82cae8e60 100644 --- a/docs/big-data-cluster/tutorial-notebook-spark.md +++ b/docs/big-data-cluster/tutorial-notebook-spark.md @@ -2,14 +2,14 @@ title: Run a sample notebook | Microsoft Docs titleSuffix: SQL Server big data clusters description: This tutorial shows how you can load an run a sample Spark notebook on a SQL Server 2019 big data cluster (preview). -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 12/06/2018 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Run a sample notebook on a SQL Server big data cluster diff --git a/docs/big-data-cluster/tutorial-query-hdfs-storage-pool.md b/docs/big-data-cluster/tutorial-query-hdfs-storage-pool.md index 557c2fc0f35..11df332c68e 100644 --- a/docs/big-data-cluster/tutorial-query-hdfs-storage-pool.md +++ b/docs/big-data-cluster/tutorial-query-hdfs-storage-pool.md @@ -2,14 +2,14 @@ title: Query HDFS data in the storage pool titleSuffix: SQL Server big data clusters description: This tutorial demonstrates how to query HDFS data in a SQL Server 2019 big data cluster (preview). You create an external table over data in the storage pool and then run a query. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 06/26/2019 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Query HDFS in a SQL Server big data cluster diff --git a/docs/big-data-cluster/tutorial-query-oracle.md b/docs/big-data-cluster/tutorial-query-oracle.md index 04d806ee431..9aa9bd68668 100644 --- a/docs/big-data-cluster/tutorial-query-oracle.md +++ b/docs/big-data-cluster/tutorial-query-oracle.md @@ -2,14 +2,14 @@ title: Query external data in Oracle titleSuffix: SQL Server big data clusters description: This tutorial demonstrates how to query Oracle data from a SQL Server 2019 big data cluster (preview). You create an external table over data in Oracle and then run a query. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: jroth ms.date: 12/12/2018 ms.topic: tutorial ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Tutorial: Query Oracle from a SQL Server big data cluster diff --git a/docs/big-data-cluster/use-prose-for-big-data-automation.md b/docs/big-data-cluster/use-prose-for-big-data-automation.md index b68577ee4d5..c741b83defa 100644 --- a/docs/big-data-cluster/use-prose-for-big-data-automation.md +++ b/docs/big-data-cluster/use-prose-for-big-data-automation.md @@ -2,14 +2,14 @@ title: Generate code for data wrangling tasks titleSuffix: Azure Data Studio description: This article describes how to use the PROSE Code Accelerator in Azure Data Studio to automatically generate code for common data wrangling tasks. -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: mihaelab manager: jroth ms.date: 12/06/2018 ms.topic: conceptual ms.prod: sql ms.technology: big-data-cluster -ms.custom: seodec18 --- # Data Wrangling using PROSE Code Accelerator diff --git a/docs/big-data-cluster/view-cluster-status.md b/docs/big-data-cluster/view-cluster-status.md index c0080cd82c5..93473f7fafa 100644 --- a/docs/big-data-cluster/view-cluster-status.md +++ b/docs/big-data-cluster/view-cluster-status.md @@ -3,7 +3,8 @@ title: View cluster status titleSuffix: SQL Server big data clusters description: This article explains how to view the status of a big data cluster using Azure Data Studio, notebooks, and mssqlctl commands. author: yualan -ms.author: alayu +ms.author: alayu +ms.reviewer: mikeray manager: jroth ms.date: 06/27/2019 ms.topic: conceptual diff --git a/docs/relational-databases/polybase/configure-scale-out-groups-windows.md b/docs/relational-databases/polybase/configure-scale-out-groups-windows.md index ed9c8d28a0c..cc53d795b54 100644 --- a/docs/relational-databases/polybase/configure-scale-out-groups-windows.md +++ b/docs/relational-databases/polybase/configure-scale-out-groups-windows.md @@ -2,12 +2,11 @@ title: "Improve PolyBase scale-out groups on Windows | Microsoft Docs" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" -ms.custom: "" ms.technology: polybase ms.topic: "tutorial" -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/data-virtualization-csv.md b/docs/relational-databases/polybase/data-virtualization-csv.md index c26ac3fca6a..55d0ce2e153 100644 --- a/docs/relational-databases/polybase/data-virtualization-csv.md +++ b/docs/relational-databases/polybase/data-virtualization-csv.md @@ -3,7 +3,7 @@ title: Virtualize external data in SQL Server 2019 CTP 2.0 | Microsoft Docs description: This page details the steps for using the Create external table wizard for a CSV file author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg ms.date: 06/26/2019 ms.topic: conceptual diff --git a/docs/relational-databases/polybase/data-virtualization.md b/docs/relational-databases/polybase/data-virtualization.md index cf194db5c15..28868ed879f 100644 --- a/docs/relational-databases/polybase/data-virtualization.md +++ b/docs/relational-databases/polybase/data-virtualization.md @@ -3,7 +3,7 @@ title: Virtualize external data in SQL Server 2019 CTP 2.0 | Microsoft Docs description: This page details the steps for using the Create external table wizard for relational Data sources author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg ms.date: 03/27/2019 ms.topic: conceptual diff --git a/docs/relational-databases/polybase/polybase-configuration.md b/docs/relational-databases/polybase/polybase-configuration.md index 15090e27629..e077e907177 100644 --- a/docs/relational-databases/polybase/polybase-configuration.md +++ b/docs/relational-databases/polybase/polybase-configuration.md @@ -1,13 +1,12 @@ --- title: "PolyBase configuration and security for Hadoop | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-azure-blob-storage.md b/docs/relational-databases/polybase/polybase-configure-azure-blob-storage.md index 9f136841743..9b45b1e0fe5 100644 --- a/docs/relational-databases/polybase/polybase-configure-azure-blob-storage.md +++ b/docs/relational-databases/polybase/polybase-configure-azure-blob-storage.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data in Azure Blob Storage | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-hadoop.md b/docs/relational-databases/polybase/polybase-configure-hadoop.md index f4098017520..775fb7390d4 100644 --- a/docs/relational-databases/polybase/polybase-configure-hadoop.md +++ b/docs/relational-databases/polybase/polybase-configure-hadoop.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data in Hadoop | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-mongodb.md b/docs/relational-databases/polybase/polybase-configure-mongodb.md index 32502a13c1d..b522752a490 100644 --- a/docs/relational-databases/polybase/polybase-configure-mongodb.md +++ b/docs/relational-databases/polybase/polybase-configure-mongodb.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data in MongoDB | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-ver15 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-odbc-generic.md b/docs/relational-databases/polybase/polybase-configure-odbc-generic.md index 84840e2db05..4531254a143 100644 --- a/docs/relational-databases/polybase/polybase-configure-odbc-generic.md +++ b/docs/relational-databases/polybase/polybase-configure-odbc-generic.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data with ODBC Generic Types | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke +ms.reviewer: mikeray manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-ver15 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-oracle.md b/docs/relational-databases/polybase/polybase-configure-oracle.md index 1261be31ae4..c67eb6686c4 100644 --- a/docs/relational-databases/polybase/polybase-configure-oracle.md +++ b/docs/relational-databases/polybase/polybase-configure-oracle.md @@ -7,9 +7,8 @@ ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg -ms.custom: "" monikerRange: ">= sql-server-linux-ver15 || >= sql-server-ver15 || =sqlallproducts-allversions" --- # Configure PolyBase to access external data in Oracle diff --git a/docs/relational-databases/polybase/polybase-configure-sql-server.md b/docs/relational-databases/polybase/polybase-configure-sql-server.md index 23779dcbbc5..c019ca9f6c4 100644 --- a/docs/relational-databases/polybase/polybase-configure-sql-server.md +++ b/docs/relational-databases/polybase/polybase-configure-sql-server.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data in SQL Server | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-ver15 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-configure-teradata.md b/docs/relational-databases/polybase/polybase-configure-teradata.md index fae2a3f43e1..c254cd00559 100644 --- a/docs/relational-databases/polybase/polybase-configure-teradata.md +++ b/docs/relational-databases/polybase/polybase-configure-teradata.md @@ -1,13 +1,12 @@ --- title: "Configure PolyBase to access external data in Teradata | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-ver15 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-faq.md b/docs/relational-databases/polybase/polybase-faq.md index b7b6eb60054..df0cb8e464b 100644 --- a/docs/relational-databases/polybase/polybase-faq.md +++ b/docs/relational-databases/polybase/polybase-faq.md @@ -1,13 +1,12 @@ --- title: "Frequently Asked Questions in PolyBase | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql ms.technology: polybase ms.topic: conceptual author: Abiola ms.author: aboke -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg --- diff --git a/docs/relational-databases/polybase/polybase-guide.md b/docs/relational-databases/polybase/polybase-guide.md index 3b887cadde2..2a89435900b 100644 --- a/docs/relational-databases/polybase/polybase-guide.md +++ b/docs/relational-databases/polybase/polybase-guide.md @@ -2,8 +2,6 @@ title: "What is PolyBase? | Microsoft Docs" ms.date: 06/10/2019 ms.prod: sql -ms.reviewer: "" -ms.custom: "" ms.technology: polybase ms.topic: "overview" f1_keywords: @@ -16,8 +14,9 @@ helpviewer_keywords: - "Hadoop export" - "Hadoop export, PolyBase overview" - "Hadoop import, PolyBase overview" -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">=sql-server-2016||>=sql-server-linux-2017||=sqlallproducts-allversions||>=aps-pdw-2016||=azure-sqldw-latest" --- diff --git a/docs/relational-databases/polybase/polybase-installation.md b/docs/relational-databases/polybase/polybase-installation.md index 320dc28c226..4ac183cf078 100644 --- a/docs/relational-databases/polybase/polybase-installation.md +++ b/docs/relational-databases/polybase/polybase-installation.md @@ -1,15 +1,14 @@ --- title: "Install PolyBase on Windows | Microsoft Docs" -ms.custom: "" ms.date: 09/24/2018 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual helpviewer_keywords: - "PolyBase, installation" -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-pushdown-computation.md b/docs/relational-databases/polybase/polybase-pushdown-computation.md index e60dee65b53..83ef9170176 100644 --- a/docs/relational-databases/polybase/polybase-pushdown-computation.md +++ b/docs/relational-databases/polybase/polybase-pushdown-computation.md @@ -1,13 +1,12 @@ --- title: "Pushdown computations in PolyBase | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-queries.md b/docs/relational-databases/polybase/polybase-queries.md index fb3e5f344f6..fedea65855d 100644 --- a/docs/relational-databases/polybase/polybase-queries.md +++ b/docs/relational-databases/polybase/polybase-queries.md @@ -1,9 +1,7 @@ --- title: "PolyBase query scenarios | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual keywords: @@ -15,8 +13,9 @@ helpviewer_keywords: - "Azure blob storage, import with PolyBase" - "Azure blob storage, export with PolyBase" ms.assetid: 2c5aa2bd-af7d-4f57-9a28-9673c2a4c07e -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-scale-out-groups.md b/docs/relational-databases/polybase/polybase-scale-out-groups.md index 7b3908ce3e9..3dc05194653 100644 --- a/docs/relational-databases/polybase/polybase-scale-out-groups.md +++ b/docs/relational-databases/polybase/polybase-scale-out-groups.md @@ -1,9 +1,7 @@ --- title: "PolyBase scale-out groups | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual helpviewer_keywords: @@ -11,8 +9,9 @@ helpviewer_keywords: - "PolyBase, scale-out groups" - "scale-out PolyBase" ms.assetid: c7810135-4d63-4161-93ab-0e75e9d10ab5 -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-t-sql-objects.md b/docs/relational-databases/polybase/polybase-t-sql-objects.md index b6a5df6a90b..2f11cd35f8d 100644 --- a/docs/relational-databases/polybase/polybase-t-sql-objects.md +++ b/docs/relational-databases/polybase/polybase-t-sql-objects.md @@ -1,17 +1,16 @@ --- title: "PolyBase Transact-SQL reference | Microsoft Docs" -ms.custom: "" ms.date: 09/24/2018 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: reference helpviewer_keywords: - "PolyBase, fundamentals" - "PolyBase, SQL statements" - "PolyBase, SQL objects" -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-troubleshoot-connectivity.md b/docs/relational-databases/polybase/polybase-troubleshoot-connectivity.md index 651c491bc51..25539e009e1 100644 --- a/docs/relational-databases/polybase/polybase-troubleshoot-connectivity.md +++ b/docs/relational-databases/polybase/polybase-troubleshoot-connectivity.md @@ -2,10 +2,9 @@ title: Troubleshoot PolyBase Kerberos connectivity | Microsoft Docs author: alazad-msft ms.author: alazad -ms.reviewer: jroth +ms.reviewer: mikeray manager: craigg ms.technology: polybase -ms.custom: "" ms.devlang: ms.topic: conceptual ms.date: 04/23/2019 diff --git a/docs/relational-databases/polybase/polybase-troubleshooting.md b/docs/relational-databases/polybase/polybase-troubleshooting.md index 2ac8e4069f5..02020a51330 100644 --- a/docs/relational-databases/polybase/polybase-troubleshooting.md +++ b/docs/relational-databases/polybase/polybase-troubleshooting.md @@ -1,10 +1,8 @@ --- title: "Monitor and troubleshoot PolyBase | Microsoft Docs" -ms.custom: "" ms.date: 04/23/2019 ms.prod: sql ms.technology: polybase -ms.reviewer: "" ms.topic: conceptual f1_keywords: - "PolyBase, monitoring" @@ -12,8 +10,9 @@ f1_keywords: helpviewer_keywords: - "PolyBase, troubleshooting" ms.assetid: f119e819-c3ae-4e0b-a955-3948388a9cfe -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">= sql-server-linux-ver15 || >= sql-server-2016 || =sqlallproducts-allversions" --- diff --git a/docs/relational-databases/polybase/polybase-type-mapping.md b/docs/relational-databases/polybase/polybase-type-mapping.md index a3f4283e49b..249995a11af 100644 --- a/docs/relational-databases/polybase/polybase-type-mapping.md +++ b/docs/relational-databases/polybase/polybase-type-mapping.md @@ -2,11 +2,11 @@ title: "Type mapping with PolyBase | Microsoft Docs" ms.date: 09/24/2018 ms.prod: sql -ms.reviewer: "" ms.technology: polybase ms.topic: conceptual -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg --- # Type mapping with PolyBase diff --git a/docs/relational-databases/polybase/polybase-versioned-feature-summary.md b/docs/relational-databases/polybase/polybase-versioned-feature-summary.md index 067addeb06c..749ede6dcee 100644 --- a/docs/relational-databases/polybase/polybase-versioned-feature-summary.md +++ b/docs/relational-databases/polybase/polybase-versioned-feature-summary.md @@ -1,14 +1,13 @@ --- title: "PolyBase features and limitations | Microsoft Docs" -ms.custom: "" ms.date: 09/24/2018 ms.prod: sql ms.technology: polybase -ms.reviewer: "" ms.topic: conceptual ms.assetid: 6591994d-6109-4285-9c5b-ecb355f8a111 -author: rothja -ms.author: jroth +author: MikeRayMSFT +ms.author: mikeray +ms.reviewer: aboke manager: craigg monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017||=azuresqldb-mi-current" --- From 5f4d7ed326d478f1d2093bab9c0a83798dfda653 Mon Sep 17 00:00:00 2001 From: Jason Roth Date: Tue, 9 Jul 2019 15:12:29 -0400 Subject: [PATCH 27/46] Fixing author --- docs/big-data-cluster/concept-application-deployment.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/big-data-cluster/concept-application-deployment.md b/docs/big-data-cluster/concept-application-deployment.md index 3ade94f5e68..85f4b28b584 100644 --- a/docs/big-data-cluster/concept-application-deployment.md +++ b/docs/big-data-cluster/concept-application-deployment.md @@ -2,8 +2,9 @@ title: What is Application Deployment? titleSuffix: SQL Server 2019 big data clusters description: This article describes application deployment on a SQL Server 2019 big data cluster (preview). -author: jterh -ms.author: mikeray +author: jeroenterheerdt +ms.author: jterh +ms.reviewer: mikeray manager: jroth ms.date: 03/26/2019 ms.topic: conceptual From 3d950495399de0aa3e5358514a472390d5cf2505 Mon Sep 17 00:00:00 2001 From: bradsy Date: Tue, 9 Jul 2019 14:50:03 -0700 Subject: [PATCH 28/46] Update for current release. For bradsy@Microsoft.com and current release of --- ...ease-notes-ssrs-application-integration.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md b/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md index dfc70b22cdc..b803dd0f62c 100644 --- a/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md +++ b/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md @@ -17,6 +17,26 @@ These are the release notes for the Report Viewer controls of WebForms and WinFo For the release notes for SSRS, see [Release notes for SQL Server Reporting Services (SSRS) 2017 and later](../release-notes-reporting-services.md). +## 150.1358.0 +| Change description | Details | +| :----------------- | :------ | +| Bug Fixes | Reverted a change that removed the Microsoft.ReportViewer.Design assemblies from the project references. | +| | As part of other changes, two assemblies were changed from 15.0 version to 15.3. This has been reverted. | +|   |   | + +## 150.1357.0 +| Change description | Details | +| :----------------- | :------ | +| Bug fixes | Proper print preview for High DPI monitor | +| | Print dialog would show outside of visible space | +| | Large number of parameters resulted in parameter scroll bars and drop downlists not working correctly | +| | Fixed issue with Null and date time parameters | +| | Updated JQuery to version 3.3.1 | +| | Fixed overlapping with tablix cells in HTML rendering | +| | Removed the design time project references to eliminate erroneous VS assemblies being added to the projects | +| | Accessibility fix for tool bar to narrate only for active items | +|   |   | + ## 15.900.148 | Change description | Details | From 273d62805a9182a83f727b6ee1147bdd93b7c641 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 9 Jul 2019 14:54:28 -0700 Subject: [PATCH 29/46] fix PR review items --- .openpublishing.redirection.json | 2 +- .../indexes/reorganize-and-rebuild-indexes.md | 2 +- .../sys-dm-db-xtp-merge-requests-transact-sql.md | 2 +- .../tables/specify-computed-columns-in-a-table.md | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 9513b689892..25760f11709 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -86,7 +86,7 @@ "redirect_document_id": false }, { - "source_path": "docs/relational-databases/tables/create-edge-constraint.md", + "source_path": "docs/relational-databases/tables/create-edge-constraints.md", "redirect_url": "/sql/relational-databases/tables/graph-edge-constraints", "redirect_document_id": false }, diff --git a/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md b/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md index 7b65837f4b0..3f941af2ed0 100644 --- a/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md +++ b/docs/relational-databases/indexes/reorganize-and-rebuild-indexes.md @@ -226,7 +226,7 @@ For more information, see [sys.dm_db_index_physical_stats](../../relational-data ### To reorganize a fragmented index -The following example reorganizes the `IX_Employee_OrganizationalLevel_OrganizationalNode` index on the `HumanResources.Employee` table inthe AdventureWorks database. +The following example reorganizes the `IX_Employee_OrganizationalLevel_OrganizationalNode` index on the `HumanResources.Employee` table in the AdventureWorks database. ```sql ALTER INDEX IX_Employee_OrganizationalLevel_OrganizationalNode diff --git a/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md b/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md index a217f2acfcc..95b84a348a6 100644 --- a/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md +++ b/docs/relational-databases/system-dynamic-management-views/sys-dm-db-xtp-merge-requests-transact-sql.md @@ -32,7 +32,7 @@ Tracks database merge requests. The merge request may have been generated by SQL | upper_bound_tsn | bigint | The maximum timestamp for the target merge file. The highest transaction timestamp of all the source files to be merged. | | collection_tsn | bigint | The timestamp at which the current row can be collected.

A row in the Installed state is removed when checkpoint_tsn is greater than collection_tsn.

A row in the Abandoned state is removed when checkpoint_tsn is less than collection_tsn. | | checkpoint_tsn | bigint | The time that the checkpoint started.

Any deletes done by transactions with a timestamp lower than this are accounted for in the new data file. The remaining deletes are moved to the target delta file. | -| sourcenumber_file_id | GUID | Up to 16 internal file ids that uniquely identify the source files in the merge. | +| sourcenumber_file_id | GUID | Up to 16 internal file IDs that uniquely identify the source files in the merge. | ## Permissions diff --git a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md index 21eee45dec1..e9822402f4c 100644 --- a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md +++ b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md @@ -60,8 +60,9 @@ Requires ALTER permission on the table. > [!IMPORTANT] > When a formula combines two expressions of different data types, the rules for data type precedence specify that the data type with the lower precedence is converted to the data type with the higher precedence. If the conversion is not a supported implicit conversion, the error "`Error validating the formula for column column_name.`" is returned. Use the CAST or CONVERT function to resolve the data type conflict. For example, if a column of type **nvarchar** is combined with a column of type **int**, the integer type must be converted to **nvarchar** as shown in this formula `('Prod'+CONVERT(nvarchar(23),ProductID))`. For more information, see [CAST and CONVERT (Transact-SQL)](../../t-sql/functions/cast-and-convert-transact-sql.md). -5.Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. -6.On the **File** menu, click **Save**_table name_. +5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property. + +6. On the **File** menu, click **Save**_table name_. #### To add a computed column definition to an existing column From 2c1b8fea65f1a4d7caddb163d054a4a5ad3d44f3 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 9 Jul 2019 15:13:26 -0700 Subject: [PATCH 30/46] more per masha --- docs/toc.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/toc.yml b/docs/toc.yml index 14f3824bd97..69967344d54 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1338,7 +1338,7 @@ items: - name: Heaps (Tables without Clustered Indexes) href: relational-databases/indexes/heaps-tables-without-clustered-indexes.md - - name: Clustered & Nonclustered Indexes + - name: Clustered & Nonclustered Indexes Described href: relational-databases/indexes/clustered-and-nonclustered-indexes-described.md items: - name: Create @@ -1391,6 +1391,8 @@ href: relational-databases/indexes/guidelines-for-online-index-operations.md - name: Configure parallel operations href: relational-databases/indexes/configure-parallel-index-operations.md + - name: Index Properties F1 Help + href: relational-databases/indexes/index-properties-f1-help.md - name: Columnstore indexes href: relational-databases/indexes/columnstore-indexes-overview.md items: @@ -1547,8 +1549,24 @@ href: relational-databases/tables/use-table-valued-parameters-database-engine.md - name: Edge constraints href: relational-databases/tables/graph-edge-constraints.md + items: + - name: Create + href: relational-databases/tables/create-edge-constraints.md + - name: Delete + href: relational-databases/tables/delete-edge-constraint.md + - name: Modify + href: relational-databases/tables/modify-edge-constraint.md + - name: View + href: relational-databases/tables/view-edge-constraint-properties.md - name: Primary keys href: relational-databases/tables/primary-and-foreign-key-constraints.md + items: + - name: Create + href: relational-databases/tables/create-primary-keys.md + - name: Modify + href: relational-databases/tables/modify-primary-keys.md + - name: Delete + href: relational-databases/tables/delete-primary-keys.md - name: Foreign keys items: - name: Create relationships From cf65ef14c6a7d29d04b3c06f2d6e44232bd013a9 Mon Sep 17 00:00:00 2001 From: Mark Ghanayem <22989000+markingmyname@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:14:08 -0500 Subject: [PATCH 31/46] [PowerShell] Owner change --- docs/powershell/download-sql-server-ps-module.md | 4 ++-- docs/powershell/encode-and-decode-sql-server-identifiers.md | 4 ++-- docs/powershell/escape-sql-server-identifiers.md | 4 ++-- .../load-the-smo-assemblies-in-windows-powershell.md | 4 ++-- .../manage-authentication-in-database-engine-powershell.md | 4 ++-- .../powershell/manage-tab-completion-sql-server-powershell.md | 4 ++-- docs/powershell/navigate-sql-server-powershell-paths.md | 4 ++-- .../query-expressions-and-uniform-resource-names.md | 4 ++-- ...un-windows-powershell-from-sql-server-management-studio.md | 4 ++-- .../run-windows-powershell-steps-in-sql-server-agent.md | 4 ++-- ...specify-instances-in-the-sql-server-powershell-provider.md | 4 ++-- docs/powershell/sql-server-identifiers-in-powershell.md | 4 ++-- docs/powershell/sql-server-powershell-provider.md | 4 ++-- docs/powershell/sql-server-powershell.md | 4 ++-- docs/powershell/work-with-sql-server-powershell-paths.md | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/powershell/download-sql-server-ps-module.md b/docs/powershell/download-sql-server-ps-module.md index ee3d43c74a6..f58e000a86b 100644 --- a/docs/powershell/download-sql-server-ps-module.md +++ b/docs/powershell/download-sql-server-ps-module.md @@ -9,8 +9,8 @@ ms.topic: conceptual keywords: - "install sql server powershell, download sql server powershell" ms.assetid: -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Install SQL Server PowerShell module diff --git a/docs/powershell/encode-and-decode-sql-server-identifiers.md b/docs/powershell/encode-and-decode-sql-server-identifiers.md index a212babf580..68b25634245 100644 --- a/docs/powershell/encode-and-decode-sql-server-identifiers.md +++ b/docs/powershell/encode-and-decode-sql-server-identifiers.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: bb9fe0d3-e432-42d3-b324-64dc908b544a -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Encode and Decode SQL Server Identifiers diff --git a/docs/powershell/escape-sql-server-identifiers.md b/docs/powershell/escape-sql-server-identifiers.md index 2d2f1931718..f9c4033841a 100644 --- a/docs/powershell/escape-sql-server-identifiers.md +++ b/docs/powershell/escape-sql-server-identifiers.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 8a73e945-daa6-4e5d-93da-10f000f1f3a2 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Escape SQL Server Identifiers diff --git a/docs/powershell/load-the-smo-assemblies-in-windows-powershell.md b/docs/powershell/load-the-smo-assemblies-in-windows-powershell.md index f3cc004d635..d046325713d 100644 --- a/docs/powershell/load-the-smo-assemblies-in-windows-powershell.md +++ b/docs/powershell/load-the-smo-assemblies-in-windows-powershell.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 8ca42b69-da5a-47f4-9085-34e443f0e389 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Load the SMO Assemblies in Windows PowerShell diff --git a/docs/powershell/manage-authentication-in-database-engine-powershell.md b/docs/powershell/manage-authentication-in-database-engine-powershell.md index 1c8e4c969e3..bcfe868e2ef 100644 --- a/docs/powershell/manage-authentication-in-database-engine-powershell.md +++ b/docs/powershell/manage-authentication-in-database-engine-powershell.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: ab9212a6-6628-4f08-a38c-d3156e05ddea -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Manage Authentication in Database Engine PowerShell diff --git a/docs/powershell/manage-tab-completion-sql-server-powershell.md b/docs/powershell/manage-tab-completion-sql-server-powershell.md index 891243acd85..d0ade2847e8 100644 --- a/docs/powershell/manage-tab-completion-sql-server-powershell.md +++ b/docs/powershell/manage-tab-completion-sql-server-powershell.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 6296848a-890f-4ad3-8d9f-92ed6a79aa00 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Manage Tab Completion (SQL Server PowerShell) diff --git a/docs/powershell/navigate-sql-server-powershell-paths.md b/docs/powershell/navigate-sql-server-powershell-paths.md index fef673229c3..452f7253ce5 100644 --- a/docs/powershell/navigate-sql-server-powershell-paths.md +++ b/docs/powershell/navigate-sql-server-powershell-paths.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: d68aca48-d161-45ed-9f4f-14122ed30218 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Navigate SQL Server PowerShell Paths diff --git a/docs/powershell/query-expressions-and-uniform-resource-names.md b/docs/powershell/query-expressions-and-uniform-resource-names.md index 0462eda48a1..b543cab9c8a 100644 --- a/docs/powershell/query-expressions-and-uniform-resource-names.md +++ b/docs/powershell/query-expressions-and-uniform-resource-names.md @@ -11,8 +11,8 @@ helpviewer_keywords: - "unique resource names" - "URN" ms.assetid: e0d30dbe-7daf-47eb-8412-1b96792b6fb9 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Query Expressions and Uniform Resource Names diff --git a/docs/powershell/run-windows-powershell-from-sql-server-management-studio.md b/docs/powershell/run-windows-powershell-from-sql-server-management-studio.md index 1ac883da580..44ade238c7f 100644 --- a/docs/powershell/run-windows-powershell-from-sql-server-management-studio.md +++ b/docs/powershell/run-windows-powershell-from-sql-server-management-studio.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 1f841825-da1f-4062-9a81-3cdbab03845b -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Run Windows PowerShell from SQL Server Management Studio diff --git a/docs/powershell/run-windows-powershell-steps-in-sql-server-agent.md b/docs/powershell/run-windows-powershell-steps-in-sql-server-agent.md index ca62fd66f33..8e0687a0717 100644 --- a/docs/powershell/run-windows-powershell-steps-in-sql-server-agent.md +++ b/docs/powershell/run-windows-powershell-steps-in-sql-server-agent.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: f25f7549-c9b3-4618-85f2-c9a08adbe0e3 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Run Windows PowerShell Steps in SQL Server Agent diff --git a/docs/powershell/specify-instances-in-the-sql-server-powershell-provider.md b/docs/powershell/specify-instances-in-the-sql-server-powershell-provider.md index b6b9b14895a..385ee97d8d0 100644 --- a/docs/powershell/specify-instances-in-the-sql-server-powershell-provider.md +++ b/docs/powershell/specify-instances-in-the-sql-server-powershell-provider.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 9373de68-fd43-45f2-b9a6-149c96610aeb -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Specify Instances in the SQL Server PowerShell Provider diff --git a/docs/powershell/sql-server-identifiers-in-powershell.md b/docs/powershell/sql-server-identifiers-in-powershell.md index 9a53579591f..16b391f0f53 100644 --- a/docs/powershell/sql-server-identifiers-in-powershell.md +++ b/docs/powershell/sql-server-identifiers-in-powershell.md @@ -16,8 +16,8 @@ helpviewer_keywords: - "identifiers [SQL Server], PowerShell" - "Cmdlets [SQL Server], Decode-Sqlname" ms.assetid: 651099b0-33b4-453a-a864-b067f21eb8b9 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # SQL Server Identifiers in PowerShell diff --git a/docs/powershell/sql-server-powershell-provider.md b/docs/powershell/sql-server-powershell-provider.md index 5f882424efc..07ce2c5119f 100644 --- a/docs/powershell/sql-server-powershell-provider.md +++ b/docs/powershell/sql-server-powershell-provider.md @@ -14,8 +14,8 @@ helpviewer_keywords: - "PowerShell [SQL Server], SMO" - "SQL Server Management Objects, PowerShell" ms.assetid: b97acc43-fcd2-4ae5-b218-e183bab916f9 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # SQL Server PowerShell Provider diff --git a/docs/powershell/sql-server-powershell.md b/docs/powershell/sql-server-powershell.md index b87c251ea00..87e2bc5b78a 100644 --- a/docs/powershell/sql-server-powershell.md +++ b/docs/powershell/sql-server-powershell.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: 89b70725-bbe7-4ffe-a27d-2a40005a97e7 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # SQL Server PowerShell diff --git a/docs/powershell/work-with-sql-server-powershell-paths.md b/docs/powershell/work-with-sql-server-powershell-paths.md index 28dcdb07fd1..e9c2afee209 100644 --- a/docs/powershell/work-with-sql-server-powershell-paths.md +++ b/docs/powershell/work-with-sql-server-powershell-paths.md @@ -7,8 +7,8 @@ ms.reviewer: "" ms.technology: scripting ms.topic: conceptual ms.assetid: f31d8e2c-8d59-4fee-ac2a-324668e54262 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Work With SQL Server PowerShell Paths From cefce22403ce541b3480562e1833c2e09009d051 Mon Sep 17 00:00:00 2001 From: CarlRabeler Date: Tue, 9 Jul 2019 15:14:09 -0700 Subject: [PATCH 32/46] toc --- docs/toc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/toc.yml b/docs/toc.yml index 69967344d54..5f2def6ed58 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -1338,7 +1338,7 @@ items: - name: Heaps (Tables without Clustered Indexes) href: relational-databases/indexes/heaps-tables-without-clustered-indexes.md - - name: Clustered & Nonclustered Indexes Described + - name: Clustered & Nonclustered Indexes href: relational-databases/indexes/clustered-and-nonclustered-indexes-described.md items: - name: Create From 6927809238de495f3ca9c8b7f94d55df94388ea5 Mon Sep 17 00:00:00 2001 From: Mark Ghanayem <22989000+markingmyname@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:16:42 -0500 Subject: [PATCH 33/46] [Tools] owner change --- docs/tools/distributed-replay/configure-distributed-replay.md | 4 ++-- .../status-option-distributed-replay-administration-tool.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tools/distributed-replay/configure-distributed-replay.md b/docs/tools/distributed-replay/configure-distributed-replay.md index 9f9e137593c..83fdcc1a11c 100644 --- a/docs/tools/distributed-replay/configure-distributed-replay.md +++ b/docs/tools/distributed-replay/configure-distributed-replay.md @@ -8,8 +8,8 @@ ms.reviewer: "" ms.technology: tools-other ms.topic: conceptual ms.assetid: aee11dde-daad-439b-b594-9f4aeac94335 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Configure Distributed Replay diff --git a/docs/tools/distributed-replay/status-option-distributed-replay-administration-tool.md b/docs/tools/distributed-replay/status-option-distributed-replay-administration-tool.md index 928415fbbd0..1dc1fa32d70 100644 --- a/docs/tools/distributed-replay/status-option-distributed-replay-administration-tool.md +++ b/docs/tools/distributed-replay/status-option-distributed-replay-administration-tool.md @@ -6,8 +6,8 @@ ms.reviewer: ms.technology: tools-other ms.topic: conceptual ms.assetid: ea89386e-1598-4412-8b37-680d14b2a5b6 -author: stevestein -ms.author: sstein +author: markingmyname +ms.author: maghan manager: craigg --- # Status Option (Distributed Replay Administration Tool) From c4eed06469f4bc2c01617bec4bbb8a3cde6306fe Mon Sep 17 00:00:00 2001 From: Mark Ghanayem <22989000+markingmyname@users.noreply.github.com> Date: Tue, 9 Jul 2019 17:32:32 -0500 Subject: [PATCH 34/46] [Tools] owner change --- docs/tools/bcp-utility.md | 11 ++++++----- ...ommand-prompt-utility-reference-database-engine.md | 4 ++-- .../alias-properties-alias-tab.md | 4 ++-- .../aliases-sql-server-configuration-manager.md | 4 ++-- .../analysis-server-properties-advanced-tab.md | 4 ++-- .../analysis-server-properties-log-on-tab.md | 4 ++-- .../analysis-server-properties-service-tab.md | 4 ++-- ...-server-server-sql-server-configuration-manager.md | 4 ++-- ...t-protocols-named-pipes-properties-protocol-tab.md | 4 ++-- .../client-protocols-properties-order-tab.md | 4 ++-- ...protocols-shared-memory-properties-protocol-tab.md | 4 ++-- ...ient-protocols-sql-server-configuration-manager.md | 4 ++-- ...client-protocols-tcp-ip-properties-protocol-tab.md | 4 ++-- .../configuration-manager/connecting-using-ipv6.md | 4 ++-- ...-connection-string-using-shared-memory-protocol.md | 4 ++-- ...creating-a-valid-connection-string-using-tcp-ip.md | 4 ++-- .../monitoring-the-error-logs.md | 4 ++-- .../configuration-manager/named-pipes-properties.md | 4 ++-- .../configuration-manager/new-alias-alias-tab.md | 4 ++-- ...ation-services-sql-server-configuration-manager.md | 4 ++-- .../ns-service-name-properties-advanced-tab.md | 4 ++-- .../ns-service-name-properties-log-on-tab.md | 4 ++-- .../ns-service-name-properties-service-tab.md | 4 ++-- ...otocols-for-mssqlserver-properties-advanced-tab.md | 4 ++-- ...cols-for-mssqlserver-properties-certificate-tab.md | 4 ++-- .../protocols-for-mssqlserver-properties-flags-tab.md | 4 ++-- ...ols-for-server-sql-server-configuration-manager.md | 4 ++-- .../report-server-properties-advanced-tab.md | 4 ++-- .../report-server-properties-log-on-tab.md | 4 ++-- .../report-server-properties-service-tab.md | 4 ++-- ...-server-server-sql-server-configuration-manager.md | 4 ++-- .../configuration-manager/shared-memory-properties.md | 4 ++-- .../sql-full-text-filter-daemon-launcher-advanced.md | 4 ++-- ...sql-full-text-filter-daemon-launcher-log-on-tab.md | 4 ++-- ...ql-full-text-filter-daemon-launcher-service-tab.md | 4 ++-- ...aemon-launcher-sql-server-configuration-manager.md | 4 ++-- .../sql-native-client-11-0-configuration.md | 4 ++-- .../sql-server-agent-properties-advanced-tab.md | 4 ++-- .../sql-server-agent-properties-log-on-tab.md | 4 ++-- .../sql-server-agent-properties-service-tab.md | 4 ++-- ...r-agent-server-sql-server-configuration-manager.md | 4 ++-- .../sql-server-browser-properties-advanced-tab.md | 4 ++-- .../sql-server-browser-properties-log-on-tab.md | 4 ++-- .../sql-server-browser-properties-service-tab.md | 4 ++-- .../sql-server-browser-service.md | 4 ++-- ...server-browser-sql-server-configuration-manager.md | 4 ++-- .../sql-server-configuration-manager-help.md | 4 ++-- ...-services-10-0-sql-server-configuration-manager.md | 4 ++-- ...er-integration-services-properties-advanced-tab.md | 4 ++-- ...rver-integration-services-properties-log-on-tab.md | 4 ++-- ...ver-integration-services-properties-service-tab.md | 4 ++-- ...ative-client-configuration-properties-flags-tab.md | 4 ++-- .../sql-server-network-configuration.md | 4 ++-- .../sql-server-properties-advanced-tab.md | 4 ++-- .../sql-server-properties-filestream-tab.md | 4 ++-- .../sql-server-properties-log-on-tab.md | 4 ++-- .../sql-server-properties-service-tab.md | 4 ++-- .../sql-server-properties-startup-parameters-tab.md | 4 ++-- ...-server-server-sql-server-configuration-manager.md | 4 ++-- .../configuration-manager/sql-server-services.md | 4 ++-- .../tcp-ip-properties-ip-addresses-tab.md | 4 ++-- .../tcp-ip-properties-protocols-tab.md | 4 ++-- .../unknown-service-log-on-tab.md | 4 ++-- .../viewing-the-sql-server-error-log.md | 4 ++-- .../viewing-the-windows-application-log.md | 4 ++-- ...command-line-options-distributed-replay-utility.md | 4 ++-- ...l-option-distributed-replay-administration-tool.md | 4 ++-- .../distributed-replay/distributed-replay-security.md | 4 ++-- .../prepare-the-input-trace-data.md | 4 ++-- ...s-option-distributed-replay-administration-tool.md | 4 ++-- ...y-option-distributed-replay-administration-tool.md | 4 ++-- docs/tools/distributed-replay/replay-trace-data.md | 4 ++-- .../distributed-replay/review-the-replay-results.md | 4 ++-- .../sql-server-distributed-replay.md | 4 ++-- docs/tools/dta/column-element-for-index-dta.md | 4 ++-- docs/tools/dta/configuration-element-dta.md | 4 ++-- docs/tools/dta/create-element-dta.md | 4 ++-- .../dta/database-element-for-configuration-dta.md | 4 ++-- docs/tools/dta/database-element-for-server-dta.md | 4 ++-- docs/tools/dta/database-element-for-workload-dta.md | 4 ++-- docs/tools/dta/databasetoconnect-element-dta.md | 4 ++-- docs/tools/dta/droponlymode-element-dta.md | 4 ++-- docs/tools/dta/dta-utility.md | 4 ++-- docs/tools/dta/dtainput-element-dta.md | 4 ++-- docs/tools/dta/dtaxml-element-dta.md | 4 ++-- docs/tools/dta/eventstring-element-dta.md | 4 ++-- docs/tools/dta/featureset-element-dta.md | 4 ++-- docs/tools/dta/file-element-dta.md | 4 ++-- docs/tools/dta/filegroup-element-for-index-dta.md | 4 ++-- docs/tools/dta/index-element-dta.md | 4 ++-- docs/tools/dta/keepexisting-element-dta.md | 4 ++-- ...ic-navigation-in-database-engine-tuning-advisor.md | 4 ++-- .../lesson-2-using-database-engine-tuning-advisor.md | 4 ++-- .../lesson-3-using-the-dta-command-prompt-utility.md | 4 ++-- docs/tools/dta/name-element-for-column-dta.md | 4 ++-- docs/tools/dta/name-element-for-database-dta.md | 4 ++-- docs/tools/dta/name-element-for-index-dta.md | 4 ++-- docs/tools/dta/name-element-for-schema-dta.md | 4 ++-- docs/tools/dta/name-element-for-server-dta.md | 4 ++-- docs/tools/dta/name-element-for-table-dta.md | 4 ++-- docs/tools/dta/onlineindexoperation-element-dta.md | 4 ++-- docs/tools/dta/partitioning-element-dta.md | 4 ++-- docs/tools/dta/recommendation-element-dta.md | 4 ++-- docs/tools/dta/schema-element-for-database-dta.md | 4 ++-- docs/tools/dta/server-element-dta.md | 4 ++-- .../tools/dta/server-element-for-configuration-dta.md | 4 ++-- docs/tools/dta/simple-xml-input-file-sample-dta.md | 4 ++-- docs/tools/dta/storageboundinmb-element-dta.md | 4 ++-- docs/tools/dta/table-element-for-schema-dta.md | 4 ++-- docs/tools/dta/testserver-element-dta.md | 4 ++-- docs/tools/dta/tuningoptions-element-dta.md | 4 ++-- docs/tools/dta/tuningtimeinmin-element-dta.md | 4 ++-- .../dta/tutorial-database-engine-tuning-advisor.md | 4 ++-- docs/tools/dta/workload-element-dta.md | 4 ++-- ...t-file-reference-database-engine-tuning-advisor.md | 4 ++-- .../xml-input-file-sample-with-inline-workload-dta.md | 4 ++-- ...le-sample-with-user-specified-configuration-dta.md | 4 ++-- docs/tools/dta/xml-input-file-samples-dta.md | 4 ++-- docs/tools/mssql-cli.md | 4 ++-- docs/tools/osql-utility.md | 4 ++-- docs/tools/overview-sql-tools.md | 4 ++-- docs/tools/profiler-utility.md | 4 ++-- .../analyze-deadlocks-with-sql-server-profiler.md | 4 ++-- ...es-with-showplan-results-in-sql-server-profiler.md | 4 ++-- .../clear-a-trace-window-sql-server-profiler.md | 4 ++-- .../close-a-trace-window-sql-server-profiler.md | 4 ++-- ...ations-for-replaying-traces-sql-server-profiler.md | 4 ++-- ...elate-a-trace-with-windows-performance-log-data.md | 4 ++-- .../create-a-trace-sql-server-profiler.md | 4 ++-- .../create-a-trace-template-sql-server-profiler.md | 4 ++-- ...-script-for-running-a-trace-sql-server-profiler.md | 4 ++-- ...mplate-from-a-running-trace-sql-server-profiler.md | 4 ++-- ...a-trace-file-or-trace-table-sql-server-profiler.md | 4 ++-- .../export-a-trace-template-sql-server-profiler.md | 4 ++-- ...tract-a-script-from-a-trace-sql-server-profiler.md | 4 ++-- ...based-on-the-event-end-time-sql-server-profiler.md | 4 ++-- ...sed-on-the-event-start-time-sql-server-profiler.md | 4 ++-- .../filter-events-in-a-trace-sql-server-profiler.md | 4 ++-- ...rocess-ids-spids-in-a-trace-sql-server-profiler.md | 4 ++-- .../filter-traces-with-sql-server-profiler.md | 4 ++-- ...r-data-column-while-tracing-sql-server-profiler.md | 4 ++-- .../import-a-trace-template-sql-server-profiler.md | 4 ++-- .../modify-a-filter-sql-server-profiler.md | 4 ++-- .../sql-server-profiler/modify-trace-templates.md | 4 ++-- .../open-a-trace-file-sql-server-profiler.md | 4 ++-- .../open-a-trace-table-sql-server-profiler.md | 4 ++-- ...olumns-displayed-in-a-trace-sql-server-profiler.md | 4 ++-- .../pause-a-trace-sql-server-profiler.md | 4 ++-- ...permissions-required-to-run-sql-server-profiler.md | 4 ++-- ...ay-a-single-event-at-a-time-sql-server-profiler.md | 4 ++-- .../replay-a-trace-file-sql-server-profiler.md | 4 ++-- .../replay-a-trace-table-sql-server-profiler.md | 4 ++-- ...eplay-a-transact-sql-script-sql-server-profiler.md | 4 ++-- .../replay-options-sql-server-profiler.md | 4 ++-- docs/tools/sql-server-profiler/replay-requirements.md | 4 ++-- .../replay-to-a-breakpoint-sql-server-profiler.md | 4 ++-- .../replay-to-a-cursor-sql-server-profiler.md | 4 ++-- docs/tools/sql-server-profiler/replay-traces.md | 4 ++-- ...-has-been-paused-or-stopped-sql-server-profiler.md | 4 ++-- ...ave-trace-results-to-a-file-sql-server-profiler.md | 4 ++-- ...ve-trace-results-to-a-table-sql-server-profiler.md | 4 ++-- .../save-traces-and-trace-templates.md | 4 ++-- ...-file-size-for-a-trace-file-sql-server-profiler.md | 4 ++-- ...able-size-for-a-trace-table-sql-server-profiler.md | 4 ++-- .../set-global-trace-options-sql-server-profiler.md | 4 ++-- ...t-trace-definition-defaults-sql-server-profiler.md | 4 ++-- .../set-trace-display-defaults-sql-server-profiler.md | 4 ++-- ...ta-columns-for-a-trace-file-sql-server-profiler.md | 4 ++-- .../sql-server-profiler-f1-help.md | 4 ++-- .../sql-server-profiler-templates-and-permissions.md | 4 ++-- .../sql-server-profiler-templates.md | 4 ++-- docs/tools/sql-server-profiler/sql-server-profiler.md | 4 ++-- ...fter-connecting-to-a-server-sql-server-profiler.md | 4 ++-- docs/tools/sql-server-profiler/start-a-trace.md | 4 ++-- .../sql-server-profiler/start-sql-server-profiler.md | 4 ++-- .../stop-a-trace-sql-server-profiler.md | 4 ++-- ...iew-and-analyze-traces-with-sql-server-profiler.md | 4 ++-- .../view-filter-information-sql-server-profiler.md | 4 ++-- docs/tools/sqlagent90-application.md | 4 ++-- docs/tools/sqlcmd-utility.md | 4 ++-- docs/tools/sqldiag-utility.md | 4 ++-- docs/tools/sqllocaldb-utility.md | 4 ++-- docs/tools/sqllogship-application.md | 4 ++-- docs/tools/sqlmaint-utility.md | 4 ++-- docs/tools/sqlps-utility.md | 4 ++-- docs/tools/sqlservr-application.md | 4 ++-- docs/tools/ssbdiagnose/banner-element-ssbdiagnose.md | 4 ++-- .../diagnosticinformation-element-ssbdiagnose.md | 4 ++-- docs/tools/ssbdiagnose/issue-element-ssbdiagnose.md | 4 ++-- .../ssbdiagnose/ssbdiagnose-utility-service-broker.md | 4 ++-- .../ssbdiagnose/xml-output-file-format-ssbdiagnose.md | 4 ++-- docs/tools/tablediff-utility.md | 4 ++-- 192 files changed, 388 insertions(+), 387 deletions(-) diff --git a/docs/tools/bcp-utility.md b/docs/tools/bcp-utility.md index 7c04e70eb48..5143641a928 100644 --- a/docs/tools/bcp-utility.md +++ b/docs/tools/bcp-utility.md @@ -25,16 +25,18 @@ helpviewer_keywords: - "file importing [SQL Server]" - "column exporting [SQL Server]" ms.assetid: c0af54f5-ca4a-4995-a3a4-0ce39c30ec38 -author: "stevestein" -ms.author: "sstein" +author: markingmyname +ms.author: maghan manager: craigg monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017" --- + # bcp Utility + [!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../includes/appliesto-ss-asdb-asdw-pdw-md.md)] > For using bcp on Linux, see [Install sqlcmd and bcp on Linux](../linux/sql-server-linux-setup-tools.md). -> +> > For detailed information about using bcp with Azure SQL Data Warehouse, see [Load data with bcp](https://docs.microsoft.com/azure/sql-data-warehouse/sql-data-warehouse-load-with-bcp). The **b**ulk **c**opy **p**rogram utility (**bcp**) bulk copies data between an instance of [!INCLUDE[msCoName](../includes/msconame-md.md)] [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] and a data file in a user-specified format. The **bcp** utility can be used to import large numbers of new rows into [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] tables or to export data out of tables into data files. Except when used with the **queryout** option, the utility requires no knowledge of [!INCLUDE[tsql](../includes/tsql-md.md)]. To import data into a table, you must either use a format file created for that table or understand the structure of the table and the types of data that are valid for its columns. @@ -63,9 +65,8 @@ The new BCP supports Azure AD authentication, including Multi-Factor Authenticat **System Requirements** Windows 10 , Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2 This component requires both [Windows Installer 4.5](https://www.microsoft.com/download/details.aspx?id=8483) and [Microsoft ODBC Driver 17.3 for SQL Server](https://www.microsoft.com/download/details.aspx?id=56567). - -To check the BCP version execute `bcp /v` command and confirm that 15.0.1000.34 or higher is in use. +To check the BCP version execute `bcp /v` command and confirm that 15.0.1000.34 or higher is in use.
Syntax
 bcp [database_name.] schema.{table_name | view_name | "query"}
diff --git a/docs/tools/command-prompt-utility-reference-database-engine.md b/docs/tools/command-prompt-utility-reference-database-engine.md
index b09dfa66767..2fabb4e4eab 100644
--- a/docs/tools/command-prompt-utility-reference-database-engine.md
+++ b/docs/tools/command-prompt-utility-reference-database-engine.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "utilities [SQL Server], command prompt"
   - "command prompt [SQL Server], utilities"
 ms.assetid: 48364bd9-6ea7-45e9-a332-acf3d81bbfae
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/configuration-manager/alias-properties-alias-tab.md b/docs/tools/configuration-manager/alias-properties-alias-tab.md
index ce940f750ca..85ecc192b7f 100644
--- a/docs/tools/configuration-manager/alias-properties-alias-tab.md
+++ b/docs/tools/configuration-manager/alias-properties-alias-tab.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "aliases [SQL Server],  properties"
 ms.assetid: 2d1498e2-129c-4ce7-88e5-408e4037243c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/aliases-sql-server-configuration-manager.md b/docs/tools/configuration-manager/aliases-sql-server-configuration-manager.md
index 2e1d7d8180f..b406fe3bbea 100644
--- a/docs/tools/configuration-manager/aliases-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/aliases-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 7dc5d029-a1ed-4c13-a5c2-2aafb0f7866f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/analysis-server-properties-advanced-tab.md b/docs/tools/configuration-manager/analysis-server-properties-advanced-tab.md
index 65876b8da2a..635a41233f3 100644
--- a/docs/tools/configuration-manager/analysis-server-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/analysis-server-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: f4415e35-8f50-4cb7-813e-bdfafbdee275
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/analysis-server-properties-log-on-tab.md b/docs/tools/configuration-manager/analysis-server-properties-log-on-tab.md
index c4f361b2abf..5e877ca145e 100644
--- a/docs/tools/configuration-manager/analysis-server-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/analysis-server-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: a82e0c98-efaa-4b0b-9582-3c879ee42444
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/analysis-server-properties-service-tab.md b/docs/tools/configuration-manager/analysis-server-properties-service-tab.md
index 519b59837ce..9da08691d4f 100644
--- a/docs/tools/configuration-manager/analysis-server-properties-service-tab.md
+++ b/docs/tools/configuration-manager/analysis-server-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 8dbe4bc5-6aa9-48ee-857e-0b4ea764b9cb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/analysis-server-server-sql-server-configuration-manager.md b/docs/tools/configuration-manager/analysis-server-server-sql-server-configuration-manager.md
index 9af4dd0d401..e824cfed2f4 100644
--- a/docs/tools/configuration-manager/analysis-server-server-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/analysis-server-server-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 88e0f096-d746-4b7d-a5a4-73c5dc139f30
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/client-protocols-named-pipes-properties-protocol-tab.md b/docs/tools/configuration-manager/client-protocols-named-pipes-properties-protocol-tab.md
index e85996efd54..96762c9278f 100644
--- a/docs/tools/configuration-manager/client-protocols-named-pipes-properties-protocol-tab.md
+++ b/docs/tools/configuration-manager/client-protocols-named-pipes-properties-protocol-tab.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "Named Pipes [SQL Server], default pipe"
   - "client protocols [SQL Server]"
 ms.assetid: 30fbae62-2f2e-4d36-9c6e-3444fff68781
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/client-protocols-properties-order-tab.md b/docs/tools/configuration-manager/client-protocols-properties-order-tab.md
index fef3bcb883a..94a1c14cd55 100644
--- a/docs/tools/configuration-manager/client-protocols-properties-order-tab.md
+++ b/docs/tools/configuration-manager/client-protocols-properties-order-tab.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "client protocols [SQL Server]"
 ms.assetid: 64fd7135-1756-4885-bed9-9ab8997ecc6c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/client-protocols-shared-memory-properties-protocol-tab.md b/docs/tools/configuration-manager/client-protocols-shared-memory-properties-protocol-tab.md
index eea0d5d0aad..cbc28ae6251 100644
--- a/docs/tools/configuration-manager/client-protocols-shared-memory-properties-protocol-tab.md
+++ b/docs/tools/configuration-manager/client-protocols-shared-memory-properties-protocol-tab.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "shared memory [SQL Server]"
   - "client protocols [SQL Server]"
 ms.assetid: 941369bd-cd4d-4a64-8e42-724d9a866eb7
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/client-protocols-sql-server-configuration-manager.md b/docs/tools/configuration-manager/client-protocols-sql-server-configuration-manager.md
index abcb68ed133..596e3d05dda 100644
--- a/docs/tools/configuration-manager/client-protocols-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/client-protocols-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 538062f3-4629-4675-8568-5dcf2fff098b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/client-protocols-tcp-ip-properties-protocol-tab.md b/docs/tools/configuration-manager/client-protocols-tcp-ip-properties-protocol-tab.md
index f6d8119fa95..27a3bc20b6c 100644
--- a/docs/tools/configuration-manager/client-protocols-tcp-ip-properties-protocol-tab.md
+++ b/docs/tools/configuration-manager/client-protocols-tcp-ip-properties-protocol-tab.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "TCP/IP [SQL Server], client protocols"
   - "client protocols [SQL Server]"
 ms.assetid: d04f1bce-069c-4a02-b561-c87c3282be36
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/connecting-using-ipv6.md b/docs/tools/configuration-manager/connecting-using-ipv6.md
index 781066ab937..06dacfa96f5 100644
--- a/docs/tools/configuration-manager/connecting-using-ipv6.md
+++ b/docs/tools/configuration-manager/connecting-using-ipv6.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "IPv4"
   - "IPv6"
 ms.assetid: 2669098c-f5f1-43da-aec6-e91003ac89f6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/creating-a-valid-connection-string-using-shared-memory-protocol.md b/docs/tools/configuration-manager/creating-a-valid-connection-string-using-shared-memory-protocol.md
index 207af9d1d88..d572bb1de0c 100644
--- a/docs/tools/configuration-manager/creating-a-valid-connection-string-using-shared-memory-protocol.md
+++ b/docs/tools/configuration-manager/creating-a-valid-connection-string-using-shared-memory-protocol.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "connection strings [Database Engine], shared memory"
   - "aliases [SQL Server], shared memory"
 ms.assetid: 5fff42e8-377f-4b40-b0c8-b02393f8a1af
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/creating-a-valid-connection-string-using-tcp-ip.md b/docs/tools/configuration-manager/creating-a-valid-connection-string-using-tcp-ip.md
index 6b8c916c346..172ca9aa725 100644
--- a/docs/tools/configuration-manager/creating-a-valid-connection-string-using-tcp-ip.md
+++ b/docs/tools/configuration-manager/creating-a-valid-connection-string-using-tcp-ip.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "connection strings [Database Engine], TCP/IP"
   - "aliases [SQL Server], TCP/IP"
 ms.assetid: ee5dbc2c-1fc6-42bd-bdf5-efa792557934
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/monitoring-the-error-logs.md b/docs/tools/configuration-manager/monitoring-the-error-logs.md
index 5f74cd28d97..ed46889d563 100644
--- a/docs/tools/configuration-manager/monitoring-the-error-logs.md
+++ b/docs/tools/configuration-manager/monitoring-the-error-logs.md
@@ -22,8 +22,8 @@ helpviewer_keywords:
   - "error logs [SQL Server]"
   - "logs [SQL Server], Windows application logs"
 ms.assetid: e250336b-0695-44f6-a42f-23222f94e377
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/named-pipes-properties.md b/docs/tools/configuration-manager/named-pipes-properties.md
index dd6d9a8e74f..786747ae0fa 100644
--- a/docs/tools/configuration-manager/named-pipes-properties.md
+++ b/docs/tools/configuration-manager/named-pipes-properties.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "pipes [SQL Server], listening on pipes"
   - "Named Pipes [SQL Server], listening on pipes"
 ms.assetid: a5fd5b8e-f889-485b-89e3-d4010ec4c6ec
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/new-alias-alias-tab.md b/docs/tools/configuration-manager/new-alias-alias-tab.md
index 1d9f27e4496..8ca19a33a5a 100644
--- a/docs/tools/configuration-manager/new-alias-alias-tab.md
+++ b/docs/tools/configuration-manager/new-alias-alias-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 785eb6fb-f67e-449d-b1c8-c38dfbb95ef6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/notification-services-sql-server-configuration-manager.md b/docs/tools/configuration-manager/notification-services-sql-server-configuration-manager.md
index e2ad7de325f..49d73a8ac94 100644
--- a/docs/tools/configuration-manager/notification-services-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/notification-services-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 78d9f0e8-eca8-458e-a1ad-29ffa0838ef7
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/ns-service-name-properties-advanced-tab.md b/docs/tools/configuration-manager/ns-service-name-properties-advanced-tab.md
index 0d44efac467..d602240624c 100644
--- a/docs/tools/configuration-manager/ns-service-name-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/ns-service-name-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: a605417c-4ba7-4f3f-baa9-14166f97c478
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/ns-service-name-properties-log-on-tab.md b/docs/tools/configuration-manager/ns-service-name-properties-log-on-tab.md
index 6ecb9d737d8..74a16fabc90 100644
--- a/docs/tools/configuration-manager/ns-service-name-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/ns-service-name-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 5e6816ec-d4c5-4429-8033-b97427584890
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/ns-service-name-properties-service-tab.md b/docs/tools/configuration-manager/ns-service-name-properties-service-tab.md
index 9d979f6d0da..107f42f139e 100644
--- a/docs/tools/configuration-manager/ns-service-name-properties-service-tab.md
+++ b/docs/tools/configuration-manager/ns-service-name-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 57c6b791-1663-4a01-9de2-cf1bdd8adb2c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-advanced-tab.md b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-advanced-tab.md
index 0d690920461..4626eb98f25 100644
--- a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: abd5ca68-825f-4c07-b27c-3b3a79d03d74
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-certificate-tab.md b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-certificate-tab.md
index 276b24ae0e0..4ebbb310ad0 100644
--- a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-certificate-tab.md
+++ b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-certificate-tab.md
@@ -12,8 +12,8 @@ f1_keywords:
 helpviewer_keywords: 
   - "MSSQLSERVER property protocols"
 ms.assetid: 776addd6-25f3-4875-9a71-064035787090
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-flags-tab.md b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-flags-tab.md
index c4e90562cb4..daace86c573 100644
--- a/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-flags-tab.md
+++ b/docs/tools/configuration-manager/protocols-for-mssqlserver-properties-flags-tab.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "MSSQLSERVER property protocols"
 ms.assetid: 4d38e6e9-f95f-4e79-ae45-89f631037528
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/protocols-for-server-sql-server-configuration-manager.md b/docs/tools/configuration-manager/protocols-for-server-sql-server-configuration-manager.md
index 674a6fc9d8a..67a56a56ec0 100644
--- a/docs/tools/configuration-manager/protocols-for-server-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/protocols-for-server-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: ee30d5f5-7f6a-4101-849e-73dfcc1b2528
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/report-server-properties-advanced-tab.md b/docs/tools/configuration-manager/report-server-properties-advanced-tab.md
index 3d70b33da5d..37e1de78394 100644
--- a/docs/tools/configuration-manager/report-server-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/report-server-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 80aedab6-2be4-409d-88ba-2107e96345fe
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/report-server-properties-log-on-tab.md b/docs/tools/configuration-manager/report-server-properties-log-on-tab.md
index 99b8aa3bdda..156ee198a3b 100644
--- a/docs/tools/configuration-manager/report-server-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/report-server-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: f54be594-f290-4db2-bf18-fd2521728a4a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/report-server-properties-service-tab.md b/docs/tools/configuration-manager/report-server-properties-service-tab.md
index 6347560e0f3..04ea958f308 100644
--- a/docs/tools/configuration-manager/report-server-properties-service-tab.md
+++ b/docs/tools/configuration-manager/report-server-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 2a2e1dbf-02b9-4893-aaf0-c0e4a2c9b4f9
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/report-server-server-sql-server-configuration-manager.md b/docs/tools/configuration-manager/report-server-server-sql-server-configuration-manager.md
index 461ad01747f..96dc2d218d0 100644
--- a/docs/tools/configuration-manager/report-server-server-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/report-server-server-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: ea939db1-ce97-4eea-8223-1ca6a82128d7
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/shared-memory-properties.md b/docs/tools/configuration-manager/shared-memory-properties.md
index 9c151ca94d8..f965e4125d3 100644
--- a/docs/tools/configuration-manager/shared-memory-properties.md
+++ b/docs/tools/configuration-manager/shared-memory-properties.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "shared memory [SQL Server]"
 ms.assetid: dc1704da-eacd-4d26-b529-c996f958ca4b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-advanced.md b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-advanced.md
index 45d5b393fc4..d9cb50eb827 100644
--- a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-advanced.md
+++ b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-advanced.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: d0be29c2-19df-4882-9832-2efdbefb4b89
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-log-on-tab.md b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-log-on-tab.md
index 14634a3a282..2fc0eac1d5a 100644
--- a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-log-on-tab.md
+++ b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 13e260f9-a75f-430b-88a3-959ddcead8fe
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-service-tab.md b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-service-tab.md
index e204162c168..02d5579952f 100644
--- a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-service-tab.md
+++ b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 6aad7ebe-c4be-4d37-8536-61502f51faa2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-sql-server-configuration-manager.md b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-sql-server-configuration-manager.md
index 67c90297a41..c7b3ca9eb78 100644
--- a/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/sql-full-text-filter-daemon-launcher-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: d0dc03db-5f76-4558-b041-1ac7b9b5bb16
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-native-client-11-0-configuration.md b/docs/tools/configuration-manager/sql-native-client-11-0-configuration.md
index 4e20e870ad6..be20abcc22b 100644
--- a/docs/tools/configuration-manager/sql-native-client-11-0-configuration.md
+++ b/docs/tools/configuration-manager/sql-native-client-11-0-configuration.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "client configuration [SQL Server], SQL Server Native Client"
 ms.assetid: e73143e9-5e7b-4d0a-8827-ab900efdcb35
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-agent-properties-advanced-tab.md b/docs/tools/configuration-manager/sql-server-agent-properties-advanced-tab.md
index 780711da304..7387fadefeb 100644
--- a/docs/tools/configuration-manager/sql-server-agent-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/sql-server-agent-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 588f886f-d6c8-48c8-893d-c2be43a97943
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-agent-properties-log-on-tab.md b/docs/tools/configuration-manager/sql-server-agent-properties-log-on-tab.md
index d6dc5d655ef..6f7197861d5 100644
--- a/docs/tools/configuration-manager/sql-server-agent-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/sql-server-agent-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 01fc6329-5d6b-4186-9565-395f375477bb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-agent-properties-service-tab.md b/docs/tools/configuration-manager/sql-server-agent-properties-service-tab.md
index 358f874383b..c290416b6e4 100644
--- a/docs/tools/configuration-manager/sql-server-agent-properties-service-tab.md
+++ b/docs/tools/configuration-manager/sql-server-agent-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 452857fb-be1b-4e1e-851c-dd2216640f35
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-agent-server-sql-server-configuration-manager.md b/docs/tools/configuration-manager/sql-server-agent-server-sql-server-configuration-manager.md
index 88e9e11b171..fa533d90290 100644
--- a/docs/tools/configuration-manager/sql-server-agent-server-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/sql-server-agent-server-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: ed7ee22d-c7c1-4a1e-a225-ec37a1ecfdaa
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-browser-properties-advanced-tab.md b/docs/tools/configuration-manager/sql-server-browser-properties-advanced-tab.md
index 9d98f1e7619..bf4d7cacd1f 100644
--- a/docs/tools/configuration-manager/sql-server-browser-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/sql-server-browser-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: ba79137a-cb72-4bf3-a650-e11d02cfce10
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-browser-properties-log-on-tab.md b/docs/tools/configuration-manager/sql-server-browser-properties-log-on-tab.md
index a215184633c..f25235e3eb3 100644
--- a/docs/tools/configuration-manager/sql-server-browser-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/sql-server-browser-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: c77871ec-c2f4-4e4a-9a10-5aeb4ae70507
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-browser-properties-service-tab.md b/docs/tools/configuration-manager/sql-server-browser-properties-service-tab.md
index ce6a0faf6da..f7ed1193fa3 100644
--- a/docs/tools/configuration-manager/sql-server-browser-properties-service-tab.md
+++ b/docs/tools/configuration-manager/sql-server-browser-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 98ace9b0-72d5-4b72-9b7b-11fbc490981a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-browser-service.md b/docs/tools/configuration-manager/sql-server-browser-service.md
index c26090d4c25..d519401c9ee 100644
--- a/docs/tools/configuration-manager/sql-server-browser-service.md
+++ b/docs/tools/configuration-manager/sql-server-browser-service.md
@@ -16,8 +16,8 @@ helpviewer_keywords:
   - "Browser Service"
   - "SQL Server Browser service"
 ms.assetid: 3cc00d3a-487c-4cd9-a155-655f02485fa0
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-browser-sql-server-configuration-manager.md b/docs/tools/configuration-manager/sql-server-browser-sql-server-configuration-manager.md
index 3fc44d38712..d64c0f903c0 100644
--- a/docs/tools/configuration-manager/sql-server-browser-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/sql-server-browser-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 5b615023-3c76-4b95-bbd0-9c39f3353f4b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-configuration-manager-help.md b/docs/tools/configuration-manager/sql-server-configuration-manager-help.md
index 365a7d94615..44766906ff4 100644
--- a/docs/tools/configuration-manager/sql-server-configuration-manager-help.md
+++ b/docs/tools/configuration-manager/sql-server-configuration-manager-help.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "SQL Server Configuration Manager, help"
 ms.assetid: 6e909911-39a6-469b-b22a-3afdfd08a30b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-integration-services-10-0-sql-server-configuration-manager.md b/docs/tools/configuration-manager/sql-server-integration-services-10-0-sql-server-configuration-manager.md
index 6ba5c35104d..fd21b61ba21 100644
--- a/docs/tools/configuration-manager/sql-server-integration-services-10-0-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/sql-server-integration-services-10-0-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 3136f7ae-b3f1-4932-a5da-95175907671c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-integration-services-properties-advanced-tab.md b/docs/tools/configuration-manager/sql-server-integration-services-properties-advanced-tab.md
index 45428f9e53b..760cb8f030d 100644
--- a/docs/tools/configuration-manager/sql-server-integration-services-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/sql-server-integration-services-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: d89cc01f-084b-41b0-8c60-3c6b964d7ad4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-integration-services-properties-log-on-tab.md b/docs/tools/configuration-manager/sql-server-integration-services-properties-log-on-tab.md
index 48aeb54db6a..a530c7f8e3e 100644
--- a/docs/tools/configuration-manager/sql-server-integration-services-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/sql-server-integration-services-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: c0eb1b87-6bb0-475e-8492-0fd3c3f910ea
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-integration-services-properties-service-tab.md b/docs/tools/configuration-manager/sql-server-integration-services-properties-service-tab.md
index 37cca017b7d..5431377a22e 100644
--- a/docs/tools/configuration-manager/sql-server-integration-services-properties-service-tab.md
+++ b/docs/tools/configuration-manager/sql-server-integration-services-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 37f0acd9-c96f-48fd-9b53-2ca0097af242
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-native-client-configuration-properties-flags-tab.md b/docs/tools/configuration-manager/sql-server-native-client-configuration-properties-flags-tab.md
index 6e17450781a..ad7cd11c275 100644
--- a/docs/tools/configuration-manager/sql-server-native-client-configuration-properties-flags-tab.md
+++ b/docs/tools/configuration-manager/sql-server-native-client-configuration-properties-flags-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 59af121d-c8b9-4faa-91a1-b664f2c9b441
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-network-configuration.md b/docs/tools/configuration-manager/sql-server-network-configuration.md
index c54ba66a52f..a3e5c3e83ba 100644
--- a/docs/tools/configuration-manager/sql-server-network-configuration.md
+++ b/docs/tools/configuration-manager/sql-server-network-configuration.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: ef2e5e6a-e2cf-4391-803c-23096dee1a14
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-properties-advanced-tab.md b/docs/tools/configuration-manager/sql-server-properties-advanced-tab.md
index fb3dab4004d..c8b0cc1b559 100644
--- a/docs/tools/configuration-manager/sql-server-properties-advanced-tab.md
+++ b/docs/tools/configuration-manager/sql-server-properties-advanced-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 2ffd10fd-bac1-478f-9cff-96ed6c8b787f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-properties-filestream-tab.md b/docs/tools/configuration-manager/sql-server-properties-filestream-tab.md
index fda6495c58b..97da5358ae1 100644
--- a/docs/tools/configuration-manager/sql-server-properties-filestream-tab.md
+++ b/docs/tools/configuration-manager/sql-server-properties-filestream-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 07ca5ac6-a68a-4e85-bc6f-fa7ccf9f1c10
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-properties-log-on-tab.md b/docs/tools/configuration-manager/sql-server-properties-log-on-tab.md
index 29a1d435afd..4ecf69b3f94 100644
--- a/docs/tools/configuration-manager/sql-server-properties-log-on-tab.md
+++ b/docs/tools/configuration-manager/sql-server-properties-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 405073fc-eaa3-43c6-bf82-2cd58cacc1c3
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-properties-service-tab.md b/docs/tools/configuration-manager/sql-server-properties-service-tab.md
index 25fc19b148c..06c2d65376e 100644
--- a/docs/tools/configuration-manager/sql-server-properties-service-tab.md
+++ b/docs/tools/configuration-manager/sql-server-properties-service-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: e4ae0c6b-6fd8-4325-b54e-1758fc659958
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-properties-startup-parameters-tab.md b/docs/tools/configuration-manager/sql-server-properties-startup-parameters-tab.md
index 7a849e4c782..a228bb47cf9 100644
--- a/docs/tools/configuration-manager/sql-server-properties-startup-parameters-tab.md
+++ b/docs/tools/configuration-manager/sql-server-properties-startup-parameters-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 16942624-5374-446c-8de4-ee6ed34d6e94
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-server-sql-server-configuration-manager.md b/docs/tools/configuration-manager/sql-server-server-sql-server-configuration-manager.md
index 572bec99c37..b0e8bd9e618 100644
--- a/docs/tools/configuration-manager/sql-server-server-sql-server-configuration-manager.md
+++ b/docs/tools/configuration-manager/sql-server-server-sql-server-configuration-manager.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: a701c5d5-f190-4b57-a3f8-954c2572e682
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/sql-server-services.md b/docs/tools/configuration-manager/sql-server-services.md
index bc9544edccd..d601ae1ee3a 100644
--- a/docs/tools/configuration-manager/sql-server-services.md
+++ b/docs/tools/configuration-manager/sql-server-services.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: 97193ac4-aa97-489c-9e81-6fcbdf88aebf
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/tcp-ip-properties-ip-addresses-tab.md b/docs/tools/configuration-manager/tcp-ip-properties-ip-addresses-tab.md
index 07564b6249c..7a09fcb2aed 100644
--- a/docs/tools/configuration-manager/tcp-ip-properties-ip-addresses-tab.md
+++ b/docs/tools/configuration-manager/tcp-ip-properties-ip-addresses-tab.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "ports [SQL Server], listening on"
   - "listening [SQL Server], on ports"
 ms.assetid: 4c17ed45-9da7-4bec-bce6-970109fe7365
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # TCP/IP Properties (IP Addresses Tab)
diff --git a/docs/tools/configuration-manager/tcp-ip-properties-protocols-tab.md b/docs/tools/configuration-manager/tcp-ip-properties-protocols-tab.md
index b4165a95e89..702fe3924fb 100644
--- a/docs/tools/configuration-manager/tcp-ip-properties-protocols-tab.md
+++ b/docs/tools/configuration-manager/tcp-ip-properties-protocols-tab.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "TCP/IP [SQL Server], configuration options"
 ms.assetid: 007638fc-3a24-4460-adbe-545ded5d6f88
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # TCP/IP Properties (Protocols Tab)
diff --git a/docs/tools/configuration-manager/unknown-service-log-on-tab.md b/docs/tools/configuration-manager/unknown-service-log-on-tab.md
index 21cd67278af..306fca4ef5b 100644
--- a/docs/tools/configuration-manager/unknown-service-log-on-tab.md
+++ b/docs/tools/configuration-manager/unknown-service-log-on-tab.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: configuration
 ms.topic: conceptual
 ms.assetid: e9b35cb5-d8ae-42ea-b59e-deedc99c4823
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/viewing-the-sql-server-error-log.md b/docs/tools/configuration-manager/viewing-the-sql-server-error-log.md
index 16cf4bfaa4b..c969e502f0c 100644
--- a/docs/tools/configuration-manager/viewing-the-sql-server-error-log.md
+++ b/docs/tools/configuration-manager/viewing-the-sql-server-error-log.md
@@ -15,8 +15,8 @@ helpviewer_keywords:
   - "displaying SQL Server error log"
   - "logs [SQL Server], SQL Server error logs"
 ms.assetid: 6908c21a-65e3-458f-a272-fee256d86448
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/configuration-manager/viewing-the-windows-application-log.md b/docs/tools/configuration-manager/viewing-the-windows-application-log.md
index e60e0ee05d0..91e4485edd5 100644
--- a/docs/tools/configuration-manager/viewing-the-windows-application-log.md
+++ b/docs/tools/configuration-manager/viewing-the-windows-application-log.md
@@ -17,8 +17,8 @@ helpviewer_keywords:
   - "displaying Windows application logs"
   - "logs [SQL Server], Windows application logs"
 ms.assetid: f9853b74-7db7-47cc-b957-e49ed5bc0a1a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 monikerRange: ">=sql-server-2016||=sqlallproducts-allversions"
 manager: craigg
 ---
diff --git a/docs/tools/distributed-replay/administration-tool-command-line-options-distributed-replay-utility.md b/docs/tools/distributed-replay/administration-tool-command-line-options-distributed-replay-utility.md
index c8b9978da0f..45fe50f1473 100644
--- a/docs/tools/distributed-replay/administration-tool-command-line-options-distributed-replay-utility.md
+++ b/docs/tools/distributed-replay/administration-tool-command-line-options-distributed-replay-utility.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: c01b0ed3-67e4-4561-92d2-a8fbb086aca8
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Administration Tool Command-line Options (Distributed Replay Utility)
diff --git a/docs/tools/distributed-replay/cancel-option-distributed-replay-administration-tool.md b/docs/tools/distributed-replay/cancel-option-distributed-replay-administration-tool.md
index 801dc1aca3e..77f68b60a93 100644
--- a/docs/tools/distributed-replay/cancel-option-distributed-replay-administration-tool.md
+++ b/docs/tools/distributed-replay/cancel-option-distributed-replay-administration-tool.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: fea376de-307a-4b45-b7e2-37df88f3681a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Cancel Option (Distributed Replay Administration Tool)
diff --git a/docs/tools/distributed-replay/distributed-replay-security.md b/docs/tools/distributed-replay/distributed-replay-security.md
index 35336a1b4cf..feee86d0b33 100644
--- a/docs/tools/distributed-replay/distributed-replay-security.md
+++ b/docs/tools/distributed-replay/distributed-replay-security.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: 7e2e586d-947d-4fe2-86c5-f06200ebf139
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Distributed Replay Security
diff --git a/docs/tools/distributed-replay/prepare-the-input-trace-data.md b/docs/tools/distributed-replay/prepare-the-input-trace-data.md
index e9626760800..042d4e3c25b 100644
--- a/docs/tools/distributed-replay/prepare-the-input-trace-data.md
+++ b/docs/tools/distributed-replay/prepare-the-input-trace-data.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: c14fd3d2-5770-47c2-a851-cc13ddbc9bf5
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Prepare the Input Trace Data
diff --git a/docs/tools/distributed-replay/preprocess-option-distributed-replay-administration-tool.md b/docs/tools/distributed-replay/preprocess-option-distributed-replay-administration-tool.md
index 500ccc645e9..e1b56880fb8 100644
--- a/docs/tools/distributed-replay/preprocess-option-distributed-replay-administration-tool.md
+++ b/docs/tools/distributed-replay/preprocess-option-distributed-replay-administration-tool.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: 9b5012fd-233e-4a25-a2e1-585c63b70502
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Preprocess Option (Distributed Replay Administration Tool)
diff --git a/docs/tools/distributed-replay/replay-option-distributed-replay-administration-tool.md b/docs/tools/distributed-replay/replay-option-distributed-replay-administration-tool.md
index a9b025ba2bd..0d0c324141c 100644
--- a/docs/tools/distributed-replay/replay-option-distributed-replay-administration-tool.md
+++ b/docs/tools/distributed-replay/replay-option-distributed-replay-administration-tool.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: d7bce6a5-d414-488d-a3cd-50c1c62019c4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay Option (Distributed Replay Administration Tool)
diff --git a/docs/tools/distributed-replay/replay-trace-data.md b/docs/tools/distributed-replay/replay-trace-data.md
index 1fbf442e7f2..7bc94a8c333 100644
--- a/docs/tools/distributed-replay/replay-trace-data.md
+++ b/docs/tools/distributed-replay/replay-trace-data.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: 19ff5285-fb9d-4fd1-97c4-ec72c311c384
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay Trace Data
diff --git a/docs/tools/distributed-replay/review-the-replay-results.md b/docs/tools/distributed-replay/review-the-replay-results.md
index cabc505b570..26d144c7b4a 100644
--- a/docs/tools/distributed-replay/review-the-replay-results.md
+++ b/docs/tools/distributed-replay/review-the-replay-results.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: da999781-f0ff-47eb-ba7a-09c0ed8f61ad
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Review the Replay Results
diff --git a/docs/tools/distributed-replay/sql-server-distributed-replay.md b/docs/tools/distributed-replay/sql-server-distributed-replay.md
index 1ae0b82b8e4..7f63bfd1e5e 100644
--- a/docs/tools/distributed-replay/sql-server-distributed-replay.md
+++ b/docs/tools/distributed-replay/sql-server-distributed-replay.md
@@ -9,8 +9,8 @@ helpviewer_keywords:
   - "Distributed Replay"
   - "SQL Server Distributed Replay"
 ms.assetid: 58ef7016-b105-42c2-90a0-364f411849a4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQL Server Distributed Replay
diff --git a/docs/tools/dta/column-element-for-index-dta.md b/docs/tools/dta/column-element-for-index-dta.md
index 8e1c253c7ac..933d31e941b 100644
--- a/docs/tools/dta/column-element-for-index-dta.md
+++ b/docs/tools/dta/column-element-for-index-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Column element"
 ms.assetid: ba9fac20-26bd-4333-940e-842c15241b46
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Column Element for Index (DTA)
diff --git a/docs/tools/dta/configuration-element-dta.md b/docs/tools/dta/configuration-element-dta.md
index db70117a21d..33e9940b028 100644
--- a/docs/tools/dta/configuration-element-dta.md
+++ b/docs/tools/dta/configuration-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Configuration element"
 ms.assetid: 1478e56f-57c4-4441-bac9-1ac91453839b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Configuration Element (DTA)
diff --git a/docs/tools/dta/create-element-dta.md b/docs/tools/dta/create-element-dta.md
index e31f031303c..403fbc485c2 100644
--- a/docs/tools/dta/create-element-dta.md
+++ b/docs/tools/dta/create-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Create element (DTA)"
 ms.assetid: 9d076c90-f933-45f4-b6d9-447793f6528b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Create Element (DTA)
diff --git a/docs/tools/dta/database-element-for-configuration-dta.md b/docs/tools/dta/database-element-for-configuration-dta.md
index 5139c7b6802..04b788600e9 100644
--- a/docs/tools/dta/database-element-for-configuration-dta.md
+++ b/docs/tools/dta/database-element-for-configuration-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Database element"
 ms.assetid: e91ba243-6cc9-457a-8f5a-134f3c71ae69
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Database Element for Configuration (DTA)
diff --git a/docs/tools/dta/database-element-for-server-dta.md b/docs/tools/dta/database-element-for-server-dta.md
index 163115ba479..6181babaf35 100644
--- a/docs/tools/dta/database-element-for-server-dta.md
+++ b/docs/tools/dta/database-element-for-server-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Database element"
 ms.assetid: 5cd9a87a-af4b-45f3-8c18-f7fd7e7d3064
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Database Element for Server (DTA)
diff --git a/docs/tools/dta/database-element-for-workload-dta.md b/docs/tools/dta/database-element-for-workload-dta.md
index ad5bbb71955..65ac5713d89 100644
--- a/docs/tools/dta/database-element-for-workload-dta.md
+++ b/docs/tools/dta/database-element-for-workload-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Database element"
 ms.assetid: 112fca2a-37e5-4162-b2e7-b56eb8ab0c6f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Database Element for Workload (DTA)
diff --git a/docs/tools/dta/databasetoconnect-element-dta.md b/docs/tools/dta/databasetoconnect-element-dta.md
index dff81c1c361..9a49019dd98 100644
--- a/docs/tools/dta/databasetoconnect-element-dta.md
+++ b/docs/tools/dta/databasetoconnect-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "DatabaseToConnect element"
 ms.assetid: 65153a66-3aee-4429-99b7-0816ac23c285
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # DatabaseToConnect Element (DTA)
diff --git a/docs/tools/dta/droponlymode-element-dta.md b/docs/tools/dta/droponlymode-element-dta.md
index 1be93e14e5e..aff86f851be 100644
--- a/docs/tools/dta/droponlymode-element-dta.md
+++ b/docs/tools/dta/droponlymode-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "DropOnlyMode element"
 ms.assetid: 80960676-7581-4074-889b-80ee665963dd
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # DropOnlyMode Element (DTA)
diff --git a/docs/tools/dta/dta-utility.md b/docs/tools/dta/dta-utility.md
index aa7fd55ea7b..bb5e36f7e9e 100644
--- a/docs/tools/dta/dta-utility.md
+++ b/docs/tools/dta/dta-utility.md
@@ -18,8 +18,8 @@ helpviewer_keywords:
   - "Database Engine Tuning Advisor [SQL Server], command prompt"
   - "optimizing databases [SQL Server]"
 ms.assetid: a0b210ce-9b58-4709-80cb-9363b68a1f5a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # dta Utility
diff --git a/docs/tools/dta/dtainput-element-dta.md b/docs/tools/dta/dtainput-element-dta.md
index d890be70ec8..06b0cb065c9 100644
--- a/docs/tools/dta/dtainput-element-dta.md
+++ b/docs/tools/dta/dtainput-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "DTAInput element"
 ms.assetid: 40c19abf-ded5-43de-be96-5b43b1b81b03
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # DTAInput Element (DTA)
diff --git a/docs/tools/dta/dtaxml-element-dta.md b/docs/tools/dta/dtaxml-element-dta.md
index 8d4b37e9a77..a0b959e7324 100644
--- a/docs/tools/dta/dtaxml-element-dta.md
+++ b/docs/tools/dta/dtaxml-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "DTAXML element"
 ms.assetid: 3d9942ed-8a27-40db-a7c9-808984d914a2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # DTAXML Element (DTA)
diff --git a/docs/tools/dta/eventstring-element-dta.md b/docs/tools/dta/eventstring-element-dta.md
index 1e0282f0f29..8f1b9a7797d 100644
--- a/docs/tools/dta/eventstring-element-dta.md
+++ b/docs/tools/dta/eventstring-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "EventString element"
 ms.assetid: f76c37b4-2f6e-4274-8ee2-87e89d98e8a2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # EventString Element (DTA)
diff --git a/docs/tools/dta/featureset-element-dta.md b/docs/tools/dta/featureset-element-dta.md
index 807dc802aa0..d64a57a5231 100644
--- a/docs/tools/dta/featureset-element-dta.md
+++ b/docs/tools/dta/featureset-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "FeatureSet element"
 ms.assetid: f2070c53-4a5c-4c11-ac38-96ee200c84f0
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # FeatureSet Element (DTA)
diff --git a/docs/tools/dta/file-element-dta.md b/docs/tools/dta/file-element-dta.md
index bb439227304..2e622e0d14a 100644
--- a/docs/tools/dta/file-element-dta.md
+++ b/docs/tools/dta/file-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "File element"
 ms.assetid: 73dce835-9a80-4aef-8e0f-9dcf07dd5b80
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # File Element (DTA)
diff --git a/docs/tools/dta/filegroup-element-for-index-dta.md b/docs/tools/dta/filegroup-element-for-index-dta.md
index 2dce98af787..de24de3d0ff 100644
--- a/docs/tools/dta/filegroup-element-for-index-dta.md
+++ b/docs/tools/dta/filegroup-element-for-index-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Filegroup element [DTA]"
 ms.assetid: 7078d2fb-fa77-44fc-beb3-c095088fcb85
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filegroup Element for Index (DTA)
diff --git a/docs/tools/dta/index-element-dta.md b/docs/tools/dta/index-element-dta.md
index f5ad2c13a0e..bdf0b898ddf 100644
--- a/docs/tools/dta/index-element-dta.md
+++ b/docs/tools/dta/index-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Index element (DTA)"
 ms.assetid: 447d3964-b387-40f6-9189-71386774c29e
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Index Element (DTA)
diff --git a/docs/tools/dta/keepexisting-element-dta.md b/docs/tools/dta/keepexisting-element-dta.md
index 86ce8aaedf6..05e6f0c4ccf 100644
--- a/docs/tools/dta/keepexisting-element-dta.md
+++ b/docs/tools/dta/keepexisting-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "KeepExisting element"
 ms.assetid: e67aae61-d06d-4a03-85ba-6516c3502dce
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # KeepExisting Element (DTA)
diff --git a/docs/tools/dta/lesson-1-basic-navigation-in-database-engine-tuning-advisor.md b/docs/tools/dta/lesson-1-basic-navigation-in-database-engine-tuning-advisor.md
index bb5410f91ea..1f24b5adfb7 100644
--- a/docs/tools/dta/lesson-1-basic-navigation-in-database-engine-tuning-advisor.md
+++ b/docs/tools/dta/lesson-1-basic-navigation-in-database-engine-tuning-advisor.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "Database Engine Tuning Advisor [SQL Server], tutorials"
 ms.assetid: ad49b2e0-a5e3-49d2-80fd-9f4eaa3652cb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Lesson 1: Basic Navigation in Database Engine Tuning Advisor
diff --git a/docs/tools/dta/lesson-2-using-database-engine-tuning-advisor.md b/docs/tools/dta/lesson-2-using-database-engine-tuning-advisor.md
index 97118bf4271..1e9e66d083d 100644
--- a/docs/tools/dta/lesson-2-using-database-engine-tuning-advisor.md
+++ b/docs/tools/dta/lesson-2-using-database-engine-tuning-advisor.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "Database Engine [SQL Server], tutorials"
 ms.assetid: 3317d4f8-ed9e-4f2e-b5f1-a6bf3a9d6c8d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Lesson 2: Using Database Engine Tuning Advisor
diff --git a/docs/tools/dta/lesson-3-using-the-dta-command-prompt-utility.md b/docs/tools/dta/lesson-3-using-the-dta-command-prompt-utility.md
index 729f2c60ff6..f3c848ea585 100644
--- a/docs/tools/dta/lesson-3-using-the-dta-command-prompt-utility.md
+++ b/docs/tools/dta/lesson-3-using-the-dta-command-prompt-utility.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "Database Engine [SQL Server], tutorials"
 ms.assetid: 30f27f4d-8852-4b12-ba62-57f63e496f1d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Lesson 3: Using the dta Command Prompt Utility
diff --git a/docs/tools/dta/name-element-for-column-dta.md b/docs/tools/dta/name-element-for-column-dta.md
index 97d0656679d..a8bc835bcd3 100644
--- a/docs/tools/dta/name-element-for-column-dta.md
+++ b/docs/tools/dta/name-element-for-column-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: f93b61de-01fe-4237-ada4-f1e481550564
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Column (DTA)
diff --git a/docs/tools/dta/name-element-for-database-dta.md b/docs/tools/dta/name-element-for-database-dta.md
index 1a5a5298b09..d23d2377d71 100644
--- a/docs/tools/dta/name-element-for-database-dta.md
+++ b/docs/tools/dta/name-element-for-database-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: e871c4fa-3b57-46cf-b4f8-e3be86f92dc4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Database (DTA)
diff --git a/docs/tools/dta/name-element-for-index-dta.md b/docs/tools/dta/name-element-for-index-dta.md
index d5ce5dda8d4..377d918717d 100644
--- a/docs/tools/dta/name-element-for-index-dta.md
+++ b/docs/tools/dta/name-element-for-index-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: 2300e9cf-f0a8-49e6-b1f5-45ffe03ccb5f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Index (DTA)
diff --git a/docs/tools/dta/name-element-for-schema-dta.md b/docs/tools/dta/name-element-for-schema-dta.md
index 2b0fe22f2c9..0d1b7d82ed7 100644
--- a/docs/tools/dta/name-element-for-schema-dta.md
+++ b/docs/tools/dta/name-element-for-schema-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: 014e4854-fed2-454b-8557-5f7c5bb6b17a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Schema (DTA)
diff --git a/docs/tools/dta/name-element-for-server-dta.md b/docs/tools/dta/name-element-for-server-dta.md
index a4df5503116..18073b47f8e 100644
--- a/docs/tools/dta/name-element-for-server-dta.md
+++ b/docs/tools/dta/name-element-for-server-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: 4c94754d-6d62-4357-8ce7-f107ebf90c71
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Server (DTA)
diff --git a/docs/tools/dta/name-element-for-table-dta.md b/docs/tools/dta/name-element-for-table-dta.md
index 614c9e1c805..16b79a9093d 100644
--- a/docs/tools/dta/name-element-for-table-dta.md
+++ b/docs/tools/dta/name-element-for-table-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Name element"
 ms.assetid: 422a755f-ee52-4863-b1aa-f4ef1b8fd0bb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Name Element for Table (DTA)
diff --git a/docs/tools/dta/onlineindexoperation-element-dta.md b/docs/tools/dta/onlineindexoperation-element-dta.md
index 805b365b606..98b30bc9b2a 100644
--- a/docs/tools/dta/onlineindexoperation-element-dta.md
+++ b/docs/tools/dta/onlineindexoperation-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "OnlineIndexOperation element"
 ms.assetid: 7c5614cd-09aa-4a59-9591-347aa7d36473
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # OnlineIndexOperation Element (DTA)
diff --git a/docs/tools/dta/partitioning-element-dta.md b/docs/tools/dta/partitioning-element-dta.md
index c412836e078..876e615b4e7 100644
--- a/docs/tools/dta/partitioning-element-dta.md
+++ b/docs/tools/dta/partitioning-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Partitioning element"
 ms.assetid: 9bc5d1d5-27a7-4434-966f-c3935794af27
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Partitioning Element (DTA)
diff --git a/docs/tools/dta/recommendation-element-dta.md b/docs/tools/dta/recommendation-element-dta.md
index 21d4d354da9..ad88a7b5f68 100644
--- a/docs/tools/dta/recommendation-element-dta.md
+++ b/docs/tools/dta/recommendation-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Recommendation element"
 ms.assetid: 679ea535-865a-4633-a4d3-5b3090515158
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Recommendation Element (DTA)
diff --git a/docs/tools/dta/schema-element-for-database-dta.md b/docs/tools/dta/schema-element-for-database-dta.md
index 8466f30a3e7..80b77a3b285 100644
--- a/docs/tools/dta/schema-element-for-database-dta.md
+++ b/docs/tools/dta/schema-element-for-database-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Schema element"
 ms.assetid: d932e59c-953f-4ab4-934d-b6baf344835c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Schema Element for Database (DTA)
diff --git a/docs/tools/dta/server-element-dta.md b/docs/tools/dta/server-element-dta.md
index c5666e920b6..e8867c0226f 100644
--- a/docs/tools/dta/server-element-dta.md
+++ b/docs/tools/dta/server-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Server element"
 ms.assetid: 9fe0bfb4-3aa6-4eb2-a83e-c0d0e7d4e9f6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Server Element (DTA)
diff --git a/docs/tools/dta/server-element-for-configuration-dta.md b/docs/tools/dta/server-element-for-configuration-dta.md
index a0582ee6feb..476653eb910 100644
--- a/docs/tools/dta/server-element-for-configuration-dta.md
+++ b/docs/tools/dta/server-element-for-configuration-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Server element"
 ms.assetid: da9ff870-9cfd-42fe-994b-7b9292681f7d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Server Element for Configuration (DTA)
diff --git a/docs/tools/dta/simple-xml-input-file-sample-dta.md b/docs/tools/dta/simple-xml-input-file-sample-dta.md
index 6855ba5c90c..9f290e24710 100644
--- a/docs/tools/dta/simple-xml-input-file-sample-dta.md
+++ b/docs/tools/dta/simple-xml-input-file-sample-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "sample applications [DTA]"
 ms.assetid: 5b00e4eb-1742-43ec-98d8-d84216b6b840
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Simple XML Input File Sample (DTA)
diff --git a/docs/tools/dta/storageboundinmb-element-dta.md b/docs/tools/dta/storageboundinmb-element-dta.md
index c184a06c411..56acfe5307f 100644
--- a/docs/tools/dta/storageboundinmb-element-dta.md
+++ b/docs/tools/dta/storageboundinmb-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "StorageBoundInMB element"
 ms.assetid: a8374910-bf68-4edb-b464-53a3a705e7f4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # StorageBoundInMB Element (DTA)
diff --git a/docs/tools/dta/table-element-for-schema-dta.md b/docs/tools/dta/table-element-for-schema-dta.md
index 0882a7b3881..67161f498fc 100644
--- a/docs/tools/dta/table-element-for-schema-dta.md
+++ b/docs/tools/dta/table-element-for-schema-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Table element [DTA]"
 ms.assetid: a59e8319-05d1-47f3-af39-7d970ab8e7dc
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Table Element for Schema (DTA)
diff --git a/docs/tools/dta/testserver-element-dta.md b/docs/tools/dta/testserver-element-dta.md
index c0dcbab8c30..b85643c5f88 100644
--- a/docs/tools/dta/testserver-element-dta.md
+++ b/docs/tools/dta/testserver-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "TestServer element"
 ms.assetid: caa3547a-2cd5-47ad-ace2-a36752835cfe
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # TestServer Element (DTA)
diff --git a/docs/tools/dta/tuningoptions-element-dta.md b/docs/tools/dta/tuningoptions-element-dta.md
index d55f8ae988c..eb6dd1b389f 100644
--- a/docs/tools/dta/tuningoptions-element-dta.md
+++ b/docs/tools/dta/tuningoptions-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "TuningOptions element"
 ms.assetid: 58a22ba1-8e03-411f-bd46-85e4540f217a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # TuningOptions Element (DTA)
diff --git a/docs/tools/dta/tuningtimeinmin-element-dta.md b/docs/tools/dta/tuningtimeinmin-element-dta.md
index d480d60257d..c0dff018da0 100644
--- a/docs/tools/dta/tuningtimeinmin-element-dta.md
+++ b/docs/tools/dta/tuningtimeinmin-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "TuningTimeInMin element"
 ms.assetid: 4973d9ac-20fd-4ac3-bc9f-5d60e39fdb7d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # TuningTimeInMin Element (DTA)
diff --git a/docs/tools/dta/tutorial-database-engine-tuning-advisor.md b/docs/tools/dta/tutorial-database-engine-tuning-advisor.md
index 6ab19714b09..ba80a1bae95 100644
--- a/docs/tools/dta/tutorial-database-engine-tuning-advisor.md
+++ b/docs/tools/dta/tutorial-database-engine-tuning-advisor.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "Database Engine Tuning Advisor [SQL Server], tutorials"
   - "tutorials [Database Engine Tuning Advisor]"
 ms.assetid: 3b54cbbe-d8c6-424d-92f1-aa58179f4da8
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Tutorial: Database Engine Tuning Advisor
diff --git a/docs/tools/dta/workload-element-dta.md b/docs/tools/dta/workload-element-dta.md
index 3159b997a7c..8c2747cc88f 100644
--- a/docs/tools/dta/workload-element-dta.md
+++ b/docs/tools/dta/workload-element-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "Workload element"
 ms.assetid: 68ffd473-6546-4015-98d0-3763165de65c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Workload Element (DTA)
diff --git a/docs/tools/dta/xml-input-file-reference-database-engine-tuning-advisor.md b/docs/tools/dta/xml-input-file-reference-database-engine-tuning-advisor.md
index daf6266e60a..e1e38d3b838 100644
--- a/docs/tools/dta/xml-input-file-reference-database-engine-tuning-advisor.md
+++ b/docs/tools/dta/xml-input-file-reference-database-engine-tuning-advisor.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "input file reference [Database Engine Tuning Advisor]"
   - "XML input files [Database Engine Tuning Advisor]"
 ms.assetid: 05e5e5f0-d6df-4336-b18e-e9bc2835a766
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # XML Input File Reference (Database Engine Tuning Advisor)
diff --git a/docs/tools/dta/xml-input-file-sample-with-inline-workload-dta.md b/docs/tools/dta/xml-input-file-sample-with-inline-workload-dta.md
index e176ba30d5f..a9302a98e59 100644
--- a/docs/tools/dta/xml-input-file-sample-with-inline-workload-dta.md
+++ b/docs/tools/dta/xml-input-file-sample-with-inline-workload-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "sample applications [DTA]"
 ms.assetid: 7c04fe1d-6669-44a1-8b73-36d469e9b002
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # XML Input File Sample with Inline Workload (DTA)
diff --git a/docs/tools/dta/xml-input-file-sample-with-user-specified-configuration-dta.md b/docs/tools/dta/xml-input-file-sample-with-user-specified-configuration-dta.md
index 3fcb5fbc89e..6f0ddf37865 100644
--- a/docs/tools/dta/xml-input-file-sample-with-user-specified-configuration-dta.md
+++ b/docs/tools/dta/xml-input-file-sample-with-user-specified-configuration-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "sample applications [DTA]"
 ms.assetid: b29c9716-e5c3-4003-9efb-3ade2197b630
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # XML Input File Sample with User-specified Configuration (DTA)
diff --git a/docs/tools/dta/xml-input-file-samples-dta.md b/docs/tools/dta/xml-input-file-samples-dta.md
index 8d2199483e2..08cd129113b 100644
--- a/docs/tools/dta/xml-input-file-samples-dta.md
+++ b/docs/tools/dta/xml-input-file-samples-dta.md
@@ -12,8 +12,8 @@ dev_langs:
 helpviewer_keywords: 
   - "sample applications [DTA]"
 ms.assetid: 1ed28805-a9ae-43ca-92da-101ba0c0c43a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # XML Input File Samples (DTA)
diff --git a/docs/tools/mssql-cli.md b/docs/tools/mssql-cli.md
index 242cc71a41f..e72d8dbf650 100644
--- a/docs/tools/mssql-cli.md
+++ b/docs/tools/mssql-cli.md
@@ -7,8 +7,8 @@ ms.prod: sql
 ms.reviewer: "alayu; sstein"
 ms.prod_service: sql-tools
 ms.topic: conceptual
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: "=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/osql-utility.md b/docs/tools/osql-utility.md
index 2fc3f99a49d..e9e2f862e6c 100644
--- a/docs/tools/osql-utility.md
+++ b/docs/tools/osql-utility.md
@@ -21,8 +21,8 @@ helpviewer_keywords:
   - "command prompt utilities [SQL Server], osql"
   - "CTRL+C command"
 ms.assetid: cf530d9e-0609-4528-8975-ab8e08e40b9a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/overview-sql-tools.md b/docs/tools/overview-sql-tools.md
index db169b95ac8..dc8249f355e 100644
--- a/docs/tools/overview-sql-tools.md
+++ b/docs/tools/overview-sql-tools.md
@@ -8,8 +8,8 @@ ms.reviewer: ""
 ms.technology: tools-other
 ms.topic: conceptual
 ms.assetid: 
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/profiler-utility.md b/docs/tools/profiler-utility.md
index dc35c31df7e..bb0bed38df6 100644
--- a/docs/tools/profiler-utility.md
+++ b/docs/tools/profiler-utility.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "SQL Server Profiler, starting"
   - "starting SQL Server Profiler"
 ms.assetid: e91c30a9-0d29-4f84-bcb8-e8fb62afadda
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Profiler Utility
diff --git a/docs/tools/sql-server-profiler/analyze-deadlocks-with-sql-server-profiler.md b/docs/tools/sql-server-profiler/analyze-deadlocks-with-sql-server-profiler.md
index a4dbbdfa2e5..21cced56d7c 100644
--- a/docs/tools/sql-server-profiler/analyze-deadlocks-with-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/analyze-deadlocks-with-sql-server-profiler.md
@@ -17,8 +17,8 @@ helpviewer_keywords:
   - "events [SQL Server], deadlocks"
   - "edges [SQL Server Profiler]"
 ms.assetid: 72d6718f-501b-4ea6-b344-c0e653f19561
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Analyze Deadlocks with SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/analyze-queries-with-showplan-results-in-sql-server-profiler.md b/docs/tools/sql-server-profiler/analyze-queries-with-showplan-results-in-sql-server-profiler.md
index c65519b3851..2aae857792d 100644
--- a/docs/tools/sql-server-profiler/analyze-queries-with-showplan-results-in-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/analyze-queries-with-showplan-results-in-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "Profiler [SQL Server Profiler], Showplan results"
   - "SQL Server Profiler, Showplan results"
 ms.assetid: 6a2f7727-141c-4f59-8613-2e452bc78467
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Analyze Queries with SHOWPLAN Results in SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/clear-a-trace-window-sql-server-profiler.md b/docs/tools/sql-server-profiler/clear-a-trace-window-sql-server-profiler.md
index 66eb5f8dc10..c1cec0f4530 100644
--- a/docs/tools/sql-server-profiler/clear-a-trace-window-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/clear-a-trace-window-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "trace window [SQL Server]"
   - "clearing trace window"
 ms.assetid: 8a9f0892-d812-4173-a498-abc36b230147
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Clear a Trace Window (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/close-a-trace-window-sql-server-profiler.md b/docs/tools/sql-server-profiler/close-a-trace-window-sql-server-profiler.md
index d63fc2843af..bcaf1b808d5 100644
--- a/docs/tools/sql-server-profiler/close-a-trace-window-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/close-a-trace-window-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "trace window [SQL Server]"
   - "closing trace window"
 ms.assetid: a0c1bd77-4d82-435d-be75-ed1cd1eaa11a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Close a Trace Window (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/considerations-for-replaying-traces-sql-server-profiler.md b/docs/tools/sql-server-profiler/considerations-for-replaying-traces-sql-server-profiler.md
index 5eaab5586ff..f1dd1c3bf86 100644
--- a/docs/tools/sql-server-profiler/considerations-for-replaying-traces-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/considerations-for-replaying-traces-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "traces [SQL Server], replaying"
   - "replaying traces"
 ms.assetid: 73fa339f-b71a-4be4-97ca-d4ae84c8b90b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Considerations for Replaying Traces (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/correlate-a-trace-with-windows-performance-log-data.md b/docs/tools/sql-server-profiler/correlate-a-trace-with-windows-performance-log-data.md
index 75d2a419cbd..c2bfa87ad97 100644
--- a/docs/tools/sql-server-profiler/correlate-a-trace-with-windows-performance-log-data.md
+++ b/docs/tools/sql-server-profiler/correlate-a-trace-with-windows-performance-log-data.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "traces [SQL Server], logs"
   - "SQL Server Profiler, correlating trace with log data"
 ms.assetid: 1e4412c8-d27c-4aae-9b35-214128d1d00a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Correlate a trace with Windows Performance Log data
diff --git a/docs/tools/sql-server-profiler/create-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/create-a-trace-sql-server-profiler.md
index c19bb1211b1..d6531bd4550 100644
--- a/docs/tools/sql-server-profiler/create-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/create-a-trace-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "traces [SQL Server], creating"
 ms.assetid: 0302fa6d-d2b5-43fe-ad70-7a337575b112
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Create a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/create-a-trace-template-sql-server-profiler.md b/docs/tools/sql-server-profiler/create-a-trace-template-sql-server-profiler.md
index fce32d34e6d..9cf91f3896d 100644
--- a/docs/tools/sql-server-profiler/create-a-trace-template-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/create-a-trace-template-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "trace templates [SQL Server]"
   - "saving trace template"
 ms.assetid: 025868b0-3790-4cda-8757-5a58327bfba0
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Create a Trace Template (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/create-a-transact-sql-script-for-running-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/create-a-transact-sql-script-for-running-a-trace-sql-server-profiler.md
index 22773d2fa42..b2858954307 100644
--- a/docs/tools/sql-server-profiler/create-a-transact-sql-script-for-running-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/create-a-transact-sql-script-for-running-a-trace-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "traces [SQL Server], running"
   - "scripts [SQL Server], traces"
 ms.assetid: 6b0e2519-998d-40d5-b8ba-5e6a773f91a6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Create a Transact-SQL Script for Running a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/derive-a-template-from-a-running-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/derive-a-template-from-a-running-trace-sql-server-profiler.md
index 713ee8df60d..a2ffec910e3 100644
--- a/docs/tools/sql-server-profiler/derive-a-template-from-a-running-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/derive-a-template-from-a-running-trace-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "templates [SQL Server], traces"
   - "trace templates [SQL Server]"
 ms.assetid: 25a3b845-affb-4b2a-a382-198a4bdd9ad1
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Derive a Template from a Running Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/derive-a-template-from-a-trace-file-or-trace-table-sql-server-profiler.md b/docs/tools/sql-server-profiler/derive-a-template-from-a-trace-file-or-trace-table-sql-server-profiler.md
index a6791ce8ba4..28866ea55fa 100644
--- a/docs/tools/sql-server-profiler/derive-a-template-from-a-trace-file-or-trace-table-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/derive-a-template-from-a-trace-file-or-trace-table-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "templates [SQL Server], traces"
   - "trace templates [SQL Server]"
 ms.assetid: 305817b7-4d23-49fb-9e6c-4d34359877bf
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Derive a Template from a Trace File or Trace Table (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/export-a-trace-template-sql-server-profiler.md b/docs/tools/sql-server-profiler/export-a-trace-template-sql-server-profiler.md
index 5803d3ef730..d6f1442ddba 100644
--- a/docs/tools/sql-server-profiler/export-a-trace-template-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/export-a-trace-template-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "trace templates [SQL Server]"
   - "exporting trace templates"
 ms.assetid: 5aa5f400-4aba-4081-9ed4-62cf38828438
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Export a Trace Template (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/extract-a-script-from-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/extract-a-script-from-a-trace-sql-server-profiler.md
index 5c2ae83fad5..7b581a1c5fc 100644
--- a/docs/tools/sql-server-profiler/extract-a-script-from-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/extract-a-script-from-a-trace-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "scripts [SQL Server], traces"
   - "extracting script from trace [SQL Server]"
 ms.assetid: 431126a6-ff91-4818-8763-4442152bd571
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Extract a Script from a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/filter-events-based-on-the-event-end-time-sql-server-profiler.md b/docs/tools/sql-server-profiler/filter-events-based-on-the-event-end-time-sql-server-profiler.md
index 358212fe9a0..7ac35eed38d 100644
--- a/docs/tools/sql-server-profiler/filter-events-based-on-the-event-end-time-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/filter-events-based-on-the-event-end-time-sql-server-profiler.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "traces [SQL Server], filters"
   - "traces [SQL Server], events"
 ms.assetid: 74628f9e-2d39-496a-a443-0a3887db223d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filter Events Based on the Event End Time (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/filter-events-based-on-the-event-start-time-sql-server-profiler.md b/docs/tools/sql-server-profiler/filter-events-based-on-the-event-start-time-sql-server-profiler.md
index a84540a0df7..89cfb0d8500 100644
--- a/docs/tools/sql-server-profiler/filter-events-based-on-the-event-start-time-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/filter-events-based-on-the-event-start-time-sql-server-profiler.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "traces [SQL Server], filters"
   - "traces [SQL Server], events"
 ms.assetid: e965579e-d006-41a3-89ec-cfd5398c67d2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filter Events Based on the Event Start Time (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/filter-events-in-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/filter-events-in-a-trace-sql-server-profiler.md
index 520d99ce92e..8781169f8b1 100644
--- a/docs/tools/sql-server-profiler/filter-events-in-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/filter-events-in-a-trace-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "traces [SQL Server], filters"
   - "traces [SQL Server], events"
 ms.assetid: 0fd63573-3b35-4f67-9e1e-ed9aabee11a8
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filter Events in a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/filter-server-process-ids-spids-in-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/filter-server-process-ids-spids-in-a-trace-sql-server-profiler.md
index 93516a81042..a39a76f2120 100644
--- a/docs/tools/sql-server-profiler/filter-server-process-ids-spids-in-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/filter-server-process-ids-spids-in-a-trace-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "filters [SQL Server], SPIDs"
   - "traces [SQL Server], filters"
 ms.assetid: f5945c39-be6b-4632-91cb-92066c80e188
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filter Server Process IDs (SPIDs) in a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/filter-traces-with-sql-server-profiler.md b/docs/tools/sql-server-profiler/filter-traces-with-sql-server-profiler.md
index 30f59040fdf..fbad66c9210 100644
--- a/docs/tools/sql-server-profiler/filter-traces-with-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/filter-traces-with-sql-server-profiler.md
@@ -15,8 +15,8 @@ helpviewer_keywords:
   - "filters [SQL Server], traces"
   - "traces [SQL Server], filters"
 ms.assetid: 34577136-a0ed-4822-94de-4a0d5f98265f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Filter Traces with SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/find-a-value-or-data-column-while-tracing-sql-server-profiler.md b/docs/tools/sql-server-profiler/find-a-value-or-data-column-while-tracing-sql-server-profiler.md
index 3c60110f430..168c9b2fb62 100644
--- a/docs/tools/sql-server-profiler/find-a-value-or-data-column-while-tracing-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/find-a-value-or-data-column-while-tracing-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "traces [SQL Server], running"
   - "traces [SQL Server], searching while trace running"
 ms.assetid: fa5212af-1f49-4227-9d80-58003062146f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Find a Value or Data Column While Tracing (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/import-a-trace-template-sql-server-profiler.md b/docs/tools/sql-server-profiler/import-a-trace-template-sql-server-profiler.md
index 9e67f5b6741..2a8f96d71d9 100644
--- a/docs/tools/sql-server-profiler/import-a-trace-template-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/import-a-trace-template-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "trace templates [SQL Server]"
   - "importing trace templates"
 ms.assetid: 1dd5391e-dcd5-4ac2-b8dd-0e40922758a8
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Import a Trace Template (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/modify-a-filter-sql-server-profiler.md b/docs/tools/sql-server-profiler/modify-a-filter-sql-server-profiler.md
index 91073ff1919..5377dae0287 100644
--- a/docs/tools/sql-server-profiler/modify-a-filter-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/modify-a-filter-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "modifying filters, modifying"
   - "filters [SQL Server], traces"
 ms.assetid: 8b317813-4918-4485-b930-77b1951aa00c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Modify a Filter (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/modify-trace-templates.md b/docs/tools/sql-server-profiler/modify-trace-templates.md
index 06bb5cec56b..30ef4a4defb 100644
--- a/docs/tools/sql-server-profiler/modify-trace-templates.md
+++ b/docs/tools/sql-server-profiler/modify-trace-templates.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "modifying trace templates"
   - "SQL Server Profiler, templates"
 ms.assetid: 75b62a54-8d16-4599-bd2d-c42cfcc209f4
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Modify trace templates
diff --git a/docs/tools/sql-server-profiler/open-a-trace-file-sql-server-profiler.md b/docs/tools/sql-server-profiler/open-a-trace-file-sql-server-profiler.md
index 31af35370db..ed248ac49ef 100644
--- a/docs/tools/sql-server-profiler/open-a-trace-file-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/open-a-trace-file-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "opening trace files"
 ms.assetid: f9ec6032-c961-4b00-ba38-208454fd2bdb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Open a Trace File (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/open-a-trace-table-sql-server-profiler.md b/docs/tools/sql-server-profiler/open-a-trace-table-sql-server-profiler.md
index 33cf8a6ad53..e66e60c4b30 100644
--- a/docs/tools/sql-server-profiler/open-a-trace-table-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/open-a-trace-table-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "opening trace tables"
 ms.assetid: 8f7cc6b9-c717-4995-9af9-cacc6501aee2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Open a Trace Table (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/organize-columns-displayed-in-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/organize-columns-displayed-in-a-trace-sql-server-profiler.md
index fc0046c2cba..e84f62665c5 100644
--- a/docs/tools/sql-server-profiler/organize-columns-displayed-in-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/organize-columns-displayed-in-a-trace-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "arranging trace columns displayed"
   - "traces [SQL Server], data columns"
 ms.assetid: 6b923f94-0eb1-467e-82f6-ceed43f77017
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Organize Columns Displayed in a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/pause-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/pause-a-trace-sql-server-profiler.md
index 5e728a2356b..bca47c8efb0 100644
--- a/docs/tools/sql-server-profiler/pause-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/pause-a-trace-sql-server-profiler.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "traces [SQL Server], pausing"
   - "stopping traces"
 ms.assetid: 432b9b0c-b5e7-47f3-a71b-310fb3bf2445
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Pause a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/permissions-required-to-run-sql-server-profiler.md b/docs/tools/sql-server-profiler/permissions-required-to-run-sql-server-profiler.md
index 3d9c664a2be..51a767e7098 100644
--- a/docs/tools/sql-server-profiler/permissions-required-to-run-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/permissions-required-to-run-sql-server-profiler.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "SQL Server Profiler, permissions"
   - "security [SQL Server], SQL Server Profiler"
 ms.assetid: 5c580a87-88ae-4314-8fe1-54ade83f227f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Permissions Required to Run SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/replay-a-single-event-at-a-time-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-a-single-event-at-a-time-sql-server-profiler.md
index 340f6b6641e..1358985aecb 100644
--- a/docs/tools/sql-server-profiler/replay-a-single-event-at-a-time-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-a-single-event-at-a-time-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "traces [SQL Server], replaying"
   - "replaying traces"
 ms.assetid: 220fb192-9636-41a2-b15c-62af6cab8fff
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay a Single Event at a Time (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-a-trace-file-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-a-trace-file-sql-server-profiler.md
index d07673eff3e..b01e50d15f9 100644
--- a/docs/tools/sql-server-profiler/replay-a-trace-file-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-a-trace-file-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "traces [SQL Server], replaying"
   - "replaying traces"
 ms.assetid: 9e361275-c8fd-4499-8389-242cf8e27415
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay a Trace File (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-a-trace-table-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-a-trace-table-sql-server-profiler.md
index 1ec5b2f79b2..8886f17d978 100644
--- a/docs/tools/sql-server-profiler/replay-a-trace-table-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-a-trace-table-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "traces [SQL Server], replaying"
   - "replaying traces"
 ms.assetid: 6a0ad817-3d8d-4495-889d-c66a7ef9e8bb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay a Trace Table (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-a-transact-sql-script-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-a-transact-sql-script-sql-server-profiler.md
index cdcd5d9f470..0e63ca35f5a 100644
--- a/docs/tools/sql-server-profiler/replay-a-transact-sql-script-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-a-transact-sql-script-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "scripts [SQL Server], traces"
   - "replaying traces"
 ms.assetid: 9c0eb222-e6e3-4bc1-a25f-a41e962d361b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay a Transact-SQL Script (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-options-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-options-sql-server-profiler.md
index 60e44d2b1f4..5bc7310812b 100644
--- a/docs/tools/sql-server-profiler/replay-options-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-options-sql-server-profiler.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "health monitor [SQL Server]"
   - "Replay Configuration dialog box"
 ms.assetid: 58761a25-a84f-4a90-9c61-97700bc5ad9c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay Options (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-requirements.md b/docs/tools/sql-server-profiler/replay-requirements.md
index 5b8a1cfd34a..87b8684292f 100644
--- a/docs/tools/sql-server-profiler/replay-requirements.md
+++ b/docs/tools/sql-server-profiler/replay-requirements.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "replaying traces"
   - "TSQL_Replay template [SQL Server]"
 ms.assetid: 0e01dfc7-84b9-47f6-8bf7-b0656df4fa7d
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay Requirements
diff --git a/docs/tools/sql-server-profiler/replay-to-a-breakpoint-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-to-a-breakpoint-sql-server-profiler.md
index 90fcbdce0b1..ed7203c7fe4 100644
--- a/docs/tools/sql-server-profiler/replay-to-a-breakpoint-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-to-a-breakpoint-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "breakpoints [SQL Server]"
   - "traces [SQL Server], replaying"
 ms.assetid: 3caf751e-df3b-40c7-b5e8-4490ae178e0c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay to a Breakpoint (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-to-a-cursor-sql-server-profiler.md b/docs/tools/sql-server-profiler/replay-to-a-cursor-sql-server-profiler.md
index a91e854c5a7..f16d0893fd5 100644
--- a/docs/tools/sql-server-profiler/replay-to-a-cursor-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/replay-to-a-cursor-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "traces [SQL Server], replaying"
   - "replaying traces"
 ms.assetid: 89eadc41-4424-4a1c-ba61-0b52c851cdb1
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay to a Cursor (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/replay-traces.md b/docs/tools/sql-server-profiler/replay-traces.md
index 07e2c24b4d4..65430db6e21 100644
--- a/docs/tools/sql-server-profiler/replay-traces.md
+++ b/docs/tools/sql-server-profiler/replay-traces.md
@@ -17,8 +17,8 @@ helpviewer_keywords:
   - "events [SQL Server], replaying traces"
   - "Profiler [SQL Server Profiler], replaying traces"
 ms.assetid: da958d3c-7f3e-44c9-aecc-8a9493bea7c0
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Replay Traces
diff --git a/docs/tools/sql-server-profiler/run-a-trace-after-it-has-been-paused-or-stopped-sql-server-profiler.md b/docs/tools/sql-server-profiler/run-a-trace-after-it-has-been-paused-or-stopped-sql-server-profiler.md
index ccddd2c2ea7..ec35f316c2d 100644
--- a/docs/tools/sql-server-profiler/run-a-trace-after-it-has-been-paused-or-stopped-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/run-a-trace-after-it-has-been-paused-or-stopped-sql-server-profiler.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "restarting traces"
   - "stopping traces"
 ms.assetid: 022dd1b7-08be-4a42-9b3a-c3bd09703e27
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Run a Trace After It Has Been Paused or Stopped (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/save-trace-results-to-a-file-sql-server-profiler.md b/docs/tools/sql-server-profiler/save-trace-results-to-a-file-sql-server-profiler.md
index 2d44a60fe37..8ccf6b8e27d 100644
--- a/docs/tools/sql-server-profiler/save-trace-results-to-a-file-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/save-trace-results-to-a-file-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "saving traces"
   - "traces [SQL Server], saving"
 ms.assetid: ac528747-0c19-4f3d-96f5-44c762a4abed
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Save Trace Results to a File (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md b/docs/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md
index 7fd527d77a8..f39d831dc06 100644
--- a/docs/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "saving traces"
   - "traces [SQL Server], saving"
 ms.assetid: edbecf74-683b-4e43-a1ef-7a3d5f5e27f6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Save Trace Results to a Table (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/save-traces-and-trace-templates.md b/docs/tools/sql-server-profiler/save-traces-and-trace-templates.md
index 116f19849e2..4cccc9d5302 100644
--- a/docs/tools/sql-server-profiler/save-traces-and-trace-templates.md
+++ b/docs/tools/sql-server-profiler/save-traces-and-trace-templates.md
@@ -17,8 +17,8 @@ helpviewer_keywords:
   - "importing trace templates"
   - "SQL Server Profiler, templates"
 ms.assetid: 957e6bf8-e7a3-4a59-a1cd-0a41538a8158
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Save Traces and Trace Templates
diff --git a/docs/tools/sql-server-profiler/set-a-maximum-file-size-for-a-trace-file-sql-server-profiler.md b/docs/tools/sql-server-profiler/set-a-maximum-file-size-for-a-trace-file-sql-server-profiler.md
index 8193395a115..1586aa9b13b 100644
--- a/docs/tools/sql-server-profiler/set-a-maximum-file-size-for-a-trace-file-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/set-a-maximum-file-size-for-a-trace-file-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "maximum file size for traces"
   - "size [SQL Server], trace files"
 ms.assetid: e86dc4ce-5aa3-4c0d-acb5-c9e8871ed963
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Set a Maximum File Size for a Trace File (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/set-a-maximum-table-size-for-a-trace-table-sql-server-profiler.md b/docs/tools/sql-server-profiler/set-a-maximum-table-size-for-a-trace-table-sql-server-profiler.md
index 79298345b53..d27ce5603ef 100644
--- a/docs/tools/sql-server-profiler/set-a-maximum-table-size-for-a-trace-table-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/set-a-maximum-table-size-for-a-trace-table-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "size [SQL Server], trace tables"
   - "maximum table size for traces"
 ms.assetid: d0ae83e5-1c88-4a2e-be05-2c341280b978
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Set a Maximum Table Size for a Trace Table (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/set-global-trace-options-sql-server-profiler.md b/docs/tools/sql-server-profiler/set-global-trace-options-sql-server-profiler.md
index dfd7588052a..06f0152a744 100644
--- a/docs/tools/sql-server-profiler/set-global-trace-options-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/set-global-trace-options-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "global trace options [SQL Server]"
 ms.assetid: 2854608a-c3c7-4eb8-b567-034bfec4b1a9
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Set Global Trace Options (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/set-trace-definition-defaults-sql-server-profiler.md b/docs/tools/sql-server-profiler/set-trace-definition-defaults-sql-server-profiler.md
index 96a5a5626d3..4c9ff42a3ca 100644
--- a/docs/tools/sql-server-profiler/set-trace-definition-defaults-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/set-trace-definition-defaults-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "traces [SQL Server], defaults"
 ms.assetid: ab9fc570-797d-411e-814f-1c46d2d5feae
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Set Trace Definition Defaults (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/set-trace-display-defaults-sql-server-profiler.md b/docs/tools/sql-server-profiler/set-trace-display-defaults-sql-server-profiler.md
index 645fdead774..87aba7e3e8a 100644
--- a/docs/tools/sql-server-profiler/set-trace-display-defaults-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/set-trace-display-defaults-sql-server-profiler.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "traces [SQL Server], defaults"
 ms.assetid: d471aaed-c40c-4c55-a993-835e6394b5d2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Set Trace Display Defaults (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/specify-events-and-data-columns-for-a-trace-file-sql-server-profiler.md b/docs/tools/sql-server-profiler/specify-events-and-data-columns-for-a-trace-file-sql-server-profiler.md
index 516d16ad5d8..c664abe6e18 100644
--- a/docs/tools/sql-server-profiler/specify-events-and-data-columns-for-a-trace-file-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/specify-events-and-data-columns-for-a-trace-file-sql-server-profiler.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "removing events"
   - "traces [SQL Server], events"
 ms.assetid: 7da715a3-2f03-4063-b6a4-20fd7b44e675
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Specify Events and Data Columns for a Trace File (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/sql-server-profiler-f1-help.md b/docs/tools/sql-server-profiler/sql-server-profiler-f1-help.md
index 0a55926ba1f..5bd2c625197 100644
--- a/docs/tools/sql-server-profiler/sql-server-profiler-f1-help.md
+++ b/docs/tools/sql-server-profiler/sql-server-profiler-f1-help.md
@@ -39,8 +39,8 @@ helpviewer_keywords:
   - "Replay Configuration dialog box"
   - "Find dialog box"
 ms.assetid: e57b9160-4b78-4353-abb2-bfdbdf523d7a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQL Server Profiler dialog boxes
diff --git a/docs/tools/sql-server-profiler/sql-server-profiler-templates-and-permissions.md b/docs/tools/sql-server-profiler/sql-server-profiler-templates-and-permissions.md
index 7c8f5405580..cee55b40af1 100644
--- a/docs/tools/sql-server-profiler/sql-server-profiler-templates-and-permissions.md
+++ b/docs/tools/sql-server-profiler/sql-server-profiler-templates-and-permissions.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "Profiler [SQL Server Profiler], about SQL Server Profiler"
   - "SQL Server Profiler, about SQL Server Profiler"
 ms.assetid: 6d00378a-5d74-463b-9ed6-a2685306a9d2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQL Server Profiler Templates and Permissions
diff --git a/docs/tools/sql-server-profiler/sql-server-profiler-templates.md b/docs/tools/sql-server-profiler/sql-server-profiler-templates.md
index 76310eba947..6886ae20ab3 100644
--- a/docs/tools/sql-server-profiler/sql-server-profiler-templates.md
+++ b/docs/tools/sql-server-profiler/sql-server-profiler-templates.md
@@ -15,8 +15,8 @@ helpviewer_keywords:
   - "predefined templates [SQL Server Profiler]"
   - "SQL Server Profiler, templates"
 ms.assetid: b674e491-dc58-47a1-acdd-7028e9a201fc
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQL Server Profiler Templates
diff --git a/docs/tools/sql-server-profiler/sql-server-profiler.md b/docs/tools/sql-server-profiler/sql-server-profiler.md
index 41e03358176..0fbcf81b35a 100644
--- a/docs/tools/sql-server-profiler/sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/sql-server-profiler.md
@@ -23,8 +23,8 @@ helpviewer_keywords:
   - "database performance [SQL Server], SQL Server Profiler"
   - "trace [SQL Server]"
 ms.assetid: 3ad5f33d-559e-41a4-bde6-bb98792f7f1a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/start-a-trace-automatically-after-connecting-to-a-server-sql-server-profiler.md b/docs/tools/sql-server-profiler/start-a-trace-automatically-after-connecting-to-a-server-sql-server-profiler.md
index b34ae8c6d40..033d861cc9a 100644
--- a/docs/tools/sql-server-profiler/start-a-trace-automatically-after-connecting-to-a-server-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/start-a-trace-automatically-after-connecting-to-a-server-sql-server-profiler.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "traces [SQL Server], starting"
   - "starting trace automatically"
 ms.assetid: d74b848d-e796-49af-a8c5-dd69230f3a78
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Start a Trace Automatically after Connecting to a Server (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/start-a-trace.md b/docs/tools/sql-server-profiler/start-a-trace.md
index f44b6260684..683999b62f3 100644
--- a/docs/tools/sql-server-profiler/start-a-trace.md
+++ b/docs/tools/sql-server-profiler/start-a-trace.md
@@ -21,8 +21,8 @@ helpviewer_keywords:
   - "stopping traces"
   - "starting traces"
 ms.assetid: aeeb38eb-229a-4c8b-ad66-57e9ce45fb6a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Start a Trace
diff --git a/docs/tools/sql-server-profiler/start-sql-server-profiler.md b/docs/tools/sql-server-profiler/start-sql-server-profiler.md
index 704cd38f461..8b1dd9f5e21 100644
--- a/docs/tools/sql-server-profiler/start-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/start-sql-server-profiler.md
@@ -15,8 +15,8 @@ helpviewer_keywords:
   - "SQL Server Profiler, running"
   - "running SQL Server Profiler"
 ms.assetid: 22e57ffa-63b0-4de3-b92e-df297dda1226
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Run SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/stop-a-trace-sql-server-profiler.md b/docs/tools/sql-server-profiler/stop-a-trace-sql-server-profiler.md
index 68fe75b445a..4a462ee49ef 100644
--- a/docs/tools/sql-server-profiler/stop-a-trace-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/stop-a-trace-sql-server-profiler.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "traces [SQL Server], stopping"
   - "stopping traces"
 ms.assetid: 47c4f33d-63e0-4444-bec8-4c1c91f8e25c
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Stop a Trace (SQL Server Profiler)
diff --git a/docs/tools/sql-server-profiler/view-and-analyze-traces-with-sql-server-profiler.md b/docs/tools/sql-server-profiler/view-and-analyze-traces-with-sql-server-profiler.md
index 9e0d16db0da..aaa5b05cfef 100644
--- a/docs/tools/sql-server-profiler/view-and-analyze-traces-with-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/view-and-analyze-traces-with-sql-server-profiler.md
@@ -17,8 +17,8 @@ helpviewer_keywords:
   - "Profiler [SQL Server Profiler], troubleshooting"
   - "traces [SQL Server], events"
 ms.assetid: 17e821ca-a12e-4192-acc1-96765d9ae266
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # View and Analyze Traces with SQL Server Profiler
diff --git a/docs/tools/sql-server-profiler/view-filter-information-sql-server-profiler.md b/docs/tools/sql-server-profiler/view-filter-information-sql-server-profiler.md
index e390fe423c5..0b09a4eedfc 100644
--- a/docs/tools/sql-server-profiler/view-filter-information-sql-server-profiler.md
+++ b/docs/tools/sql-server-profiler/view-filter-information-sql-server-profiler.md
@@ -14,8 +14,8 @@ helpviewer_keywords:
   - "traces [SQL Server], filters"
   - "viewing filter information"
 ms.assetid: 8d002dea-376a-452c-b3ca-3e93656ed75f
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # View Filter Information (SQL Server Profiler)
diff --git a/docs/tools/sqlagent90-application.md b/docs/tools/sqlagent90-application.md
index c20007e59b9..938d7d8e1ad 100644
--- a/docs/tools/sqlagent90-application.md
+++ b/docs/tools/sqlagent90-application.md
@@ -13,8 +13,8 @@ helpviewer_keywords:
   - "SQL Server Agent, starting"
   - "command prompt utilities [SQL Server], sqlagent90"
 ms.assetid: e8b80e8d-d0c9-4500-a868-0ce08233da08
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # sqlagent90 Application
diff --git a/docs/tools/sqlcmd-utility.md b/docs/tools/sqlcmd-utility.md
index cfb3edb7094..f8c1753866d 100644
--- a/docs/tools/sqlcmd-utility.md
+++ b/docs/tools/sqlcmd-utility.md
@@ -24,8 +24,8 @@ helpviewer_keywords:
   - "RESET command"
   - "GO command"
 ms.assetid: e1728707-5215-4c04-8320-e36f161b834a
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/sqldiag-utility.md b/docs/tools/sqldiag-utility.md
index 9e37f1f2d69..feb92d516cf 100644
--- a/docs/tools/sqldiag-utility.md
+++ b/docs/tools/sqldiag-utility.md
@@ -27,8 +27,8 @@ helpviewer_keywords:
   - "automatic diagnostic collection"
   - "clusters [SQL Server], diagnostic collection"
 ms.assetid: 45ba1307-33d1-431e-872c-a6e4556f5ff2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SQLdiag Utility
diff --git a/docs/tools/sqllocaldb-utility.md b/docs/tools/sqllocaldb-utility.md
index 85ab5e1da7e..ff10832b5ea 100644
--- a/docs/tools/sqllocaldb-utility.md
+++ b/docs/tools/sqllocaldb-utility.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "local database runtime utility"
   - "LocalDB, SqlLocalDB Utility"
 ms.assetid: d785cdb7-1ea0-4871-bde9-1ae7881190f5
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # SqlLocalDB Utility
diff --git a/docs/tools/sqllogship-application.md b/docs/tools/sqllogship-application.md
index 506829586b6..a77f92d8cc9 100644
--- a/docs/tools/sqllogship-application.md
+++ b/docs/tools/sqllogship-application.md
@@ -10,8 +10,8 @@ ms.topic: conceptual
 helpviewer_keywords: 
   - "sqllogship"
 ms.assetid: 8ae70041-f3d9-46e4-8fa8-31088572a9f8
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # sqllogship Application
diff --git a/docs/tools/sqlmaint-utility.md b/docs/tools/sqlmaint-utility.md
index cb61eac5773..920ca6776a8 100644
--- a/docs/tools/sqlmaint-utility.md
+++ b/docs/tools/sqlmaint-utility.md
@@ -16,8 +16,8 @@ helpviewer_keywords:
   - "maintenance plans [SQL Server], command prompt"
   - "backing up [SQL Server], sqlmaint utility"
 ms.assetid: 937a9932-4aed-464b-b97a-a5acfe6a50de
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # sqlmaint Utility
diff --git a/docs/tools/sqlps-utility.md b/docs/tools/sqlps-utility.md
index fe20f10298d..f0828a2b8ce 100644
--- a/docs/tools/sqlps-utility.md
+++ b/docs/tools/sqlps-utility.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "sqlps utility"
   - "PowerShell [SQL Server], sqlps utility"
 ms.assetid: 4b2515a6-12c3-44fb-b263-1c567681cd2b
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---
diff --git a/docs/tools/sqlservr-application.md b/docs/tools/sqlservr-application.md
index fa17ac44169..4855d0c4989 100644
--- a/docs/tools/sqlservr-application.md
+++ b/docs/tools/sqlservr-application.md
@@ -20,8 +20,8 @@ helpviewer_keywords:
   - "command prompt [SQL Server], starting instance of SQL Server"
   - "continuing instance of SQL Server"
 ms.assetid: 60e8ef0a-0851-41cf-a6d8-cca1e04cbcdb
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # sqlservr Application
diff --git a/docs/tools/ssbdiagnose/banner-element-ssbdiagnose.md b/docs/tools/ssbdiagnose/banner-element-ssbdiagnose.md
index df439b42325..6ce44aecc55 100644
--- a/docs/tools/ssbdiagnose/banner-element-ssbdiagnose.md
+++ b/docs/tools/ssbdiagnose/banner-element-ssbdiagnose.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "XML output file format [ssbdiagnose], banner element"
   - "ssbdiagnose"
 ms.assetid: cc6cd49a-acf0-4cfb-8c6a-554692b89de2
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Banner Element (ssbdiagnose)
diff --git a/docs/tools/ssbdiagnose/diagnosticinformation-element-ssbdiagnose.md b/docs/tools/ssbdiagnose/diagnosticinformation-element-ssbdiagnose.md
index 98914403f28..34f5e373534 100644
--- a/docs/tools/ssbdiagnose/diagnosticinformation-element-ssbdiagnose.md
+++ b/docs/tools/ssbdiagnose/diagnosticinformation-element-ssbdiagnose.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "diagnosticinformation element"
   - "ssbdiagnose"
 ms.assetid: 0cfda544-542c-4cf4-86d2-8031c91b10f6
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # DiagnosticInformation Element (ssbdiagnose)
diff --git a/docs/tools/ssbdiagnose/issue-element-ssbdiagnose.md b/docs/tools/ssbdiagnose/issue-element-ssbdiagnose.md
index 11a654b81dd..ac5b4239227 100644
--- a/docs/tools/ssbdiagnose/issue-element-ssbdiagnose.md
+++ b/docs/tools/ssbdiagnose/issue-element-ssbdiagnose.md
@@ -12,8 +12,8 @@ helpviewer_keywords:
   - "XML output file format [ssbdiagnose], issue element"
   - "ssbdiagnose"
 ms.assetid: 2246a886-686b-44ca-9771-b155cedad8be
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # Issue Element (ssbdiagnose)
diff --git a/docs/tools/ssbdiagnose/ssbdiagnose-utility-service-broker.md b/docs/tools/ssbdiagnose/ssbdiagnose-utility-service-broker.md
index 5113305001e..5f2e6917318 100644
--- a/docs/tools/ssbdiagnose/ssbdiagnose-utility-service-broker.md
+++ b/docs/tools/ssbdiagnose/ssbdiagnose-utility-service-broker.md
@@ -23,8 +23,8 @@ helpviewer_keywords:
   - "Service Broker, ssbdiagnose utility"
   - "ssbdiagnose"
 ms.assetid: 0c1636e8-a3db-438e-be4c-1ea40d1f4877
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # ssbdiagnose Utility (Service Broker)
diff --git a/docs/tools/ssbdiagnose/xml-output-file-format-ssbdiagnose.md b/docs/tools/ssbdiagnose/xml-output-file-format-ssbdiagnose.md
index 04149c90bf2..5efc58391d0 100644
--- a/docs/tools/ssbdiagnose/xml-output-file-format-ssbdiagnose.md
+++ b/docs/tools/ssbdiagnose/xml-output-file-format-ssbdiagnose.md
@@ -11,8 +11,8 @@ helpviewer_keywords:
   - "XML output file format [ssbdiagnose]"
   - "ssbdiagnose"
 ms.assetid: 3ceb991b-6f15-4504-8828-de5adf448bc5
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 ---
 # XML Output File Format (ssbdiagnose)
diff --git a/docs/tools/tablediff-utility.md b/docs/tools/tablediff-utility.md
index 96d403f90cb..c9c44c63d23 100644
--- a/docs/tools/tablediff-utility.md
+++ b/docs/tools/tablediff-utility.md
@@ -16,8 +16,8 @@ helpviewer_keywords:
   - "troubleshooting [SQL Server replication], non-convergence"
   - "non-convergence [SQL Server]"
 ms.assetid: 3c3cb865-7a4d-4d66-98f2-5935e28929fc
-author: "stevestein"
-ms.author: "sstein"
+author: markingmyname
+ms.author: maghan
 manager: craigg
 monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||=sqlallproducts-allversions||>=sql-server-linux-2017"
 ---

From ec47cf26c3bf02b66f52661c66d52b3f8c18621e Mon Sep 17 00:00:00 2001
From: CarlRabeler 
Date: Tue, 9 Jul 2019 15:37:02 -0700
Subject: [PATCH 35/46] typo

---
 .../tables/rename-columns-database-engine.md                    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/relational-databases/tables/rename-columns-database-engine.md b/docs/relational-databases/tables/rename-columns-database-engine.md
index 943ccb02301..fb333fca16e 100644
--- a/docs/relational-databases/tables/rename-columns-database-engine.md
+++ b/docs/relational-databases/tables/rename-columns-database-engine.md
@@ -61,7 +61,7 @@ Requires ALTER permission on the object.
 
 1. In **Object Explorer**, right-click the table to which you want to rename columns and choose **Design**.
 2. Under **Column Name**, select the name you want to change and type a new one.
-3. On the **File** menu, click **Save**_table name_.
+3. On the **File** menu, click **Save** _table name_.
 
 > [!NOTE]
 > You can also change the name of a column in the **Column Properties** tab. Select the column whose name you want to change and type a new value for **Name**.

From 2f76cd3c7f5a726f0429a391f20b4392f1872dae Mon Sep 17 00:00:00 2001
From: CarlRabeler 
Date: Tue, 9 Jul 2019 15:37:44 -0700
Subject: [PATCH 36/46] more

---
 .../tables/specify-computed-columns-in-a-table.md               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md
index e9822402f4c..17a6af0d0e3 100644
--- a/docs/relational-databases/tables/specify-computed-columns-in-a-table.md
+++ b/docs/relational-databases/tables/specify-computed-columns-in-a-table.md
@@ -62,7 +62,7 @@ Requires ALTER permission on the table.
 
 5. Indicate whether the data is persisted by choosing **Yes** or **No** from the drop-down for the **Is Persisted** child property.
 
-6. On the **File** menu, click **Save**_table name_.
+6. On the **File** menu, click **Save** _table name_.
 
 #### To add a computed column definition to an existing column
 

From 898e3b233becf255c0a87e35c589a976ca4ab92b Mon Sep 17 00:00:00 2001
From: Mick Alberts 
Date: Tue, 9 Jul 2019 15:51:59 -0700
Subject: [PATCH 37/46] Update release-notes-ssrs-application-integration.md

---
 .../release-notes-ssrs-application-integration.md               | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md b/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md
index b803dd0f62c..754d8ff29b5 100644
--- a/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md
+++ b/docs/reporting-services/application-integration/release-notes-ssrs-application-integration.md
@@ -29,7 +29,7 @@ For the release notes for SSRS, see [Release notes for SQL Server Reporting Serv
 | :----------------- | :------ |
 | Bug fixes  | Proper print preview for High DPI monitor |
 |            | Print dialog would show outside of visible space |
-|            | Large number of parameters resulted in parameter scroll bars and drop downlists not working correctly |
+|            | Large number of parameters resulted in parameter scroll bars and drop-down lists not working correctly |
 |            | Fixed issue with Null and date time parameters |
 |            | Updated JQuery to version 3.3.1 |
 |            | Fixed overlapping with tablix cells in HTML rendering |

From 246cb87463969080a17de0484646229bdab0b254 Mon Sep 17 00:00:00 2001
From: Andreas Wolter <47007612+AndreasWolter@users.noreply.github.com>
Date: Tue, 9 Jul 2019 23:53:28 +0100
Subject: [PATCH 38/46] Corrected encrypted to signed + some additional
 description

---
 .../system-catalog-views/sys-crypt-properties-transact-sql.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/relational-databases/system-catalog-views/sys-crypt-properties-transact-sql.md b/docs/relational-databases/system-catalog-views/sys-crypt-properties-transact-sql.md
index bd5e6f96649..fa19d33ceb8 100644
--- a/docs/relational-databases/system-catalog-views/sys-crypt-properties-transact-sql.md
+++ b/docs/relational-databases/system-catalog-views/sys-crypt-properties-transact-sql.md
@@ -33,9 +33,9 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
 |**class_desc**|**nvarchar(60)**|Description of the class of thing on which property exists.

OBJECT_OR_COLUMN
ASSEMBLY| |**major_id**|**int**|ID of thing on which property exists, interpreted according to class| |**thumbprint**|**varbinary(32)**|SHA-1 hash of the certificate or asymmetric key used.| -|**crypt_type**|**char(4)**|Encryption type.

SPVC = Encrypted by certificate private key

SPVA = Encrypted by asymmetric private key

CPVC = Counter signature by certificate private key

CPVA = Counter signature by asymmetric key| +|**crypt_type**|**char(4)**|Encryption type.

SPVC = Signed by certificate private key

SPVA = Signed by asymmetric private key

CPVC = Counter signature by certificate private key

CPVA = Counter signature by asymmetric key| |**crypt_type_desc**|**nvarchar(60)**|Description of encryption type.

SIGNATURE BY CERTIFICATE

SIGNATURE BY ASYMMETRIC KEY

COUNTER SIGNATURE BY CERTIFICATE

COUNTER SIGNATURE BY ASYMMETRIC KEY| -|**crypt_property**|**varbinary(max)**|Signed or encrypted bits.| +|**crypt_property**|**varbinary(max)**|Signed or encrypted bits. For a signed module these are the signature bits of the module.| ## Permissions [!INCLUDE[ssCatViewPerm](../../includes/sscatviewperm-md.md)] For more information, see [Metadata Visibility Configuration](../../relational-databases/security/metadata-visibility-configuration.md). From a6497ade92cf6cda7b851af68a43f6048b61ed99 Mon Sep 17 00:00:00 2001 From: stevestein Date: Tue, 9 Jul 2019 19:29:03 -0700 Subject: [PATCH 39/46] Add customer provided example --- .../collations/view-collation-information.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/relational-databases/collations/view-collation-information.md b/docs/relational-databases/collations/view-collation-information.md index 3903ecec7fb..fd84d4e3fbc 100644 --- a/docs/relational-databases/collations/view-collation-information.md +++ b/docs/relational-databases/collations/view-collation-information.md @@ -102,6 +102,20 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio SELECT name, collation_name FROM sys.columns WHERE name = N''; ``` + **To view the collation settings for tables and columns** + +1. In Object Explorer, connect to an instance of the [!INCLUDE[ssDE](../../includes/ssde-md.md)] and on the toolbar, click **New Query**. + +2. In the query window, enter the following statement that uses the sys.columns system catalog view. + + ```sql + SELECT t.name TableName, c.name ColumnName, collation_name + FROM sys.columns c + inner join sys.tables t on c.object_id = t.object_id; + ``` + + + ## See Also [SERVERPROPERTY (Transact-SQL)](../../t-sql/functions/serverproperty-transact-sql.md) [sys.fn_helpcollations (Transact-SQL)](../../relational-databases/system-functions/sys-fn-helpcollations-transact-sql.md) From e313f14638536cb3f7815f1881a754b71c702c23 Mon Sep 17 00:00:00 2001 From: Hao Qian Date: Wed, 10 Jul 2019 10:31:55 +0800 Subject: [PATCH 40/46] Update walkthrough-set-up-integration-services-scale-out.md --- .../walkthrough-set-up-integration-services-scale-out.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integration-services/scale-out/walkthrough-set-up-integration-services-scale-out.md b/docs/integration-services/scale-out/walkthrough-set-up-integration-services-scale-out.md index 3770f12451b..4fdcae0e070 100644 --- a/docs/integration-services/scale-out/walkthrough-set-up-integration-services-scale-out.md +++ b/docs/integration-services/scale-out/walkthrough-set-up-integration-services-scale-out.md @@ -8,7 +8,7 @@ ms.prod_service: "integration-services" ms.reviewer: "" ms.technology: integration-services ms.topic: conceptual -author: "haoqian" +author: "HaoQian-MS" ms.author: "haoqian" ms.reviewer: maghan manager: craigg From d05d91e28b7ea14823e68f8298a6ce8eb5f2f346 Mon Sep 17 00:00:00 2001 From: Owen Duncan Date: Wed, 10 Jul 2019 09:01:00 -0700 Subject: [PATCH 41/46] Update analysis-services-features-supported-by-the-editions-of-sql-server-2016.md --- ...ices-features-supported-by-the-editions-of-sql-server-2016.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md b/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md index 39e80663627..08f88fcd3ab 100644 --- a/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md +++ b/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md @@ -53,6 +53,7 @@ This article describes features supported by different editions of SQL Server 20 |Time intelligence|Yes|Yes|||||Yes| |Custom rollups|Yes|Yes|||||Yes| |Writeback cube|Yes|Yes|||||Yes| +|Writeback dimensions|Yes|Yes|||||Yes| |Writeback cells|Yes|Yes|||||Yes| |Drillthrough|Yes|Yes|||||Yes| |Advanced hierarchy types (parent-child and ragged hierarchies)|Yes|Yes|||||Yes| From 25651f42095ede98eb5d8cb2c2a976b820c549cb Mon Sep 17 00:00:00 2001 From: Owen Duncan Date: Wed, 10 Jul 2019 10:17:22 -0700 Subject: [PATCH 42/46] Update for 2019. --- ...rted-by-the-editions-of-sql-server-2016.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md b/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md index 08f88fcd3ab..f2eab453d55 100644 --- a/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md +++ b/docs/analysis-services/analysis-services-features-supported-by-the-editions-of-sql-server-2016.md @@ -1,6 +1,6 @@ --- -title: "Analysis Services Features Supported by the Editions of SQL Server | Microsoft Docs" -ms.date: 07/09/2019 +title: "Analysis Services features supported by the editions of SQL Server | Microsoft Docs" +ms.date: 07/10/2019 ms.prod: sql ms.technology: analysis-services ms.custom: @@ -11,6 +11,7 @@ author: minewiskan manager: kfile --- # Analysis Services features supported by SQL Server edition + [!INCLUDE[ssas-appliesto-sql2016-later](../includes/ssas-appliesto-sql2016-later.md)] This article describes features supported by different editions of SQL Server 2016, 2017, 2019 Analysis Services. Evaluation edition supports Enterprise edition features. @@ -44,7 +45,7 @@ This article describes features supported by different editions of SQL Server 20 |Feature|Enterprise|Standard|Web|Express with Advanced Services|Express with Tools|Express|Developer| |-------------|----------------|--------------|---------|------------------------------------|------------------------|-------------|---------------| -|Semi-additive measures|Yes|No 1|||||Yes| +|Semi-additive measures|Yes|No [1](#sameas)|||||Yes| |Hierarchies|Yes|Yes|||||Yes| |KPIs|Yes|Yes|||||Yes| |Perspectives|Yes||||||Yes| @@ -53,12 +54,12 @@ This article describes features supported by different editions of SQL Server 20 |Time intelligence|Yes|Yes|||||Yes| |Custom rollups|Yes|Yes|||||Yes| |Writeback cube|Yes|Yes|||||Yes| -|Writeback dimensions|Yes|Yes|||||Yes| +|Writeback dimensions|Yes [2](#wb)||||||Yes [2](#wb)| |Writeback cells|Yes|Yes|||||Yes| |Drillthrough|Yes|Yes|||||Yes| |Advanced hierarchy types (parent-child and ragged hierarchies)|Yes|Yes|||||Yes| |Advanced dimensions (reference dimensions, many-to-many dimensions)|Yes|Yes|||||Yes| -|Linked measures and dimensions|Yes|Yes 2 |||||Yes| +|Linked measures and dimensions|Yes|Yes [3](#linkmd) |||||Yes| |Translations|Yes|Yes|||||Yes| |Aggregations|Yes|Yes|||||Yes| |Multiple partitions|Yes|Yes, up to 3|||||Yes| @@ -74,8 +75,12 @@ This article describes features supported by different editions of SQL Server 20 |Push-mode processing|Yes||||||Yes| |Measure expressions|Yes||||||Yes| - 1 The LastChild semi-additive measure is supported in Standard edition, but other semi-additive measures, such as None, FirstChild, FirstNonEmpty, LastNonEmpty, AverageOfChildren, and ByAccount, are not. Additive measures, such as Sum, Count, Min, Max, and non-additive measures (DistinctCount) are supported on all editions. - 2 Standard edition supports linking measures and dimensions within the same database, but not from other databases or instances. +[1] The LastChild semi-additive measure is supported in Standard edition, but other semi-additive measures, such as None, FirstChild, FirstNonEmpty, LastNonEmpty, AverageOfChildren, and ByAccount, are not. Additive measures, such as Sum, Count, Min, Max, and non-additive measures (DistinctCount) are supported on all editions. + +[2] Writeback dimensions are discontinued in SQL Server Analysis Services 2019 and later. + +[3] Standard edition supports linking measures and dimensions within the same database, but not from other databases or instances. + ## Power Pivot for SharePoint @@ -89,6 +94,9 @@ This article describes features supported by different editions of SQL Server 20 |Power Pivot data feeds|Yes||||||Yes| ## Data Mining + +> [!NOTE] +> Data mining is [deprecated](analysis-services-backward-compatibility-sql2017.md#deprecated-features) in SQL Server Analysis Services 2017. |Feature Name|Enterprise|Standard|Web|Express with Advanced Services|Express with Tools|Express|Developer| |------------------|----------------|--------------|---------|------------------------------------|------------------------|-------------|---------------| From e89bbdf4759d3168f6e5c9c968a085cf59910cf2 Mon Sep 17 00:00:00 2001 From: Sai Cai Date: Wed, 10 Jul 2019 11:15:32 -0700 Subject: [PATCH 43/46] Escape @ and separate the bold word --- ...ase-study-building-an-enterprise-ecosystem.md | 8 ++++---- .../always-on-client-connectivity-sql-server.md | 4 ++-- ...-using-windows-authentication-transact-sql.md | 4 ++-- ...esson-1-1-create-the-off-by-default-policy.md | 2 +- .../lesson-2-1-create-the-finance-name-policy.md | 4 ++-- ...ransaction-set-job-for-an-oracle-publisher.md | 14 +++++++------- ...ated-backups-for-transactional-replication.md | 6 +++--- ...a-transactional-subscription-from-a-backup.md | 16 ++++++++-------- .../replicate-partitioned-tables-and-indexes.md | 4 ++-- .../peer-to-peer-transactional-replication.md | 10 +++++----- ...sing-custom-assemblies-through-expressions.md | 2 +- .../sql-server-agent-fixed-database-roles.md | 6 +++--- ...ace-results-to-a-table-sql-server-profiler.md | 2 +- .../data/required-providers-for-data-shaping.md | 2 +- docs/mdx/mdx-data-manipulation-update-cube.md | 2 +- .../syntax/sqlgetconnectoption-function.md | 4 ++-- ...il-update-principalprofile-sp-transact-sql.md | 2 +- .../xp-logininfo-transact-sql.md | 2 +- 18 files changed, 47 insertions(+), 47 deletions(-) diff --git a/docs/2014/2014-toc/case-study-building-an-enterprise-ecosystem.md b/docs/2014/2014-toc/case-study-building-an-enterprise-ecosystem.md index 6e648d4bec7..435d798cb9a 100644 --- a/docs/2014/2014-toc/case-study-building-an-enterprise-ecosystem.md +++ b/docs/2014/2014-toc/case-study-building-an-enterprise-ecosystem.md @@ -20,13 +20,13 @@ How to understand the specifics involved while leveraging transactional replicat This content is suitable for developers, architects, and database administrators. It is assumed that readers of this white paper have basic knowledge of SQL Server 2008, 2012, or 2014 as well as SQL Server administration experience. - **Writer:**Prabhakaran Sethuraman (PRAB), Microsoft + **Writer:** Prabhakaran Sethuraman (PRAB), Microsoft - **Technical Reviewers:**Prabhakaran Sethuraman (PRAB), Microsoft; Santosh Padhy, Microsoft; Pavel Majstrov, Microsoft; Karthik Sankaranarayanan, Microsoft; Jon Acone, Microsoft; David Stahlkopf, Microsoft;Kent Oldenburger, Microsoft; Mandi Ohlinger, Microsoft; Jason Roth, Microsoft + **Technical Reviewers:** Prabhakaran Sethuraman (PRAB), Microsoft; Santosh Padhy, Microsoft; Pavel Majstrov, Microsoft; Karthik Sankaranarayanan, Microsoft; Jon Acone, Microsoft; David Stahlkopf, Microsoft;Kent Oldenburger, Microsoft; Mandi Ohlinger, Microsoft; Jason Roth, Microsoft - **Published:**October 2015 + **Published:** October 2015 - **Applies to:**SQL Server 2008, SQL Server 2012, and SQL Server 2014 + **Applies to:** SQL Server 2008, SQL Server 2012, and SQL Server 2014 To review the document, please download the [Case Study: Building an Enterprise Ecosystem with Microsoft Dynamics ERP and SQL Server 2014 Replication for Scalability and Performance](https://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/A%20Case%20Study%20Using%20Replication%20to%20Build%20an%20Enterprise%20Ecosystem%20in%20Microsoft%20Dynamics%20ERP%20for%20Scalability%20and%20Performance.docx) Word document. diff --git a/docs/2014/database-engine/availability-groups/windows/always-on-client-connectivity-sql-server.md b/docs/2014/database-engine/availability-groups/windows/always-on-client-connectivity-sql-server.md index 5939cd7a0d4..11ba20218ed 100644 --- a/docs/2014/database-engine/availability-groups/windows/always-on-client-connectivity-sql-server.md +++ b/docs/2014/database-engine/availability-groups/windows/always-on-client-connectivity-sql-server.md @@ -31,8 +31,8 @@ manager: craigg |------------|----------------------------|------------------------|------------------------|--------------------------------------------------------------------|-----------------------------------------------------------------------------------| |SQL Native Client 11.0 ODBC|Yes|Yes|Yes|Yes|Yes| |SQL Native Client 11.0 OLEDB|No|Yes|Yes|No|No| -|ADO.NET with .NET Framework 4.0 with connectivity patch*****|Yes|Yes|Yes|Yes|Yes| -|ADO.NET with .NET Framework 3.5 SP1 with connectivity patch ******|Yes|Yes|Yes|Yes|Yes| +|ADO.NET with .NET Framework 4.0 with connectivity patch***** |Yes|Yes|Yes|Yes|Yes| +|ADO.NET with .NET Framework 3.5 SP1 with connectivity patch ****** |Yes|Yes|Yes|Yes|Yes| |Microsoft JDBC driver 4.0 for SQL Server|Yes|Yes|Yes|Yes|Yes| ***** Download the connectivity patch for ADO .NET with .NET Framework 4.0: [https://support.microsoft.com/kb/2600211](https://support.microsoft.com/kb/2600211). diff --git a/docs/2014/database-engine/database-mirroring/add-a-database-mirroring-witness-using-windows-authentication-transact-sql.md b/docs/2014/database-engine/database-mirroring/add-a-database-mirroring-witness-using-windows-authentication-transact-sql.md index 96852b765a9..d663c20a2ea 100644 --- a/docs/2014/database-engine/database-mirroring/add-a-database-mirroring-witness-using-windows-authentication-transact-sql.md +++ b/docs/2014/database-engine/database-mirroring/add-a-database-mirroring-witness-using-windows-authentication-transact-sql.md @@ -27,7 +27,7 @@ manager: craigg ### To establish a witness -1. On the witness server instance, ensure that an endpoint exists for database mirroring. Regardless of the number of mirroring session to be supported, the server instance must have only one database mirroring endpoint. If you intend to use this server instance exclusively as a witness in database mirroring sessions, assign the role of witness to the endpoint (ROLE**=**WITNESS). If you intend to use this server instance as a partner in one or more other database mirroring sessions, assign the role of the endpoint as ALL. +1. On the witness server instance, ensure that an endpoint exists for database mirroring. Regardless of the number of mirroring session to be supported, the server instance must have only one database mirroring endpoint. If you intend to use this server instance exclusively as a witness in database mirroring sessions, assign the role of witness to the endpoint (ROLE **=** WITNESS). If you intend to use this server instance as a partner in one or more other database mirroring sessions, assign the role of the endpoint as ALL. To execute a SET WITNESS statement, the database mirroring session must already be started (between the partners), and the STATE of the endpoint of the witness must be set to STARTED. @@ -46,7 +46,7 @@ manager: craigg 3. Connect to the principal server and issue the following statement: - ALTER DATABASE ** SET WITNESS **=**__ + ALTER DATABASE ** SET WITNESS **=** __ where ** is the name of the database to be mirrored (this name is the same on both partners), and ** is the server network address of the witness server instance. diff --git a/docs/2014/relational-databases/policy-based-management/lesson-1-1-create-the-off-by-default-policy.md b/docs/2014/relational-databases/policy-based-management/lesson-1-1-create-the-off-by-default-policy.md index 2e917dffe37..a3792958f64 100644 --- a/docs/2014/relational-databases/policy-based-management/lesson-1-1-create-the-off-by-default-policy.md +++ b/docs/2014/relational-databases/policy-based-management/lesson-1-1-create-the-off-by-default-policy.md @@ -22,7 +22,7 @@ manager: craigg 3. In the **Facet** box, confirm that **Surface Area Configuration** facet is selected. -4. In the **Expression** area, in the **Field** box, select **@DatabaseMailEnabled**, in the **Operator** box select **=**, and in the **Value** select **False**. +4. In the **Expression** area, in the **Field** box, select **\@DatabaseMailEnabled**, in the **Operator** box select **=**, and in the **Value** select **False**. 5. On the **Description** page, type a description of the condition, and then click **OK** to create the condition. diff --git a/docs/2014/relational-databases/policy-based-management/lesson-2-1-create-the-finance-name-policy.md b/docs/2014/relational-databases/policy-based-management/lesson-2-1-create-the-finance-name-policy.md index 798dafb9296..04ef846fa91 100644 --- a/docs/2014/relational-databases/policy-based-management/lesson-2-1-create-the-finance-name-policy.md +++ b/docs/2014/relational-databases/policy-based-management/lesson-2-1-create-the-finance-name-policy.md @@ -33,7 +33,7 @@ manager: craigg 3. In the **Facet** list, select **Multipart Name**. -4. In the **Expression** area, in the **Field** box, select **@Name**; in the **Operator** box, select **Like**; and in the **Value** box, type **'fintbl%'** to force all table names to start with the letters **fintbl**. +4. In the **Expression** area, in the **Field** box, select **\@Name**; in the **Operator** box, select **Like**; and in the **Value** box, type **'fintbl%'** to force all table names to start with the letters **fintbl**. 5. On the **Description** page, type **Finance table names must begin with fintbl**, and then click **OK** to create the condition. @@ -51,7 +51,7 @@ manager: craigg 6. In the **Create New Condition** dialog box, in the **Name** box, type **Finance Database**. -7. In the **Expression** box, complete the expression to include **@Name = 'Finance'**, and then click **OK** to close the condition page. +7. In the **Expression** box, complete the expression to include **\@Name = 'Finance'**, and then click **OK** to close the condition page. > [!NOTE] > You might have to tab out of the **Value** box to enable the **OK** button. diff --git a/docs/2014/relational-databases/replication/administration/configure-the-transaction-set-job-for-an-oracle-publisher.md b/docs/2014/relational-databases/replication/administration/configure-the-transaction-set-job-for-an-oracle-publisher.md index e71af478219..e3b81fe4efc 100644 --- a/docs/2014/relational-databases/replication/administration/configure-the-transaction-set-job-for-an-oracle-publisher.md +++ b/docs/2014/relational-databases/replication/administration/configure-the-transaction-set-job-for-an-oracle-publisher.md @@ -23,27 +23,27 @@ manager: craigg 1. At the Oracle Publisher, set the **job_queue_processes** initialization parameter to a sufficient value to allow the Xactset job run. For more information about this parameter, see the database documentation for the Oracle Publisher. -2. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**, a value of `xactsetbatching` for **@propertyname**, and a value of `enabled` for **@propertyvalue**. +2. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**, a value of `xactsetbatching` for **\@propertyname**, and a value of `enabled` for **\@propertyvalue**. -3. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**, a value of `xactsetjobinterval` for **@propertyname**, and the job interval, in minutes, for **@propertyvalue**. +3. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**, a value of `xactsetjobinterval` for **\@propertyname**, and the job interval, in minutes, for **\@propertyvalue**. -4. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**, a value of `xactsetjob` for **@propertyname**, and a value of `enabled` for **@propertyvalue**. +4. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**, a value of `xactsetjob` for **\@propertyname**, and a value of `enabled` for **\@propertyvalue**. ### To configure the transaction set job -1. (Optional) At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**. This returns properties of the **Xactset** job at the Publisher. +1. (Optional) At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**. This returns properties of the **Xactset** job at the Publisher. -2. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**, the name of the Xactset job property being set for **@propertyname**, and new setting for **@propertyvalue**. +2. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**, the name of the Xactset job property being set for **\@propertyname**, and new setting for **\@propertyvalue**. 3. (Optional) Repeat step 2 for each Xactset job property being set. When changing the `xactsetjobinterval` property, you must restart the job on the Oracle Publisher for the new interval to take effect. ### To view properties of the transaction set job -1. At the Distributor, execute [sp_helpxactsetjob](/sql/relational-databases/system-stored-procedures/sp-helpxactsetjob-transact-sql). Specify the name of the Oracle Publisher for **@publisher**. +1. At the Distributor, execute [sp_helpxactsetjob](/sql/relational-databases/system-stored-procedures/sp-helpxactsetjob-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**. ### To disable the transaction set job -1. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **@publisher**, a value of `xactsetjob` for **@propertyname**, and a value of `disabled` for **@propertyvalue**. +1. At the Distributor, execute [sp_publisherproperty (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-publisherproperty-transact-sql). Specify the name of the Oracle Publisher for **\@publisher**, a value of `xactsetjob` for **\@propertyname**, and a value of `disabled` for **\@propertyvalue**. ## Example The following example enables the `Xactset` job and sets an interval of three minutes between runs. diff --git a/docs/2014/relational-databases/replication/administration/enable-coordinated-backups-for-transactional-replication.md b/docs/2014/relational-databases/replication/administration/enable-coordinated-backups-for-transactional-replication.md index dae10cf8617..ad2604b69cf 100644 --- a/docs/2014/relational-databases/replication/administration/enable-coordinated-backups-for-transactional-replication.md +++ b/docs/2014/relational-databases/replication/administration/enable-coordinated-backups-for-transactional-replication.md @@ -26,7 +26,7 @@ manager: craigg 1. At the Publisher, use the [DATABASEPROPERTYEX (Transact-SQL)](/sql/t-sql/functions/databasepropertyex-transact-sql) function to return the **IsSyncWithBackup** property of the publication database. If the function returns **1**, coordinated backups are already enabled for the published database. -2. If the function in step 1 returns **0**, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql) at the Publisher on the publication database. Specify a value of **sync with backup** for **@optname**, and **true** for **@value**. +2. If the function in step 1 returns **0**, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql) at the Publisher on the publication database. Specify a value of **sync with backup** for **\@optname**, and **true** for **\@value**. > [!NOTE] > If you change the **sync with backup** option to **false**, the truncation point of the publication database will be updated after the Log Reader Agent runs, or after an interval if the Log Reader Agent is running continuously. The maximum interval is controlled by the **-MessageInterval** agent parameter (which has a default of 30 seconds). @@ -35,10 +35,10 @@ manager: craigg 1. At the Distributor, use the [DATABASEPROPERTYEX (Transact-SQL)](/sql/t-sql/functions/databasepropertyex-transact-sql) function to return the **IsSyncWithBackup** property of the distribution database. If the function returns **1**, coordinated backups are already enabled for the distribution database. -2. If the function in step 1 returns **0**, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql) at the Distributor on the distribution database. Specify a value of **sync with backup** for **@optname** and **true** for **@value**. +2. If the function in step 1 returns **0**, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql) at the Distributor on the distribution database. Specify a value of **sync with backup** for **\@optname** and **true** for **\@value**. ### To disable coordinated backups -1. At either the Publisher on the publication database or at the Distributor on the distribution database, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql). Specify a value of **sync with backup** for **@optname** and **false** for **@value**. +1. At either the Publisher on the publication database or at the Distributor on the distribution database, execute [sp_replicationdboption (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-replicationdboption-transact-sql). Specify a value of **sync with backup** for **\@optname** and **false** for **\@value**. diff --git a/docs/2014/relational-databases/replication/initialize-a-transactional-subscription-from-a-backup.md b/docs/2014/relational-databases/replication/initialize-a-transactional-subscription-from-a-backup.md index 29d8b9a54d5..2d8da82fd21 100644 --- a/docs/2014/relational-databases/replication/initialize-a-transactional-subscription-from-a-backup.md +++ b/docs/2014/relational-databases/replication/initialize-a-transactional-subscription-from-a-backup.md @@ -28,7 +28,7 @@ manager: craigg - If the value is **1**, the publication supports this functionality. - - If the value is **0**, execute [sp_changepublication (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-changepublication-transact-sql) at the Publisher on the publication database. Specify a value of **allow_initialize_from_backup** for **@property** and a value of `true` for **@value**. + - If the value is **0**, execute [sp_changepublication (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-changepublication-transact-sql) at the Publisher on the publication database. Specify a value of **allow_initialize_from_backup** for **\@property** and a value of `true` for **\@value**. 2. For a new publication, execute [sp_addpublication (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-addpublication-transact-sql) at the Publisher on the publication database. Specify a value of `true` for **allow_initialize_from_backup**. For more information, see [Create a Publication](publish/create-a-publication.md). @@ -41,23 +41,23 @@ manager: craigg 5. At the Publisher on the publication database, execute the stored procedure [sp_addsubscription (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-addsubscription-transact-sql). Specify the following parameters: - - **@sync_type** - a value of **initialize with backup**. + - **\@sync_type** - a value of **initialize with backup**. - - **@backupdevicetype** - the type of backup device: **logical** (default), **disk**, or **tape**. + - **\@backupdevicetype** - the type of backup device: **logical** (default), **disk**, or **tape**. - - **@backupdevicename** - the logical or physical backup device to use for the restore. + - **\@backupdevicename** - the logical or physical backup device to use for the restore. For a logical device, specify the name of the backup device specified when **sp_addumpdevice** was used to create the device. For a physical device, specify a complete path and file name, such as `DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\BACKUP\Mybackup.dat'` or `TAPE = '\\.\TAPE0'`. - - (Optional) **@password** - a password that was provided when the backup set was created. + - (Optional) **\@password** - a password that was provided when the backup set was created. - - (Optional) **@mediapassword** - a password that was provided when the media set was formatted. + - (Optional) **\@mediapassword** - a password that was provided when the media set was formatted. - - (Optional) **@fileidhint** - identifier for the backup set to be restored. For example, specifying **1** indicates the first backup set on the backup medium and **2** indicates the second backup set. + - (Optional) **\@fileidhint** - identifier for the backup set to be restored. For example, specifying **1** indicates the first backup set on the backup medium and **2** indicates the second backup set. - - (Optional for tape devices) **@unload** - specify a value of **1** (default) if the tape should be unloaded from the drive after the restore is complete and **0** if it should not be unloaded. + - (Optional for tape devices) **\@unload** - specify a value of **1** (default) if the tape should be unloaded from the drive after the restore is complete and **0** if it should not be unloaded. 6. (Optional) For a pull subscription, execute [sp_addpullsubscription (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-addpullsubscription-transact-sql) and [sp_addpullsubscription_agent (Transact-SQL)](/sql/relational-databases/system-stored-procedures/sp-addpullsubscription-agent-transact-sql) at the Subscriber on the subscription database. For more information, see [Create a Pull Subscription](create-a-pull-subscription.md). diff --git a/docs/2014/relational-databases/replication/publish/replicate-partitioned-tables-and-indexes.md b/docs/2014/relational-databases/replication/publish/replicate-partitioned-tables-and-indexes.md index 2ed31f99733..50b1734a628 100644 --- a/docs/2014/relational-databases/replication/publish/replicate-partitioned-tables-and-indexes.md +++ b/docs/2014/relational-databases/replication/publish/replicate-partitioned-tables-and-indexes.md @@ -64,9 +64,9 @@ manager: craigg ### Enabling Partition Switching The following properties for transactional publications enable users to control the behavior of partition switching in a replicated environment: -- **@allow_partition_switch**, when set to `true`, SWITCH PARTITION can be executed against the publication database. +- **\@allow_partition_switch**, when set to `true`, SWITCH PARTITION can be executed against the publication database. -- **@replicate_partition_switch** determines whether the SWITCH PARTITION DDL statement should be replicated to Subscribers. This option is valid only when **@allow_partition_switch** is set to `true`. +- **\@replicate_partition_switch** determines whether the SWITCH PARTITION DDL statement should be replicated to Subscribers. This option is valid only when **\@allow_partition_switch** is set to `true`. You can set these properties by using [sp_addpublication](/sql/relational-databases/system-stored-procedures/sp-addpublication-transact-sql) when the publication is created, or by using [sp_changepublication](/sql/relational-databases/system-stored-procedures/sp-changepublication-transact-sql) after the publication is created. As noted earlier, merge replication does not support partition switching. To execute SWITCH PARTITION on a table that is enabled for merge replication, remove the table from the publication. diff --git a/docs/2014/relational-databases/replication/transactional/peer-to-peer-transactional-replication.md b/docs/2014/relational-databases/replication/transactional/peer-to-peer-transactional-replication.md index b44b9a97353..ebb3a544d02 100644 --- a/docs/2014/relational-databases/replication/transactional/peer-to-peer-transactional-replication.md +++ b/docs/2014/relational-databases/replication/transactional/peer-to-peer-transactional-replication.md @@ -131,19 +131,19 @@ manager: craigg - The Distribution Agent parameter **-SubscriptionStreams** and the Log Reader Agent parameter **-MaxCmdsInTran**. -- The article properties **@destination_owner** and **@destination_table**. +- The article properties **\@destination_owner** and **\@destination_table**. - Peer-to-Peer transactional replication does not support creating a one-way transactional subscription to a Peer-to-Peer publication The following properties have special considerations: -- The publication property **@allow_initialize_from_backup** requires a value of `true`. +- The publication property **\@allow_initialize_from_backup** requires a value of `true`. -- The article property **@replicate_ddl** requires a value of `true`; **@identityrangemanagementoption** requires a value of `manual`; and **@status** requires that option **24** is set. +- The article property **\@replicate_ddl** requires a value of `true`; **\@identityrangemanagementoption** requires a value of `manual`; and **\@status** requires that option **24** is set. -- The value for article properties **@ins_cmd**, **@del_cmd**, and **@upd_cmd** cannot be set to `SQL`. +- The value for article properties **\@ins_cmd**, **\@del_cmd**, and **\@upd_cmd** cannot be set to `SQL`. -- The subscription property **@sync_type** requires a value of `none` or `automatic`. +- The subscription property **\@sync_type** requires a value of `none` or `automatic`. ### Maintenance Considerations The following actions require the system to be quiesced. This means stopping activity on published tables at all nodes and making sure that each node has received all changes from all other nodes. diff --git a/docs/2014/reporting-services/custom-assemblies/accessing-custom-assemblies-through-expressions.md b/docs/2014/reporting-services/custom-assemblies/accessing-custom-assemblies-through-expressions.md index b8f1debc2be..0de0103090d 100644 --- a/docs/2014/reporting-services/custom-assemblies/accessing-custom-assemblies-through-expressions.md +++ b/docs/2014/reporting-services/custom-assemblies/accessing-custom-assemblies-through-expressions.md @@ -37,7 +37,7 @@ manager: kfile ## Calling Instance Members from a Report Definition File If your custom assembly contains instance members that you need to access in a report definition, you must add an instance name for your class to the report. You can add an instance name for a class using the **Code** tab of the **Report Properties** dialog. For more information about adding instances of classes to a report, see [Custom Code and Assembly References in Expressions in Report Designer (SSRS)](../report-design/custom-code-and-assembly-references-in-expressions-in-report-designer-ssrs.md). - To call a static member, you need to reference it as an expression that takes the form =Code*.InstanceName.Method*. + To call a static member, you need to reference it as an expression that takes the form = Code*.InstanceName.Method*. #### To call instance members diff --git a/docs/2014/ssms/agent/sql-server-agent-fixed-database-roles.md b/docs/2014/ssms/agent/sql-server-agent-fixed-database-roles.md index 0a6cb0a4bc3..70905647967 100644 --- a/docs/2014/ssms/agent/sql-server-agent-fixed-database-roles.md +++ b/docs/2014/ssms/agent/sql-server-agent-fixed-database-roles.md @@ -92,7 +92,7 @@ manager: craigg ### SQLAgentOperatorRole Permissions **SQLAgentOperatorRole** is the most privileged of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent fixed database roles. It includes all the permissions of **SQLAgentUserRole** and **SQLAgentReaderRole**. Members of this role can also view properties for operators and proxies, and enumerate available proxies and alerts on the server. - **SQLAgentOperatorRole** members have additional permissions on local jobs and schedules. They can execute, stop, or start all local jobs, and they can delete the job history for any local job on the server. They can also enable or disable all local jobs and schedules on the server. To enable or disable local jobs or schedules, members of this role must use the stored procedures **sp_update_job** and **sp_update_schedule**. Only the parameters that specify the job or schedule name or identifier and the **@enabled** parameter can be specified by members of **SQLAgentOperatorRole**. If they specify any other parameters, execution of these stored procedures fails. **SQLAgentOperatorRole** members cannot change job ownership to gain access to jobs that they do not already own. + **SQLAgentOperatorRole** members have additional permissions on local jobs and schedules. They can execute, stop, or start all local jobs, and they can delete the job history for any local job on the server. They can also enable or disable all local jobs and schedules on the server. To enable or disable local jobs or schedules, members of this role must use the stored procedures **sp_update_job** and **sp_update_schedule**. Only the parameters that specify the job or schedule name or identifier and the **\@enabled** parameter can be specified by members of **SQLAgentOperatorRole**. If they specify any other parameters, execution of these stored procedures fails. **SQLAgentOperatorRole** members cannot change job ownership to gain access to jobs that they do not already own. The **Jobs**, **Alerts**, **Operators**, and **Proxies** nodes in [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] Object Explorer are visible to members of **SQLAgentOperatorRole**. Only the **Error Logs** node is not visible to members of this role. @@ -117,9 +117,9 @@ manager: craigg 2 Cannot change job ownership. - 3 **SQLAgentOperatorRole** members can enable or disable local jobs they do not own by using the stored procedure **sp_update_job** and specifying values for the **@enabled** and the **@job_id** (or **@job_name**) parameters. If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. + 3 **SQLAgentOperatorRole** members can enable or disable local jobs they do not own by using the stored procedure **sp_update_job** and specifying values for the **\@enabled** and the **\@job_id** (or **\@job_name**) parameters. If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. - 4 **SQLAgentOperatorRole** members can enable or disable schedules they do not own by using the stored procedure **sp_update_schedule** and specifying values for the **@enabled** and the **@schedule_id** (or **@name**) parameters. If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. + 4 **SQLAgentOperatorRole** members can enable or disable schedules they do not own by using the stored procedure **sp_update_schedule** and specifying values for the **\@enabled** and the **\@schedule_id** (or **\@name**) parameters. If a member of this role specifies any other parameters for this stored procedure, execution of the procedure will fail. ## Assigning Users Multiple Roles Members of the **sysadmin** fixed server role have access to all [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent functionality. If a user is not a member of the **sysadmin** role, but is a member of more than one [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Agent fixed database role, it is important to remember the concentric permissions model of these roles. Because more privileged roles always contain all the permissions of less privileged roles, a user who is a member of more than one role automatically has the permissions associated with the most privileged role that the user is a member of. diff --git a/docs/2014/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md b/docs/2014/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md index 5d7301fe5d7..750a42bd3b8 100644 --- a/docs/2014/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md +++ b/docs/2014/tools/sql-server-profiler/save-trace-results-to-a-table-sql-server-profiler.md @@ -36,7 +36,7 @@ manager: craigg 6. In the **Table** list, type or select the table name for the trace results. Click **OK.** -7. In the **Trace Properties** dialog box, select the **Set maximum rows (in thousands)**check box to specify the maximum number of rows to save. +7. In the **Trace Properties** dialog box, select the **Set maximum rows (in thousands)** check box to specify the maximum number of rows to save. ## See Also [SQL Server Profiler](sql-server-profiler.md) diff --git a/docs/ado/guide/data/required-providers-for-data-shaping.md b/docs/ado/guide/data/required-providers-for-data-shaping.md index 7de900a5a3b..1d338ed8996 100644 --- a/docs/ado/guide/data/required-providers-for-data-shaping.md +++ b/docs/ado/guide/data/required-providers-for-data-shaping.md @@ -20,7 +20,7 @@ Data shaping typically requires two providers. The service provider, [Data Shapi The name of the service provider (MSDataShape) can be specified as the value of the [Connection](../../../ado/reference/ado-api/connection-object-ado.md) object [Provider](../../../ado/reference/ado-api/provider-property-ado.md) property or the connection string keyword "Provider=MSDataShape;". - The name of the data provider can be specified as the value of the **Data Provider** dynamic property, which is added to the **Connection** object [Properties](../../../ado/reference/ado-api/properties-collection-ado.md) collection by the Data Shaping Service for OLE DB, or the connection string keyword "**Data Provider=**_provider_". + The name of the data provider can be specified as the value of the **Data Provider** dynamic property, which is added to the **Connection** object [Properties](../../../ado/reference/ado-api/properties-collection-ado.md) collection by the Data Shaping Service for OLE DB, or the connection string keyword "**Data Provider =** _provider_". No data provider is required if the **Recordset** is not populated (for example, as in a fabricated **Recordset** where columns are created with the NEW keyword). In that case, specify "**Data Provider=**none;". diff --git a/docs/mdx/mdx-data-manipulation-update-cube.md b/docs/mdx/mdx-data-manipulation-update-cube.md index cc623867db6..8000e747ad6 100644 --- a/docs/mdx/mdx-data-manipulation-update-cube.md +++ b/docs/mdx/mdx-data-manipulation-update-cube.md @@ -61,7 +61,7 @@ UPDATE [ CUBE ] Cube_Name / Count(leaf cells that are contained in ) ``` - **USE_EQUAL_INCREMENT:**Every leaf cell that contributes to the updated cell will be changed according to the following expression. + **USE_EQUAL_INCREMENT:** Every leaf cell that contributes to the updated cell will be changed according to the following expression. ``` = + diff --git a/docs/odbc/reference/syntax/sqlgetconnectoption-function.md b/docs/odbc/reference/syntax/sqlgetconnectoption-function.md index 77ca268cd8d..623090de402 100644 --- a/docs/odbc/reference/syntax/sqlgetconnectoption-function.md +++ b/docs/odbc/reference/syntax/sqlgetconnectoption-function.md @@ -26,10 +26,10 @@ manager: craigg Version Introduced: ODBC 1.0 Standards Compliance: Deprecated **Summary** - In ODBC 3*.x*, the ODBC 2*.x* function **SQLGetConnectOption** has been replaced by **SQLGetConnectAttr**. For more information, see [SQLGetConnectAttr](../../../odbc/reference/syntax/sqlgetconnectattr-function.md). + In ODBC *3.x*, the ODBC *2.x* function **SQLGetConnectOption** has been replaced by **SQLGetConnectAttr**. For more information, see [SQLGetConnectAttr](../../../odbc/reference/syntax/sqlgetconnectattr-function.md). > [!NOTE] -> For more information about what the Driver Manager maps this function to when an ODBC 2*.x* application is working with an ODBC 3*.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. +> For more information about what the Driver Manager maps this function to when an ODBC *2.x* application is working with an ODBC *3.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. > > [!NOTE] > The attribute SQL_ASYNC_DBC_FUNCTION_ENABLE introduced in ODBC 3.8 is not supported by **SQLGetConnectOption**. Applications that use the asynchronous operation on a connection handle must use **SQLGetConnectAttr**. diff --git a/docs/relational-databases/system-stored-procedures/sysmail-update-principalprofile-sp-transact-sql.md b/docs/relational-databases/system-stored-procedures/sysmail-update-principalprofile-sp-transact-sql.md index 4e3b078a03c..f578d5222aa 100644 --- a/docs/relational-databases/system-stored-procedures/sysmail-update-principalprofile-sp-transact-sql.md +++ b/docs/relational-databases/system-stored-procedures/sysmail-update-principalprofile-sp-transact-sql.md @@ -62,7 +62,7 @@ sysmail_update_principalprofile_sp { @principal_id = principal_id | @principal_n When the principal name for the association is **public** or the principal id for the association is **0**, this stored procedure changes the public profile. There can only be one default public profile. - When **@is_default** is '**1**' and the principal is associated with more than one profile, the specified profile becomes the default profile for the principal. The profile that was previously the default profile is still associated with the principal, but is no longer the default profile. + When **\@is_default** is '**1**' and the principal is associated with more than one profile, the specified profile becomes the default profile for the principal. The profile that was previously the default profile is still associated with the principal, but is no longer the default profile. The stored procedure **sysmail_update_principalprofile_sp** is in the **msdb** database and is owned by the **dbo** schema. The procedure must be executed with a three-part name if the current database is not **msdb**. diff --git a/docs/relational-databases/system-stored-procedures/xp-logininfo-transact-sql.md b/docs/relational-databases/system-stored-procedures/xp-logininfo-transact-sql.md index 1a419f5357d..44c8f4117fe 100644 --- a/docs/relational-databases/system-stored-procedures/xp-logininfo-transact-sql.md +++ b/docs/relational-databases/system-stored-procedures/xp-logininfo-transact-sql.md @@ -40,7 +40,7 @@ xp_logininfo [ [ @acctname = ] 'account_name' ] Is the name of a Windows user or group granted access to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. *account_name* is **sysname**, with a default of NULL. If *account_name* is not specified, all Windows groups and Windows users that have been explicitly granted login permission are reported. *account_name* must be fully qualified. For example, 'ADVWKS4\macraes', or 'BUILTIN\Administrators'. **'all'** | **'members'** - Specifies whether to report information about all permission paths for the account, or to report information about the members of the Windows group. **@option** is **varchar(10)**, with a default of NULL. Unless **all** is specified, only the first permission path is displayed. + Specifies whether to report information about all permission paths for the account, or to report information about the members of the Windows group. **\@option** is **varchar(10)**, with a default of NULL. Unless **all** is specified, only the first permission path is displayed. `[ @privilege = ] variable_name` Is an output parameter that returns the privilege level of the specified Windows account. *variable_name* is **varchar(10)**, with a default of 'Not wanted'. The privilege level returned is **user**, **admin**, or **null**. From 8ac10a7f13f2f920b90f9be08c56c3c2429e70b0 Mon Sep 17 00:00:00 2001 From: Sai Cai Date: Wed, 10 Jul 2019 12:02:23 -0700 Subject: [PATCH 44/46] Move the asterisk to the beggining of the string --- docs/odbc/odbc-glossary.md | 2 +- .../appendix-f-odbc-cursor-library.md | 2 +- .../backward-compatibility-of-c-data-types.md | 2 +- ...behavioral-changes-and-odbc-3-x-drivers.md | 6 +-- ...able-cursors-and-backward-compatibility.md | 6 +-- .../appendixes/bookmark-c-data-type.md | 2 +- .../calling-sqlsetpos-to-insert-data.md | 4 +- ...onverting-data-from-sql-to-c-data-types.md | 2 +- .../appendixes/datetime-data-types.md | 10 ++--- .../appendixes/fixed-length-bookmarks.md | 4 +- .../appendixes/loading-by-ordinal.md | 2 +- .../mapping-deprecated-functions.md | 10 ++--- .../appendixes/returning-sql-no-data.md | 2 +- .../reference/appendixes/sql-data-types.md | 2 +- .../appendixes/sqlallocenv-mapping.md | 2 +- .../appendixes/sqlallocstmt-mapping.md | 2 +- .../appendixes/sqlbindcol-cursor-library.md | 4 +- .../appendixes/sqlbindparam-mapping.md | 2 +- .../appendixes/sqlcolattributes-mapping.md | 10 ++--- .../reference/appendixes/sqlerror-mapping.md | 2 +- .../appendixes/sqlfreeconnect-mapping.md | 2 +- .../appendixes/sqlfreeenv-mapping.md | 2 +- .../appendixes/sqlfreestmt-mapping.md | 2 +- .../appendixes/sqlgetconnectoption-mapping.md | 4 +- .../appendixes/sqlgetstmtoption-mapping.md | 6 +-- .../sqlinstalltranslator-mapping.md | 2 +- .../appendixes/sqlparamoptions-mapping.md | 2 +- ...cfield-and-sqlsetdescrec-cursor-library.md | 2 +- .../appendixes/sqlsetscrolloptions-mapping.md | 4 +- .../appendixes/sqlsetstmtoption-mapping.md | 8 ++-- .../appendixes/what-the-driver-does.md | 10 ++--- .../what-the-driver-manager-does.md | 24 +++++----- .../develop-app/affected-odbc-components.md | 8 ++-- ...-compatibility-and-standards-compliance.md | 2 +- ...ard-compatibility-odbc-3-x-applications.md | 24 +++++----- .../reference/develop-app/bookmark-types.md | 4 +- .../develop-app/c-data-types-in-odbc.md | 2 +- .../develop-app/calling-sqlclosecursor.md | 2 +- .../develop-app/calling-sqlgetdiagfield.md | 2 +- .../develop-app/calling-sqlsetpos.md | 4 +- .../develop-app/compatibility-matrix.md | 12 ++--- .../develop-app/cursor-library-operations.md | 2 +- .../develop-app/datetime-data-type-changes.md | 20 ++++----- ...eclaring-the-application-s-odbc-version.md | 14 +++--- .../develop-app/duplicated-features.md | 12 ++--- .../reference/develop-app/header-files.md | 2 +- ...-backward-compatibility-of-applications.md | 44 +++++++++---------- .../reference/develop-app/new-features.md | 6 +-- .../develop-app/sqlstate-mappings.md | 16 +++---- ...ards-compliant-applications-and-drivers.md | 12 ++--- docs/odbc/reference/develop-app/trace-file.md | 2 +- .../reference/develop-app/types-of-changes.md | 8 ++-- .../reference/develop-app/types-of-drivers.md | 10 ++--- .../develop-app/unicode-function-arguments.md | 2 +- .../writing-odbc-3-x-applications.md | 14 +++--- .../install/installation-components.md | 2 +- .../reference/odbc-and-the-standard-cli.md | 12 ++--- .../syntax/sqlfreeconnect-function.md | 4 +- .../reference/syntax/sqlfreeenv-function.md | 4 +- .../syntax/sqlinstalltranslator-function.md | 2 +- .../syntax/sqlsetdescrec-function.md | 2 +- .../syntax/sqlsetenvattr-function.md | 4 +- .../reference/syntax/sqlsetpos-function.md | 10 ++--- .../syntax/sqlsetscrolloptions-function.md | 6 +-- .../syntax/sqlsetstmtattr-function.md | 12 ++--- .../syntax/sqlspecialcolumns-function.md | 4 +- .../syntax/sqlstatistics-function.md | 6 +-- .../syntax/sqltableprivileges-function.md | 4 +- .../reference/syntax/sqltransact-function.md | 2 +- 69 files changed, 222 insertions(+), 222 deletions(-) diff --git a/docs/odbc/odbc-glossary.md b/docs/odbc/odbc-glossary.md index 2df607dfbc9..4ceac05e70a 100644 --- a/docs/odbc/odbc-glossary.md +++ b/docs/odbc/odbc-glossary.md @@ -49,7 +49,7 @@ manager: craigg ## B **behavioral change** - A change in certain functionality from ODBC 3*.x* behavior to ODBC 2.*x* behavior, or vice versa. Caused by changing the SQL_ATTR_ODBC_VERSION environment attribute. + A change in certain functionality from ODBC *3.x* behavior to ODBC *2.x* behavior, or vice versa. Caused by changing the SQL_ATTR_ODBC_VERSION environment attribute. **Binary large object (BLOB)** Any binary data over a certain number of bytes, such as 255. Typically much longer. Such data is generally sent to and retrieved from the data source in parts. Also known as *long data*. diff --git a/docs/odbc/reference/appendixes/appendix-f-odbc-cursor-library.md b/docs/odbc/reference/appendixes/appendix-f-odbc-cursor-library.md index 0361c4c66ee..a6414d11415 100644 --- a/docs/odbc/reference/appendixes/appendix-f-odbc-cursor-library.md +++ b/docs/odbc/reference/appendixes/appendix-f-odbc-cursor-library.md @@ -25,7 +25,7 @@ manager: craigg The cursor library is a dynamic-link library (DLL) that resides between the Driver Manager and the driver. When an application calls a function, the Driver Manager calls the function in the cursor library, which either executes the function or calls it in the specified driver. For a given connection, an application specifies whether the cursor library is always used, used if the driver does not support scrollable cursors, or never used. - The cursor library appears as a driver to the Driver Manager. If the cursor library resides between the Driver Manager and an ODBC 2.*x* driver, the cursor library appears as an ODBC 2.*x* driver. If the cursor library resides between the Driver Manager and an ODBC 3*.x* driver, the cursor library appears as an ODBC 3*.x* driver. The behavior exhibited by the cursor library depends upon the version of the driver it is working with, with the exception of binding offsets, which is supported for both ODBC 2.*x* and ODBC 3.*x* drivers. + The cursor library appears as a driver to the Driver Manager. If the cursor library resides between the Driver Manager and an ODBC *2.x* driver, the cursor library appears as an ODBC *2.x* driver. If the cursor library resides between the Driver Manager and an ODBC *3.x* driver, the cursor library appears as an ODBC *3.x* driver. The behavior exhibited by the cursor library depends upon the version of the driver it is working with, with the exception of binding offsets, which is supported for both ODBC *2.x* and ODBC *3.x* drivers. To implement block cursors in **SQLFetch** and **SQLFetchScroll**, the cursor library repeatedly calls **SQLFetch** in the driver. To implement scrolling, it caches the data it has retrieved in memory and in disk files. When an application requests a new rowset, the cursor library retrieves it as necessary from the driver or the cache. diff --git a/docs/odbc/reference/appendixes/backward-compatibility-of-c-data-types.md b/docs/odbc/reference/appendixes/backward-compatibility-of-c-data-types.md index 91154245f60..7e65f5744ab 100644 --- a/docs/odbc/reference/appendixes/backward-compatibility-of-c-data-types.md +++ b/docs/odbc/reference/appendixes/backward-compatibility-of-c-data-types.md @@ -18,4 +18,4 @@ ms.author: genemi manager: craigg --- # Backward Compatibility of C Data Types -SQL_C_SHORT, SQL_C_LONG, and SQL_C_TINYINT have been replaced in ODBC by signed and unsigned types: SQL_C_SSHORT and SQL_C_USHORT, SQL_C_SLONG and SQL_C_ULONG, and SQL_C_STINYINT and SQL_C_UTINYINT. An ODBC 3*.x* driver that should work with ODBC 2.*x* applications should support SQL_C_SHORT, SQL_C_LONG, and SQL_C_TINYINT, because when they are called, the Driver Manager passes them through to the driver. +SQL_C_SHORT, SQL_C_LONG, and SQL_C_TINYINT have been replaced in ODBC by signed and unsigned types: SQL_C_SSHORT and SQL_C_USHORT, SQL_C_SLONG and SQL_C_ULONG, and SQL_C_STINYINT and SQL_C_UTINYINT. An ODBC *3.x* driver that should work with ODBC *2.x* applications should support SQL_C_SHORT, SQL_C_LONG, and SQL_C_TINYINT, because when they are called, the Driver Manager passes them through to the driver. diff --git a/docs/odbc/reference/appendixes/behavioral-changes-and-odbc-3-x-drivers.md b/docs/odbc/reference/appendixes/behavioral-changes-and-odbc-3-x-drivers.md index 2c22515b81a..f7dad25cf5c 100644 --- a/docs/odbc/reference/appendixes/behavioral-changes-and-odbc-3-x-drivers.md +++ b/docs/odbc/reference/appendixes/behavioral-changes-and-odbc-3-x-drivers.md @@ -17,16 +17,16 @@ ms.author: genemi manager: craigg --- # Behavioral Changes and ODBC 3.x Drivers -The environment attribute SQL_ATTR_ODBC_VERSION indicates to the driver whether it needs to exhibit ODBC 2.*x* behavior or ODBC 3*.x* behavior. How the SQL_ATTR_ODBC_VERSION environment attribute is set depends on the application. ODBC 3*.x* applications must call **SQLSetEnvAttr** to set this attribute after they call **SQLAllocHandle** to allocate an environment handle and before they call **SQLAllocHandle** to allocate a connection handle. If they fail to do this, the Driver Manager returns SQLSTATE HY010 (Function sequence error) on the latter call to **SQLAllocHandle**. +The environment attribute SQL_ATTR_ODBC_VERSION indicates to the driver whether it needs to exhibit ODBC *2.x* behavior or ODBC *3.x* behavior. How the SQL_ATTR_ODBC_VERSION environment attribute is set depends on the application. ODBC *3.x* applications must call **SQLSetEnvAttr** to set this attribute after they call **SQLAllocHandle** to allocate an environment handle and before they call **SQLAllocHandle** to allocate a connection handle. If they fail to do this, the Driver Manager returns SQLSTATE HY010 (Function sequence error) on the latter call to **SQLAllocHandle**. > [!NOTE] > For more information on behavioral changes and how an application acts, see [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md). - ODBC 2.*x* applications and ODBC 2.*x* applications recompiled with the ODBC 3*.x* header files do not call **SQLSetEnvAttr**. However, they call **SQLAllocEnv** instead of **SQLAllocHandle** to allocate an environment handle. Therefore, when the application calls **SQLAllocEnv** in the Driver Manager, the Driver Manager calls **SQLAllocHandle** and **SQLSetEnvAttr** in the driver. Thus, ODBC 3*.x* drivers can always count on this attribute being set. + ODBC *2.x* applications and ODBC *2.x* applications recompiled with the ODBC *3.x* header files do not call **SQLSetEnvAttr**. However, they call **SQLAllocEnv** instead of **SQLAllocHandle** to allocate an environment handle. Therefore, when the application calls **SQLAllocEnv** in the Driver Manager, the Driver Manager calls **SQLAllocHandle** and **SQLSetEnvAttr** in the driver. Thus, ODBC *3.x* drivers can always count on this attribute being set. If a standards-compliant application compiled with the ODBC_STD compile flag calls **SQLAllocEnv** (which may occur because **SQLAllocEnv** is not deprecated in ISO), the call is mapped to **SQLAllocHandleStd** at compile time. At run time, the application calls **SQLAllocHandleStd**. The Driver Manager sets the SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC3. A call to **SQLAllocHandleStd** is equivalent to a call to **SQLAllocHandle** with a *HandleType* of SQL_HANDLE_ENV and a call to **SQLSetEnvAttr** to set SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3. - In certain driver architectures, there is a need for the driver to appear as either an ODBC 2.*x* driver or an ODBC 3*.x* driver, depending on the connection. The driver in this case might not actually be a driver but a layer that resides between the Driver Manager and another driver. For example, it might mimic a driver, like ODBC Spy. In another example, it might act as a gateway, like EDA/SQL. To appear as an ODBC 3*.x* driver, such a driver must be able to export **SQLAllocHandle**, and to appear as an ODBC 2.*x* driver, must be able to export **SQLAllocConnect**, **SQLAllocEnv**, and **SQLAllocStmt**. When an environment, connection, or statement is to be allocated, the Driver Manager checks to see if this driver exports **SQLAllocHandle**. Since the driver does, the Driver Manager calls **SQLAllocHandle** in the driver. If the driver is working with an ODBC 2.*x* driver, the driver must map the call to **SQLAllocHandle** to **SQLAllocConnect**, **SQLAllocEnv**, or **SQLAllocStmt**, as appropriate. It must also do nothing with the **SQLSetEnvAttr** call when behaving as an ODBC 2.*x* driver. + In certain driver architectures, there is a need for the driver to appear as either an ODBC *2.x* driver or an ODBC *3.x* driver, depending on the connection. The driver in this case might not actually be a driver but a layer that resides between the Driver Manager and another driver. For example, it might mimic a driver, like ODBC Spy. In another example, it might act as a gateway, like EDA/SQL. To appear as an ODBC *3.x* driver, such a driver must be able to export **SQLAllocHandle**, and to appear as an ODBC *2.x* driver, must be able to export **SQLAllocConnect**, **SQLAllocEnv**, and **SQLAllocStmt**. When an environment, connection, or statement is to be allocated, the Driver Manager checks to see if this driver exports **SQLAllocHandle**. Since the driver does, the Driver Manager calls **SQLAllocHandle** in the driver. If the driver is working with an ODBC *2.x* driver, the driver must map the call to **SQLAllocHandle** to **SQLAllocConnect**, **SQLAllocEnv**, or **SQLAllocStmt**, as appropriate. It must also do nothing with the **SQLSetEnvAttr** call when behaving as an ODBC *2.x* driver. This section contains the following topics. diff --git a/docs/odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md b/docs/odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md index ca04bede761..97a0333bef5 100644 --- a/docs/odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md +++ b/docs/odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md @@ -19,11 +19,11 @@ ms.author: genemi manager: craigg --- # Block Cursors, Scrollable Cursors, and Backward Compatibility -The existence of both **SQLFetchScroll** and **SQLExtendedFetch** represents the first clear split in ODBC between the Application Programming Interface (API), which is the set of functions the application calls, and the Service Provider Interface (SPI), which is the set of functions the driver implements. This split is necessary so that ODBC 3.*x*, which uses **SQLFetchScroll**,bealigned with the standards and also be compatible with ODBC 2.*x*, which uses **SQLExtendedFetch**. +The existence of both **SQLFetchScroll** and **SQLExtendedFetch** represents the first clear split in ODBC between the Application Programming Interface (API), which is the set of functions the application calls, and the Service Provider Interface (SPI), which is the set of functions the driver implements. This split is necessary so that ODBC *3.x*, which uses **SQLFetchScroll**,bealigned with the standards and also be compatible with ODBC *2.x*, which uses **SQLExtendedFetch**. - The ODBC 3*.x* API, which is the set of functions the application calls, includes **SQLFetchScroll** and related statement attributes. The ODBC 3*.x* SPI, which is the set of functions the driver implements, includes **SQLFetchScroll**, **SQLExtendedFetch**, and related statement attributes. Because ODBC does not formally enforce this split between the API and the SPI, it is possible for ODBC 3*.x* applications to call **SQLExtendedFetch** and related statement attributes. However, there is no reason for ODBC 3*.x* application to do this. For more information about APIs and SPIs, see the introduction to [ODBC Architecture](../../../odbc/reference/odbc-architecture.md). + The ODBC *3.x* API, which is the set of functions the application calls, includes **SQLFetchScroll** and related statement attributes. The ODBC *3.x* SPI, which is the set of functions the driver implements, includes **SQLFetchScroll**, **SQLExtendedFetch**, and related statement attributes. Because ODBC does not formally enforce this split between the API and the SPI, it is possible for ODBC *3.x* applications to call **SQLExtendedFetch** and related statement attributes. However, there is no reason for ODBC *3.x* application to do this. For more information about APIs and SPIs, see the introduction to [ODBC Architecture](../../../odbc/reference/odbc-architecture.md). - For information about what functions and statement attributes an ODBC 3.*x* application should use with block and scrollable cursors, see [Block Cursors, Scrollable Cursors, and Backward Compatibility for ODBC 3.x Applications](../../../odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md). + For information about what functions and statement attributes an ODBC *3.x* application should use with block and scrollable cursors, see [Block Cursors, Scrollable Cursors, and Backward Compatibility for ODBC 3.x Applications](../../../odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md). This section contains the following topics. diff --git a/docs/odbc/reference/appendixes/bookmark-c-data-type.md b/docs/odbc/reference/appendixes/bookmark-c-data-type.md index cca0ba06756..09a5d5cd4d9 100644 --- a/docs/odbc/reference/appendixes/bookmark-c-data-type.md +++ b/docs/odbc/reference/appendixes/bookmark-c-data-type.md @@ -24,7 +24,7 @@ The bookmark C data type allows an application to retrieve a bookmark. The bookm The following table lists the value of *CType* for the bookmark C data type, the ODBC C data type that implements the bookmark C data type, and the definition of this data type from SQL.H. > [!NOTE] -> The SQL_C_BOOKMARK data type has been deprecated. ODBC 3*.x* applications should not use SQL_C_BOOKMARK. ODBC 3*.x* drivers need to support SQL_C_BOOKMARK only if they want to work with ODBC 2.*x* applications that use it. The Driver Manager maps SQL_C_VARBOOKMARK to SQL_C_BOOKMARK when an application works with an ODBC 2.*x* driver. +> The SQL_C_BOOKMARK data type has been deprecated. ODBC *3.x* applications should not use SQL_C_BOOKMARK. ODBC *3.x* drivers need to support SQL_C_BOOKMARK only if they want to work with ODBC *2.x* applications that use it. The Driver Manager maps SQL_C_VARBOOKMARK to SQL_C_BOOKMARK when an application works with an ODBC *2.x* driver. |C type identifier|ODBC C typedef|C type| |-----------------------|--------------------|------------| diff --git a/docs/odbc/reference/appendixes/calling-sqlsetpos-to-insert-data.md b/docs/odbc/reference/appendixes/calling-sqlsetpos-to-insert-data.md index 0a13ae0fa6b..cf8cabd8cb1 100644 --- a/docs/odbc/reference/appendixes/calling-sqlsetpos-to-insert-data.md +++ b/docs/odbc/reference/appendixes/calling-sqlsetpos-to-insert-data.md @@ -17,6 +17,6 @@ ms.author: genemi manager: craigg --- # Calling SQLSetPos to Insert Data -When an ODBC 2.*x* application working with an ODBC 3*.x* driver calls **SQLSetPos** with an *Operation* argument of SQL_ADD, the Driver Manager does not map this call to **SQLBulkOperations**. If an ODBC 3*.x* driver should work with an application that calls **SQLSetPos** with SQL_ADD, the driver should support that operation. +When an ODBC *2.x* application working with an ODBC *3.x* driver calls **SQLSetPos** with an *Operation* argument of SQL_ADD, the Driver Manager does not map this call to **SQLBulkOperations**. If an ODBC *3.x* driver should work with an application that calls **SQLSetPos** with SQL_ADD, the driver should support that operation. - One major difference in behavior when **SQLSetPos** is called with SQL_ADD occurs when it is called in state S6. In ODBC 2.*x*, the driver returned S1010 when **SQLSetPos** was called with SQL_ADD in state S6 (after the cursor has been positioned with **SQLFetch**). In ODBC 3*.x*, **SQLBulkOperations** with an *Operation* of SQL_ADD can be called in state S6. A second major difference in behavior is that **SQLBulkOperations** with an *Operation* of SQL_ADD can be called in state S5, while **SQLSetPos** with an **Operation** of SQL_ADD cannot. For the statement transitions that can occur for the same call in ODBC 3*.x*, see [Appendix B: ODBC State Transition Tables](../../../odbc/reference/appendixes/appendix-b-odbc-state-transition-tables.md). + One major difference in behavior when **SQLSetPos** is called with SQL_ADD occurs when it is called in state S6. In ODBC *2.x*, the driver returned S1010 when **SQLSetPos** was called with SQL_ADD in state S6 (after the cursor has been positioned with **SQLFetch**). In ODBC *3.x*, **SQLBulkOperations** with an *Operation* of SQL_ADD can be called in state S6. A second major difference in behavior is that **SQLBulkOperations** with an *Operation* of SQL_ADD can be called in state S5, while **SQLSetPos** with an **Operation** of SQL_ADD cannot. For the statement transitions that can occur for the same call in ODBC *3.x*, see [Appendix B: ODBC State Transition Tables](../../../odbc/reference/appendixes/appendix-b-odbc-state-transition-tables.md). diff --git a/docs/odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md b/docs/odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md index 058051b6c7e..7da4968b95a 100644 --- a/docs/odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md +++ b/docs/odbc/reference/appendixes/converting-data-from-sql-to-c-data-types.md @@ -27,7 +27,7 @@ When an application calls **SQLFetch**, **SQLFetchScroll**, or **SQLGetData**, t The following table shows the supported conversions from ODBC SQL data types to ODBC C data types. A filled circle indicates the default conversion for an SQL data type (the C data type to which the data will be converted when the value of *TargetType* is SQL_C_DEFAULT). A hollow circle indicates a supported conversion. - For an ODBC 3*.x* application working with an ODBC 2.*x* driver, conversion from driver-specific data types might not be supported. + For an ODBC *3.x* application working with an ODBC *2.x* driver, conversion from driver-specific data types might not be supported. The format of the converted data is not affected by the Windows® country setting. diff --git a/docs/odbc/reference/appendixes/datetime-data-types.md b/docs/odbc/reference/appendixes/datetime-data-types.md index 083bdca32a2..1fc76bd7153 100644 --- a/docs/odbc/reference/appendixes/datetime-data-types.md +++ b/docs/odbc/reference/appendixes/datetime-data-types.md @@ -24,14 +24,14 @@ ms.author: genemi manager: craigg --- # Datetime Data Types -In ODBC 3*.x*, the identifiers for date, time, and timestamp SQL data types have changed from SQL_DATE, SQL_TIME, and SQL_TIMESTAMP (with instances of **#define** in the header file of 9, 10, and 11) to SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP (with instances of **#define** in the header file of 91, 92, and 93), respectively. The corresponding C type identifiers have changed from SQL_C_DATE, SQL_C_TIME, and SQL_C_TIMESTAMP to SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, and SQL_C_TYPE_TIMESTAMP, respectively, and the instances of **#define** have changed accordingly. +In ODBC *3.x*, the identifiers for date, time, and timestamp SQL data types have changed from SQL_DATE, SQL_TIME, and SQL_TIMESTAMP (with instances of **#define** in the header file of 9, 10, and 11) to SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP (with instances of **#define** in the header file of 91, 92, and 93), respectively. The corresponding C type identifiers have changed from SQL_C_DATE, SQL_C_TIME, and SQL_C_TIMESTAMP to SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, and SQL_C_TYPE_TIMESTAMP, respectively, and the instances of **#define** have changed accordingly. - The column size and decimal digits returned for the SQL datetime data types in ODBC 3*.x* are the same as the precision and scale returned for them in ODBC 2.*x*. These values are different than the values in the SQL_DESC_PRECISION and SQL_DESC_SCALE descriptor fields. (For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md) in Appendix D: Data Types.) + The column size and decimal digits returned for the SQL datetime data types in ODBC *3.x* are the same as the precision and scale returned for them in ODBC *2.x*. These values are different than the values in the SQL_DESC_PRECISION and SQL_DESC_SCALE descriptor fields. (For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md) in Appendix D: Data Types.) These changes affect **SQLDescribeCol**, **SQLDescribeParam**, and **SQLColAttributes**; **SQLBindCol**, **SQLBindParameter**, and **SQLGetData**; and **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, **SQLStatistics**, and **SQLSpecialColumns**. - An ODBC 3*.x* driver processes the function calls listed in the previous paragraph according to the setting of the SQL_ATTR_ODBC_VERSION environment attribute. For **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, **SQLSpecialColumns**, and **SQLStatistics**, if SQL_ATTR_ODBC_VERSION is set to SQL_OV_ODBC3, the functions return SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP in the DATA_TYPE field. The COLUMN_SIZE column (in the result set returned by **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, and **SQLSpecialColumns**) contains the binary precision for the approximate numeric type. The NUM_PREC_RADIX column (in the result set returned by **SQLColumns**, **SQLGetTypeInfo**, and **SQLProcedureColumns**) contains a value of 2. If SQL_ATTR_ODBC_VERSION is set to SQL_OV_ODBC2, then the functions return SQL_DATE, SQL_TIME, and SQL_TIMESTAMP in the DATA_TYPE field, the COLUMN_SIZE column contains the decimal precision for the approximate numeric type, and the NUM_PREC_RADIX column contains a value of 10. + An ODBC *3.x* driver processes the function calls listed in the previous paragraph according to the setting of the SQL_ATTR_ODBC_VERSION environment attribute. For **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, **SQLSpecialColumns**, and **SQLStatistics**, if SQL_ATTR_ODBC_VERSION is set to SQL_OV_ODBC3, the functions return SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP in the DATA_TYPE field. The COLUMN_SIZE column (in the result set returned by **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, and **SQLSpecialColumns**) contains the binary precision for the approximate numeric type. The NUM_PREC_RADIX column (in the result set returned by **SQLColumns**, **SQLGetTypeInfo**, and **SQLProcedureColumns**) contains a value of 2. If SQL_ATTR_ODBC_VERSION is set to SQL_OV_ODBC2, then the functions return SQL_DATE, SQL_TIME, and SQL_TIMESTAMP in the DATA_TYPE field, the COLUMN_SIZE column contains the decimal precision for the approximate numeric type, and the NUM_PREC_RADIX column contains a value of 10. - When all data types are requested in a call to **SQLGetTypeInfo**, the result set returned by the function will contain both SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP as defined in ODBC 3*.x*, and SQL_DATE, SQL_TIME, and SQL_TIMESTAMP as defined in ODBC 2.*x*. + When all data types are requested in a call to **SQLGetTypeInfo**, the result set returned by the function will contain both SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP as defined in ODBC *3.x*, and SQL_DATE, SQL_TIME, and SQL_TIMESTAMP as defined in ODBC *2.x*. - Because of how the ODBC 3*.x* Driver Manager performs mapping of the date, time, and timestamp data types, ODBC 3*.x* drivers need only recognize **#defines** of 91, 92, and 93 for the date, time, and timestamp C data types entered in the *TargetType* arguments of **SQLBindCol** and **SQLGetData** or the *ValueType* argument of **SQLBindParameter**, and need only recognize **#defines** of 91, 92, and 93 for the date, time, and timestamp SQL data types entered in the *ParameterType* argument of **SQLBindParameter** or the *DataType* argument of **SQLGetTypeInfo**. For more information, see [Datetime Data Type Changes](../../../odbc/reference/develop-app/datetime-data-type-changes.md). + Because of how the ODBC *3.x* Driver Manager performs mapping of the date, time, and timestamp data types, ODBC *3.x* drivers need only recognize **#defines** of 91, 92, and 93 for the date, time, and timestamp C data types entered in the *TargetType* arguments of **SQLBindCol** and **SQLGetData** or the *ValueType* argument of **SQLBindParameter**, and need only recognize **#defines** of 91, 92, and 93 for the date, time, and timestamp SQL data types entered in the *ParameterType* argument of **SQLBindParameter** or the *DataType* argument of **SQLGetTypeInfo**. For more information, see [Datetime Data Type Changes](../../../odbc/reference/develop-app/datetime-data-type-changes.md). diff --git a/docs/odbc/reference/appendixes/fixed-length-bookmarks.md b/docs/odbc/reference/appendixes/fixed-length-bookmarks.md index b6bc462d706..82886a430ba 100644 --- a/docs/odbc/reference/appendixes/fixed-length-bookmarks.md +++ b/docs/odbc/reference/appendixes/fixed-length-bookmarks.md @@ -18,8 +18,8 @@ ms.author: genemi manager: craigg --- # Fixed-Length Bookmarks -If an ODBC 3*.x* driver should work with an ODBC 2.*x* application that uses fixed-length bookmarks, the driver must support the following: +If an ODBC *3.x* driver should work with an ODBC *2.x* application that uses fixed-length bookmarks, the driver must support the following: -- SQL_UB_ON as a value for the SQL_USE_BOOKMARKS statement option. (SQL_UB_ON is deprecated in ODBC 3*.x*.) +- SQL_UB_ON as a value for the SQL_USE_BOOKMARKS statement option. (SQL_UB_ON is deprecated in ODBC *3.x*.) - The SQL_GET_BOOKMARK statement option. diff --git a/docs/odbc/reference/appendixes/loading-by-ordinal.md b/docs/odbc/reference/appendixes/loading-by-ordinal.md index 40242125b1d..55f02992b30 100644 --- a/docs/odbc/reference/appendixes/loading-by-ordinal.md +++ b/docs/odbc/reference/appendixes/loading-by-ordinal.md @@ -17,4 +17,4 @@ ms.author: genemi manager: craigg --- # Loading by Ordinal -In ODBC 2.*x*, loading by ordinal could be performed to improve the performance of the connection process. An ODBC 2.*x* driver exports a dummy function with the ordinal 199; when the Driver Manager detects it, it resolves the addresses of the ODBC functions by ordinal, not by name. This functionality is still supported for ODBC 2.*x* drivers but is not supported for ODBC 3*.x* drivers. +In ODBC *2.x*, loading by ordinal could be performed to improve the performance of the connection process. An ODBC *2.x* driver exports a dummy function with the ordinal 199; when the Driver Manager detects it, it resolves the addresses of the ODBC functions by ordinal, not by name. This functionality is still supported for ODBC *2.x* drivers but is not supported for ODBC *3.x* drivers. diff --git a/docs/odbc/reference/appendixes/mapping-deprecated-functions.md b/docs/odbc/reference/appendixes/mapping-deprecated-functions.md index 1eedbb34d79..49e49cc0883 100644 --- a/docs/odbc/reference/appendixes/mapping-deprecated-functions.md +++ b/docs/odbc/reference/appendixes/mapping-deprecated-functions.md @@ -20,13 +20,13 @@ ms.author: genemi manager: craigg --- # Mapping Deprecated Functions -This section describes how deprecated functions are mapped by the ODBC 3*.x* Driver Manager to guarantee backward compatibility of ODBC 3*.x* drivers that are used with ODBC 2.*x* applications. The Driver Manager performs this mapping regardless of the version of the application. Because each of the ODBC 2.*x* functions in the following list is mapped to the corresponding ODBC 3*.x* function when called in an ODBC 3*.x* driver, the ODBC 3*.x* driver does not have to implement the ODBC 2.*x* functions. +This section describes how deprecated functions are mapped by the ODBC *3.x* Driver Manager to guarantee backward compatibility of ODBC *3.x* drivers that are used with ODBC *2.x* applications. The Driver Manager performs this mapping regardless of the version of the application. Because each of the ODBC *2.x* functions in the following list is mapped to the corresponding ODBC *3.x* function when called in an ODBC *3.x* driver, the ODBC *3.x* driver does not have to implement the ODBC *2.x* functions. - The mapping in the list is triggered when the driver is an ODBC 3*.x* driver and the driver does not support the function that is being mapped. + The mapping in the list is triggered when the driver is an ODBC *3.x* driver and the driver does not support the function that is being mapped. - The following table lists all duplicated functionality that was introduced in ODBC 3*.x*. + The following table lists all duplicated functionality that was introduced in ODBC *3.x*. -|ODBC 2.*x* function|ODBC 3*.x* function| +|ODBC *2.x* function|ODBC *3.x* function| |-------------------------|-------------------------| |**SQLAllocConnect**|**SQLAllocHandle**| |**SQLAllocEnv**|**SQLAllocHandle**| @@ -46,7 +46,7 @@ This section describes how deprecated functions are mapped by the ODBC 3*.x* Dri |**SQLSetStmtOption**|**SQLSetStmtAttr**| |**SQLTransact**|**SQLEndTran**| - [1] Even though this function did not exist in ODBC 2*.x*, it is in the Open Group and ISO standards. + [1] Even though this function did not exist in ODBC *2.x*, it is in the Open Group and ISO standards. [2] This is an ODBC 1.0 function. diff --git a/docs/odbc/reference/appendixes/returning-sql-no-data.md b/docs/odbc/reference/appendixes/returning-sql-no-data.md index 338533b55e1..9ae5ff70aad 100644 --- a/docs/odbc/reference/appendixes/returning-sql-no-data.md +++ b/docs/odbc/reference/appendixes/returning-sql-no-data.md @@ -17,6 +17,6 @@ ms.author: genemi manager: craigg --- # Returning SQL_NO_DATA -When an ODBC 2.*x* application workingwith an ODBC 3*.x* driver calls **SQLExecDirect**, **SQLExecute**, or **SQLParamData**, and a searched update or delete statement was executed but did not affect any rows at the data source, the ODBC 3*.x* driver should return SQL_SUCCESS. When an ODBC 3*.x* application working with an ODBC 3*.x* driver calls **SQLExecDirect**, **SQLExecute**, or **SQLParamData** with the same result, the ODBC 3*.x* driver should return SQL_NO_DATA. +When an ODBC *2.x* application workingwith an ODBC *3.x* driver calls **SQLExecDirect**, **SQLExecute**, or **SQLParamData**, and a searched update or delete statement was executed but did not affect any rows at the data source, the ODBC *3.x* driver should return SQL_SUCCESS. When an ODBC *3.x* application working with an ODBC *3.x* driver calls **SQLExecDirect**, **SQLExecute**, or **SQLParamData** with the same result, the ODBC *3.x* driver should return SQL_NO_DATA. If a searched update or delete statement in a batch of statements does not affect any rows at the data source, **SQLMoreResults** returns SQL_SUCCESS. It cannot return SQL_NO_DATA, because that would mean that there are no more results, not that there is a result from a searched update/delete that affected no rows. diff --git a/docs/odbc/reference/appendixes/sql-data-types.md b/docs/odbc/reference/appendixes/sql-data-types.md index 5d9f170acde..15d81be8e25 100644 --- a/docs/odbc/reference/appendixes/sql-data-types.md +++ b/docs/odbc/reference/appendixes/sql-data-types.md @@ -80,7 +80,7 @@ Each DBMS defines its own SQL types. Each ODBC driver exposes only those SQL dat [5] Depending on the implementation, the precision of SQL_FLOAT can be either 24 or 53: if it is 24, the SQL_FLOAT data type is the same as SQL_REAL; if it is 53, the SQL_FLOAT data type is the same as SQL_DOUBLE. - [6] In ODBC 3*.x*, the SQL date, time, and timestamp data types are SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP, respectively; in ODBC 2.*x*, the data types are SQL_DATE, SQL_TIME, and SQL_TIMESTAMP. + [6] In ODBC *3.x*, the SQL date, time, and timestamp data types are SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP, respectively; in ODBC *2.x*, the data types are SQL_DATE, SQL_TIME, and SQL_TIMESTAMP. [7] For more information about the interval SQL data types, see the [Interval Data Types](../../../odbc/reference/appendixes/interval-data-types.md) section, later in this appendix. diff --git a/docs/odbc/reference/appendixes/sqlallocenv-mapping.md b/docs/odbc/reference/appendixes/sqlallocenv-mapping.md index 60882dfb5ba..5f614dfa1e8 100644 --- a/docs/odbc/reference/appendixes/sqlallocenv-mapping.md +++ b/docs/odbc/reference/appendixes/sqlallocenv-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLAllocEnv Mapping -When an application calls **SQLAllocEnv** through an ODBC 3*.x* driver, the call to **SQLAllocEnv**(*phenv*) is mapped to **SQLAllocHandle** as follows: +When an application calls **SQLAllocEnv** through an ODBC *3.x* driver, the call to **SQLAllocEnv**(*phenv*) is mapped to **SQLAllocHandle** as follows: 1. The Driver Manager allocates an environment handle and returns it to the application. The Driver Manager calls **SQLSetEnvAttr** to set the SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC2. diff --git a/docs/odbc/reference/appendixes/sqlallocstmt-mapping.md b/docs/odbc/reference/appendixes/sqlallocstmt-mapping.md index 9c47c6daaa5..32e29d8c5e0 100644 --- a/docs/odbc/reference/appendixes/sqlallocstmt-mapping.md +++ b/docs/odbc/reference/appendixes/sqlallocstmt-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLAllocStmt Mapping -When an application calls **SQLAllocStmt** through an ODBC 3*.x* driver, the call to: +When an application calls **SQLAllocStmt** through an ODBC *3.x* driver, the call to: ``` SQLAllocStmt(hdbc, phstmt) diff --git a/docs/odbc/reference/appendixes/sqlbindcol-cursor-library.md b/docs/odbc/reference/appendixes/sqlbindcol-cursor-library.md index 2d0627fa190..55e23fcb244 100644 --- a/docs/odbc/reference/appendixes/sqlbindcol-cursor-library.md +++ b/docs/odbc/reference/appendixes/sqlbindcol-cursor-library.md @@ -24,8 +24,8 @@ manager: craigg An application can call **SQLBindCol** to rebind result set columns after it has called **SQLExtendedFetch**, **SQLFetch**, or **SQLFetchScroll**,as long as the C data type, column size, and decimal digits of the bound column remain the same. The application need not close the cursor to rebind columns to different addresses. - The cursor library supports setting the SQL_ATTR_ROW_BIND_OFFSET_PTR statement attribute to use bind offsets. (**SQLBindCol** does not have to be called for this rebinding to occur.) If the cursor library is used with an ODBC 3*.x* driver, the bind offset is not used when **SQLFetch** is called. The bind offset is used if **SQLFetch** is called when the cursor library is used with an ODBC 2.*x* driver because **SQLFetch** is then mapped to **SQLExtendedFetch**. + The cursor library supports setting the SQL_ATTR_ROW_BIND_OFFSET_PTR statement attribute to use bind offsets. (**SQLBindCol** does not have to be called for this rebinding to occur.) If the cursor library is used with an ODBC *3.x* driver, the bind offset is not used when **SQLFetch** is called. The bind offset is used if **SQLFetch** is called when the cursor library is used with an ODBC *2.x* driver because **SQLFetch** is then mapped to **SQLExtendedFetch**. The cursor library supports calling **SQLBindCol** to bind the bookmark column. - When working with an ODBC 2.*x* driver, the cursor library returns SQLSTATE HY090 (Invalid string or buffer length) when **SQLBindCol** is called to set the buffer length for a bookmark column to a value not equal to 4. When working with an ODBC 3*.x* driver, the cursor library allows the buffer to be any size. + When working with an ODBC *2.x* driver, the cursor library returns SQLSTATE HY090 (Invalid string or buffer length) when **SQLBindCol** is called to set the buffer length for a bookmark column to a value not equal to 4. When working with an ODBC *3.x* driver, the cursor library allows the buffer to be any size. diff --git a/docs/odbc/reference/appendixes/sqlbindparam-mapping.md b/docs/odbc/reference/appendixes/sqlbindparam-mapping.md index 1ec0d1c71b8..551d7c844db 100644 --- a/docs/odbc/reference/appendixes/sqlbindparam-mapping.md +++ b/docs/odbc/reference/appendixes/sqlbindparam-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLBindParam Mapping -**SQLBindParam** cannot truly be called deprecated because it was never there in ODBC; however, it still represents duplicated functionality - the Driver Manager needs to export it because ISO and Open Group-compliant applications will be using it. Because **SQLBindParameter** contains all the functionality of **SQLBindParam**, **SQLBindParam** will be mapped on top of **SQLBindParameter** (when the underlying driver is an ODBC 3*.x* driver). An ODBC 3*.x* driver does not need to implement **SQLBindParam**. +**SQLBindParam** cannot truly be called deprecated because it was never there in ODBC; however, it still represents duplicated functionality - the Driver Manager needs to export it because ISO and Open Group-compliant applications will be using it. Because **SQLBindParameter** contains all the functionality of **SQLBindParam**, **SQLBindParam** will be mapped on top of **SQLBindParameter** (when the underlying driver is an ODBC *3.x* driver). An ODBC *3.x* driver does not need to implement **SQLBindParam**. ## Remarks When the following call to **SQLBindParam** is made: diff --git a/docs/odbc/reference/appendixes/sqlcolattributes-mapping.md b/docs/odbc/reference/appendixes/sqlcolattributes-mapping.md index 2327c1b1e55..fbb1085200f 100644 --- a/docs/odbc/reference/appendixes/sqlcolattributes-mapping.md +++ b/docs/odbc/reference/appendixes/sqlcolattributes-mapping.md @@ -16,15 +16,15 @@ ms.author: genemi manager: craigg --- # SQLColAttributes Mapping -When an application calls **SQLColAttributes** through an ODBC 3*.x* driver, the call to **SQLColAttributes** is mapped to **SQLColAttribute** as follows: +When an application calls **SQLColAttributes** through an ODBC *3.x* driver, the call to **SQLColAttributes** is mapped to **SQLColAttribute** as follows: > [!NOTE] -> The prefix used in *FieldIdentifier* values in ODBC 3*.x* has been changed from that used in ODBC 2.*x*. The new prefix is "SQL_DESC"; the old prefix was "SQL_COLUMN". +> The prefix used in *FieldIdentifier* values in ODBC *3.x* has been changed from that used in ODBC *2.x*. The new prefix is "SQL_DESC"; the old prefix was "SQL_COLUMN". -1. If the application is an ODBC 2.*x* application, *fDescType* is SQL_COLUMN_TYPE, and the returned type is a concise DATETIME type, the Driver Manager maps the return values for date, time, and timestamp codes. +1. If the application is an ODBC *2.x* application, *fDescType* is SQL_COLUMN_TYPE, and the returned type is a concise DATETIME type, the Driver Manager maps the return values for date, time, and timestamp codes. 2. If *fDescType* is SQL_COLUMN_NAME, SQL_COLUMN_NULLABLE, or SQL_COLUMN_COUNT, the Driver Manager calls **SQLColAttribute** in the driver with the *FieldIdentifier* argument mapped to SQL_DESC_NAME, SQL_DESC_NULLABLE, or SQL_DESC_COUNT, as appropriate*.* All other values of *fDescType* are passed through to the driver. - An ODBC 3*.x* driver must support all the ODBC 3*.x* *FieldIdentifiers* listed for **SQLColAttribute**. + An ODBC *3.x* driver must support all the ODBC *3.x* *FieldIdentifiers* listed for **SQLColAttribute**. - An ODBC 3*.x* driver must support SQL_COLUMN_PRECISION and SQL_DESC_PRECISION, SQL_COLUMN_SCALE and SQL_DESC_SCALE, and SQL_COLUMN_LENGTH and SQL_DESC_LENGTH. These values are different because precision, scale, and length are defined differently in ODBC 3*.x* than they were in ODBC 2.*x*. For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md) in Appendix D: Data Types. + An ODBC *3.x* driver must support SQL_COLUMN_PRECISION and SQL_DESC_PRECISION, SQL_COLUMN_SCALE and SQL_DESC_SCALE, and SQL_COLUMN_LENGTH and SQL_DESC_LENGTH. These values are different because precision, scale, and length are defined differently in ODBC *3.x* than they were in ODBC *2.x*. For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md) in Appendix D: Data Types. diff --git a/docs/odbc/reference/appendixes/sqlerror-mapping.md b/docs/odbc/reference/appendixes/sqlerror-mapping.md index bfe2aca1d8c..6c8e90dd191 100644 --- a/docs/odbc/reference/appendixes/sqlerror-mapping.md +++ b/docs/odbc/reference/appendixes/sqlerror-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLError Mapping -When an application calls **SQLError** through an ODBC 3*.x* driver, the call to +When an application calls **SQLError** through an ODBC *3.x* driver, the call to ``` SQLError(henv, hdbc, hstmt, szSqlState, pfNativeError, szErrorMsg, cbErrorMsgMax, pcbErrorMsg) diff --git a/docs/odbc/reference/appendixes/sqlfreeconnect-mapping.md b/docs/odbc/reference/appendixes/sqlfreeconnect-mapping.md index 71308e15969..fa0e91ded4c 100644 --- a/docs/odbc/reference/appendixes/sqlfreeconnect-mapping.md +++ b/docs/odbc/reference/appendixes/sqlfreeconnect-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLFreeConnect Mapping -When an application calls **SQLFreeConnect** through an ODBC 3*.x* driver, the call to +When an application calls **SQLFreeConnect** through an ODBC *3.x* driver, the call to ``` SQLFreeConnect(hdbc) diff --git a/docs/odbc/reference/appendixes/sqlfreeenv-mapping.md b/docs/odbc/reference/appendixes/sqlfreeenv-mapping.md index 6a6fe1f35df..86cde9901ae 100644 --- a/docs/odbc/reference/appendixes/sqlfreeenv-mapping.md +++ b/docs/odbc/reference/appendixes/sqlfreeenv-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLFreeEnv Mapping -When an application calls **SQLFreeEnv** through an ODBC 3*.x* driver, the call to +When an application calls **SQLFreeEnv** through an ODBC *3.x* driver, the call to ``` SQLFreeEnv(henv) diff --git a/docs/odbc/reference/appendixes/sqlfreestmt-mapping.md b/docs/odbc/reference/appendixes/sqlfreestmt-mapping.md index 7123ff1fbdb..3a54e9dc9f0 100644 --- a/docs/odbc/reference/appendixes/sqlfreestmt-mapping.md +++ b/docs/odbc/reference/appendixes/sqlfreestmt-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLFreeStmt Mapping -When an application calls **SQLFreeStmt** with an *Option* argument of SQL_DROP through an ODBC 3*.x* driver, the call to +When an application calls **SQLFreeStmt** with an *Option* argument of SQL_DROP through an ODBC *3.x* driver, the call to ``` SQLFreeStmt(hstmt, SQL_DROP) diff --git a/docs/odbc/reference/appendixes/sqlgetconnectoption-mapping.md b/docs/odbc/reference/appendixes/sqlgetconnectoption-mapping.md index 90542793b2f..4b51528d2c6 100644 --- a/docs/odbc/reference/appendixes/sqlgetconnectoption-mapping.md +++ b/docs/odbc/reference/appendixes/sqlgetconnectoption-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLGetConnectOption Mapping -When an application calls **SQLGetConnectOption** through an ODBC 3*.x* driver, the call to +When an application calls **SQLGetConnectOption** through an ODBC *3.x* driver, the call to ``` SQLGetConnectOption(hdbc, fOption, pvParam) @@ -46,4 +46,4 @@ SQLGetConnectOption(hdbc, fOption, pvParam) For ODBC-defined string connection options, the Driver Manager sets the *BufferLength* argument in the call to **SQLGetConnectAttr** to the predefined maximum length (SQL_MAX_OPTION_STRING_LENGTH); for a nonstring connection option, *BufferLength* is set to 0. - For an ODBC 3*.x* driver, the Driver Manager no longer checks to see if *Option* is in between SQL_CONN_OPT_MIN and SQL_CONN_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. The driver must check the validity of the option values. + For an ODBC *3.x* driver, the Driver Manager no longer checks to see if *Option* is in between SQL_CONN_OPT_MIN and SQL_CONN_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. The driver must check the validity of the option values. diff --git a/docs/odbc/reference/appendixes/sqlgetstmtoption-mapping.md b/docs/odbc/reference/appendixes/sqlgetstmtoption-mapping.md index 8bbc1dcc459..1ab25815ac3 100644 --- a/docs/odbc/reference/appendixes/sqlgetstmtoption-mapping.md +++ b/docs/odbc/reference/appendixes/sqlgetstmtoption-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLGetStmtOption Mapping -When an application calls **SQLGetStmtOption** to an ODBC 3*.x* driver that does not support it, the call to +When an application calls **SQLGetStmtOption** to an ODBC *3.x* driver that does not support it, the call to ``` SQLGetStmtOption(hstmt, fOption, pvParam) @@ -46,6 +46,6 @@ SQLGetStmtOption(hstmt, fOption, pvParam) For ODBC-defined string connection options, the Driver Manager sets the *BufferLength* argument in the call to **SQLGetConnectAttr** to the predefined maximum length (SQL_MAX_OPTION_STRING_LENGTH); for a nonstring connection option, *BufferLength* is set to 0. - The SQL_GET_BOOKMARK statement option has been deprecated in ODBC 3*.x*. For an ODBC 3*.x* driver to work with ODBC 2.*x* applications that use SQL_GET_BOOKMARK, it must support SQL_GET_BOOKMARK. For an ODBC 3*.x* driver to work with ODBC 2.*x* applications, it must support setting SQL_USE_BOOKMARKS to SQL_UB_ON and should expose fixed-length bookmarks. If an ODBC 3*.x* driver supports only variable-length bookmarks, not fixed-length bookmarks, it must return SQLSTATE HYC00 (Optional feature not implemented) if an ODBC 2.*x* application attempts to set SQL_USE_BOOKMARKS to SQL_UB_ON. + The SQL_GET_BOOKMARK statement option has been deprecated in ODBC *3.x*. For an ODBC *3.x* driver to work with ODBC *2.x* applications that use SQL_GET_BOOKMARK, it must support SQL_GET_BOOKMARK. For an ODBC *3.x* driver to work with ODBC *2.x* applications, it must support setting SQL_USE_BOOKMARKS to SQL_UB_ON and should expose fixed-length bookmarks. If an ODBC *3.x* driver supports only variable-length bookmarks, not fixed-length bookmarks, it must return SQLSTATE HYC00 (Optional feature not implemented) if an ODBC *2.x* application attempts to set SQL_USE_BOOKMARKS to SQL_UB_ON. - For an ODBC 3*.x* driver, the Driver Manager no longer checks to see whether *Option* is in between SQL_STMT_OPT_MIN and SQL_STMT_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. The driver must check this. + For an ODBC *3.x* driver, the Driver Manager no longer checks to see whether *Option* is in between SQL_STMT_OPT_MIN and SQL_STMT_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. The driver must check this. diff --git a/docs/odbc/reference/appendixes/sqlinstalltranslator-mapping.md b/docs/odbc/reference/appendixes/sqlinstalltranslator-mapping.md index 96ce0de6415..f6f758439e1 100644 --- a/docs/odbc/reference/appendixes/sqlinstalltranslator-mapping.md +++ b/docs/odbc/reference/appendixes/sqlinstalltranslator-mapping.md @@ -16,4 +16,4 @@ ms.author: genemi manager: craigg --- # SQLInstallTranslator Mapping -When an ODBC 2.*x* application calls **SQLInstallTranslator** through an ODBC 3*.x* driver, the Driver Manager maps the call to **SQLInstallTranslatorEx**.An application should not call **SQLInstallTranslator** in the ODBC 3*.x* Driver Manager with the *lpszInfFile* argument set to a value other than NULL. The ODBC.INF file used in ODBC 2.*x* is no longer supported in ODBC 3*.x*, even for backward compatibility. +When an ODBC *2.x* application calls **SQLInstallTranslator** through an ODBC *3.x* driver, the Driver Manager maps the call to **SQLInstallTranslatorEx**.An application should not call **SQLInstallTranslator** in the ODBC *3.x* Driver Manager with the *lpszInfFile* argument set to a value other than NULL. The ODBC.INF file used in ODBC *2.x* is no longer supported in ODBC *3.x*, even for backward compatibility. diff --git a/docs/odbc/reference/appendixes/sqlparamoptions-mapping.md b/docs/odbc/reference/appendixes/sqlparamoptions-mapping.md index 027913affca..10dbfa55d2a 100644 --- a/docs/odbc/reference/appendixes/sqlparamoptions-mapping.md +++ b/docs/odbc/reference/appendixes/sqlparamoptions-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLParamOptions Mapping -When an application calls **SQLParamOptions** through an ODBC 3*.x* driver, the call +When an application calls **SQLParamOptions** through an ODBC *3.x* driver, the call ``` SQLParamOptions(hstmt, crow, piRow); diff --git a/docs/odbc/reference/appendixes/sqlsetdescfield-and-sqlsetdescrec-cursor-library.md b/docs/odbc/reference/appendixes/sqlsetdescfield-and-sqlsetdescrec-cursor-library.md index ac4cf3ab4d3..022f33452d9 100644 --- a/docs/odbc/reference/appendixes/sqlsetdescfield-and-sqlsetdescrec-cursor-library.md +++ b/docs/odbc/reference/appendixes/sqlsetdescfield-and-sqlsetdescrec-cursor-library.md @@ -49,7 +49,7 @@ manager: craigg The cursor library executes calls to **SQLSetDescRec** for a bookmark column. - When working with an ODBC 2.*x* driver, the cursor library returns SQLSTATE HY090 (Invalid string or buffer length) when **SQLSetDescField** or **SQLSetDescRec** is called to set the SQL_DESC_OCTET_LENGTH field for the bookmark record of an ARD to a value not equal to 4. When working with an ODBC 3*.x* driver, the cursor library allows the buffer to be any size. + When working with an ODBC *2.x* driver, the cursor library returns SQLSTATE HY090 (Invalid string or buffer length) when **SQLSetDescField** or **SQLSetDescRec** is called to set the SQL_DESC_OCTET_LENGTH field for the bookmark record of an ARD to a value not equal to 4. When working with an ODBC *3.x* driver, the cursor library allows the buffer to be any size. The cursor library executes **SQLSetDescField** when it is called to return the value of the SQL_DESC_BIND_OFFSET_PTR, SQL_DESC_BIND_TYPE, SQL_DESC_ROW_ARRAY_SIZE, or SQL_DESC_ROW_STATUS_PTR field. These fields can be returned for any row, not just the bookmark row. diff --git a/docs/odbc/reference/appendixes/sqlsetscrolloptions-mapping.md b/docs/odbc/reference/appendixes/sqlsetscrolloptions-mapping.md index 446923c7110..31f5b3d8399 100644 --- a/docs/odbc/reference/appendixes/sqlsetscrolloptions-mapping.md +++ b/docs/odbc/reference/appendixes/sqlsetscrolloptions-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLSetScrollOptions Mapping -When an application calls **SQLSetScrollOptions** through an ODBC 3*.x* driver and the driver does not support **SQLSetScrollOptions**, the call to +When an application calls **SQLSetScrollOptions** through an ODBC *3.x* driver and the driver does not support **SQLSetScrollOptions**, the call to ``` SQLSetScrollOptions(StatementHandle, Concurrency, KeysetSize, RowsetSize) @@ -94,4 +94,4 @@ SQLSetScrollOptions(StatementHandle, Concurrency, KeysetSize, RowsetSize) with *\*ValuePtr* set to the *RowsetSize* argument in **SQLSetScrollOptions**. > [!NOTE] - > When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC 3*.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**. + > When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC *3.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**. diff --git a/docs/odbc/reference/appendixes/sqlsetstmtoption-mapping.md b/docs/odbc/reference/appendixes/sqlsetstmtoption-mapping.md index 18b946d1ca7..92127558754 100644 --- a/docs/odbc/reference/appendixes/sqlsetstmtoption-mapping.md +++ b/docs/odbc/reference/appendixes/sqlsetstmtoption-mapping.md @@ -16,7 +16,7 @@ ms.author: genemi manager: craigg --- # SQLSetStmtOption Mapping -When an application calls **SQLSetStmtOption** through an ODBC 3*.x* driver, the call to +When an application calls **SQLSetStmtOption** through an ODBC *3.x* driver, the call to ``` SQLSetStmtOption(StatementHandle, fOption, vParam) @@ -46,8 +46,8 @@ SQLSetStmtOption(StatementHandle, fOption, vParam) Because the Driver Manager does not know whether the driver-defined statement attribute needs a string or 32-bit integer value, it has to pass in a valid value for the *StringLength* argument of **SQLSetStmtAttr**. If the driver has defined special semantics for driver-defined statement attributes and needs to be called using **SQLSetStmtOption**, it must support **SQLSetStmtOption**. - If an application calls **SQLSetStmtOption** to set a driver-specific statement option in an ODBC 3*.x* driver and the option was defined in an ODBC 2.*x* version of the driver, a new manifest constant should be defined for the option in the ODBC 3*.x* driver. If the old manifest constant is used in the call to **SQLSetStmtOption**, the Driver Manager will call **SQLSetStmtAttr** with the *StringLength* argument set to 0. + If an application calls **SQLSetStmtOption** to set a driver-specific statement option in an ODBC *3.x* driver and the option was defined in an ODBC *2.x* version of the driver, a new manifest constant should be defined for the option in the ODBC *3.x* driver. If the old manifest constant is used in the call to **SQLSetStmtOption**, the Driver Manager will call **SQLSetStmtAttr** with the *StringLength* argument set to 0. - When an application calls **SQLSetStmtAttr** to set SQL_ATTR_USE_BOOKMARKS to SQL_UB_ON in an ODBC 3*.x* driver, the SQL_ATTR_USE_BOOKMARKS statement attribute is set to SQL_UB_FIXED. SQL_UB_ON is the same constant as SQL_UB_FIXED. The Driver Manager passes SQL_UB_FIXED through to the driver. SQL_UB_FIXED has been deprecated in ODBC 3*.x*, but an ODBC 3*.x* driver must implement it to work with ODBC 2.*x* applications that use fixed-length bookmarks. + When an application calls **SQLSetStmtAttr** to set SQL_ATTR_USE_BOOKMARKS to SQL_UB_ON in an ODBC *3.x* driver, the SQL_ATTR_USE_BOOKMARKS statement attribute is set to SQL_UB_FIXED. SQL_UB_ON is the same constant as SQL_UB_FIXED. The Driver Manager passes SQL_UB_FIXED through to the driver. SQL_UB_FIXED has been deprecated in ODBC *3.x*, but an ODBC *3.x* driver must implement it to work with ODBC *2.x* applications that use fixed-length bookmarks. - For an ODBC 3*.x* driver, the Driver Manager no longer checks to see if *Option* is in between SQL_STMT_OPT_MIN and SQL_STMT_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. + For an ODBC *3.x* driver, the Driver Manager no longer checks to see if *Option* is in between SQL_STMT_OPT_MIN and SQL_STMT_OPT_MAX, or is greater than SQL_CONNECT_OPT_DRVR_START. diff --git a/docs/odbc/reference/appendixes/what-the-driver-does.md b/docs/odbc/reference/appendixes/what-the-driver-does.md index a625dc4738b..b261633a5a3 100644 --- a/docs/odbc/reference/appendixes/what-the-driver-does.md +++ b/docs/odbc/reference/appendixes/what-the-driver-does.md @@ -19,16 +19,16 @@ ms.author: genemi manager: craigg --- # What the Driver Does -The following table summarizes what functions and statement attributes an ODBC 3*.x* driver should implement for block and scrollable cursors. +The following table summarizes what functions and statement attributes an ODBC *3.x* driver should implement for block and scrollable cursors. |Function or

statement attribute|Comments| |-----------------------------------------|--------------| |SQL_ATTR_ROW_STATUS_PTR|Sets the address of the row status array filled by **SQLFetch** and **SQLFetchScroll**. This array is also filled by **SQLSetPos** if **SQLSetPos** is called in statement state S6. If **SQLSetPos** is called in state S7, this array is not filled but the array pointed to by the *RowStatusArray* argument of **SQLExtendedFetch** is filled. For more information, see [Statement Transitions](../../../odbc/reference/appendixes/statement-transitions.md) in Appendix B: ODBC State Transition Tables.| |SQL_ATTR_ROWS_FETCHED_PTR|Sets the address of the buffer in which **SQLFetch** and **SQLFetchScroll** return the number of rows fetched. If **SQLExtendedFetch** is called, this buffer is not filled but the *RowCountPtr* argument points to the number of rows fetched.| |SQL_ATTR_ROW_ARRAY_SIZE|Sets the rowset size used by **SQLFetch** and **SQLFetchScroll**.| -|SQL_ROWSET_SIZE|Sets the rowset size used by **SQLExtendedFetch**. ODBC 3*.x* drivers implement this if they want to work with ODBC 2.*x* applications that call **SQLExtendedFetch** or **SQLSetPos**.| -|**SQLBulkOperations**|If an ODBC 3*.x* driver should work with ODBC 2.*x* applications that use **SQLSetPos** with an *Operation* of SQL_ADD, the driver must support **SQLSetPos** with an *Operation* of SQL_ADD in addition to **SQLBulkOperations** with an *Operation* of SQL_ADD.| -|**SQLExtendedFetch**|Returns the specified rowset. ODBC 3*.x* drivers implement this if they want to work with ODBC 2.*x* applications that call **SQLExtendedFetch** or **SQLSetPos**. The following are implementation details:

- The driver retrieves the rowset size from the value of the SQL_ROWSET_SIZE statement attribute.
- The driver retrieves the address of the row status array from the *RowStatusArray* argument, not the SQL_ATTR_ROW_STATUS_PTR statement attribute. The *RowStatusArray* argument in a call to **SQLExtendedFetch** must not be a null pointer. (Note that in ODBC 3*.x*, the SQL_ATTR_ROW_STATUS_PTR statement attribute can be a null pointer.)
- The driver retrieves the address of the rows fetched buffer from the *RowCountPtr* argument, not the SQL_ATTR_ROWS_FETCHED_PTR statement attribute.
- The driver returns SQLSTATE 01S01 (Error in row) to indicate that an error has occurred while rows were fetched by a call to **SQLExtendedFetch**. An ODBC 3*.x* driver should return SQLSTATE 01S01 (Error in row) only when **SQLExtendedFetch** is called, not when **SQLFetch** or **SQLFetchScroll** is called. To preserve backward compatibility, when SQLSTATE 01S01 (Error in row) is returned by **SQLExtendedFetch**, the Driver Manager does not order status records in the error queue according to the rules stated in the "Sequence of Status Records" section of [SQLGetDiagField](../../../odbc/reference/syntax/sqlgetdiagfield-function.md).| +|SQL_ROWSET_SIZE|Sets the rowset size used by **SQLExtendedFetch**. ODBC *3.x* drivers implement this if they want to work with ODBC *2.x* applications that call **SQLExtendedFetch** or **SQLSetPos**.| +|**SQLBulkOperations**|If an ODBC *3.x* driver should work with ODBC *2.x* applications that use **SQLSetPos** with an *Operation* of SQL_ADD, the driver must support **SQLSetPos** with an *Operation* of SQL_ADD in addition to **SQLBulkOperations** with an *Operation* of SQL_ADD.| +|**SQLExtendedFetch**|Returns the specified rowset. ODBC *3.x* drivers implement this if they want to work with ODBC *2.x* applications that call **SQLExtendedFetch** or **SQLSetPos**. The following are implementation details:

- The driver retrieves the rowset size from the value of the SQL_ROWSET_SIZE statement attribute.
- The driver retrieves the address of the row status array from the *RowStatusArray* argument, not the SQL_ATTR_ROW_STATUS_PTR statement attribute. The *RowStatusArray* argument in a call to **SQLExtendedFetch** must not be a null pointer. (Note that in ODBC *3.x*, the SQL_ATTR_ROW_STATUS_PTR statement attribute can be a null pointer.)
- The driver retrieves the address of the rows fetched buffer from the *RowCountPtr* argument, not the SQL_ATTR_ROWS_FETCHED_PTR statement attribute.
- The driver returns SQLSTATE 01S01 (Error in row) to indicate that an error has occurred while rows were fetched by a call to **SQLExtendedFetch**. An ODBC *3.x* driver should return SQLSTATE 01S01 (Error in row) only when **SQLExtendedFetch** is called, not when **SQLFetch** or **SQLFetchScroll** is called. To preserve backward compatibility, when SQLSTATE 01S01 (Error in row) is returned by **SQLExtendedFetch**, the Driver Manager does not order status records in the error queue according to the rules stated in the "Sequence of Status Records" section of [SQLGetDiagField](../../../odbc/reference/syntax/sqlgetdiagfield-function.md).| |**SQLFetch**|Returns the next rowset. The following are implementation details:

- The driver retrieves the rowset size from the value of the SQL_ATTR_ROW_ARRAY_SIZE statement attribute.
- The driver retrieves the address of the row status array from the SQL_ATTR_ROW_STATUS_PTR statement attribute.
- The driver retrieves the address of the rows fetched buffer from the SQL_ATTR_ROWS_FETCHED_PTR statement attribute.
- The application can mix calls between **SQLFetchScroll** and **SQLFetch**.
- **SQLFetch** returns bookmarks if column 0 is bound.
- **SQLFetch** can be called to return more than one row.
- The driver does not return SQLSTATE 01S01 (Error in row) to indicate that an error has occurred while rows were fetched by a call to **SQLFetch**.| |**SQLFetchScroll**|Returns the specified rowset. The following are implementation details:

- The driver retrieves the rowset size from the SQL_ATTR_ROW_ARRAY_SIZE statement attribute.
- The driver retrieves the address of the row status array from the SQL_ATTR_ROW_STATUS_PTR statement attribute.
- The driver retrieves the address of the rows fetched buffer from the SQL_ATTR_ROWS_FETCHED_PTR statement attribute.
- The application can mix calls between **SQLFetchScroll** and **SQLFetch**.
- The driver does not return SQLSTATE 01S01 (Error in row) to indicate that an error has occurred while rows were fetched by a call to **SQLFetchScroll**.| -|**SQLSetPos**|Performs various positioned operations. The following are implementation details:

- This can be called in statement states S6 or S7. For more details, see [Statement Transitions](../../../odbc/reference/appendixes/statement-transitions.md) in Appendix B: ODBC State Transition Tables.
- If this is called in statement state S5 or S6, the driver retrieves the rowset size from the SQL_ATTR_ROWS_FETCHED_PTR statement attribute and the address of the row status array from the SQL_ATTR_ROW_STATUS_PTR statement attribute.
- If this is called in statement state S7, the driver retrieves the rowset size from the SQL_ROWSET_SIZE statement attribute and the address of the row status array from the *RowStatusArray* argument of **SQLExtendedFetch**.
- The driver returns SQLSTATE 01S01 (Error in row) only to indicate that an error has occurred while rows were fetched by a call to **SQLSetPos** to perform a bulk operation when the function is called in state S7. To preserve backward compatibility, if SQLSTATE 01S01 (Error in row) is returned by **SQLSetPos**, the Driver Manager does not order status records in the error queue according to the rules stated in the "Sequence of Status Records" section of [SQLGetDiagField](../../../odbc/reference/syntax/sqlgetdiagfield-function.md).
- If the driver should work with ODBC 2.*x* applications that call **SQLSetPos** with an *Operation* argument of SQL_ADD, the driver must support **SQLSetPos** with an *Operation* argument of SQL_ADD.| +|**SQLSetPos**|Performs various positioned operations. The following are implementation details:

- This can be called in statement states S6 or S7. For more details, see [Statement Transitions](../../../odbc/reference/appendixes/statement-transitions.md) in Appendix B: ODBC State Transition Tables.
- If this is called in statement state S5 or S6, the driver retrieves the rowset size from the SQL_ATTR_ROWS_FETCHED_PTR statement attribute and the address of the row status array from the SQL_ATTR_ROW_STATUS_PTR statement attribute.
- If this is called in statement state S7, the driver retrieves the rowset size from the SQL_ROWSET_SIZE statement attribute and the address of the row status array from the *RowStatusArray* argument of **SQLExtendedFetch**.
- The driver returns SQLSTATE 01S01 (Error in row) only to indicate that an error has occurred while rows were fetched by a call to **SQLSetPos** to perform a bulk operation when the function is called in state S7. To preserve backward compatibility, if SQLSTATE 01S01 (Error in row) is returned by **SQLSetPos**, the Driver Manager does not order status records in the error queue according to the rules stated in the "Sequence of Status Records" section of [SQLGetDiagField](../../../odbc/reference/syntax/sqlgetdiagfield-function.md).
- If the driver should work with ODBC *2.x* applications that call **SQLSetPos** with an *Operation* argument of SQL_ADD, the driver must support **SQLSetPos** with an *Operation* argument of SQL_ADD.| diff --git a/docs/odbc/reference/appendixes/what-the-driver-manager-does.md b/docs/odbc/reference/appendixes/what-the-driver-manager-does.md index c6ae28a90df..01bbc8078e5 100644 --- a/docs/odbc/reference/appendixes/what-the-driver-manager-does.md +++ b/docs/odbc/reference/appendixes/what-the-driver-manager-does.md @@ -18,18 +18,18 @@ ms.author: genemi manager: craigg --- # What the Driver Manager Does -The following table summarizes how the ODBC 3*.x* Driver Manager maps calls to ODBC 2.*x* and ODBC 3*.x* drivers. +The following table summarizes how the ODBC *3.x* Driver Manager maps calls to ODBC *2.x* and ODBC *3.x* drivers. |Function or

statement attribute|Comments| |-----------------------------------------|--------------| -|SQL_ATTR_FETCH_BOOKMARK_PTR|Points to the bookmark to use with **SQLFetchScroll**. The following are implementation details:

- When an application sets this in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager caches it. It dereferences the pointer and passes the value to the ODBC 2.*x* driver in the *FetchOffset* argument of **SQLExtendedFetch** when **SQLFetchScroll** is later called by the application.
- When an application sets this in an ODBC 3*.x* driver, the ODBC 3*.x* Driver Manager passes the call to the driver.| -|SQL_ATTR_ROW_STATUS_PTR|Points to the row status array filled by **SQLFetch**, **SQLFetchScroll**, **SQLBulkOperations**, and **SQLSetPos**. The following are implementation details:

- When an application sets this in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager caches its value. It passes this value to the ODBC 2.*x* driver in the *RowStatusArray* argument of **SQLExtendedFetch** when **SQLFetchScroll** or **SQLFetch** is called.
- When an application sets this in an ODBC 3*.x* driver, the ODBC 3*.x* Driver Manager passes the call to the driver.
- In state S6, if an application sets SQL_ATTR_ROW_STATUS_PTR and then calls **SQLBulkOperations** (with an *Operation* of SQL_ADD) or **SQLSetPos** without first calling **SQLFetch** or **SQLFetchScroll**, SQLSTATE HY011 (Attribute cannot be set now) is returned.| -|SQL_ATTR_ROWS_FETCHED_PTR|Points to the buffer in which **SQLFetch** and **SQLFetchScroll** return the number of rows fetched. The following are implementation details:

- When an application sets this in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager caches its value. It passes this value to the ODBC 2.*x* driver in the *RowCountPtr* argument of **SQLExtendedFetch** when **SQLFetch** or **SQLFetchScroll** is called by the application.
- When an application sets this in an ODBC 3*.x* driver, the ODBC 3*.x* Driver Manager passes the call to the driver.| -|SQL_ATTR_ROW_ARRAY_SIZE|Sets the rowset size. The following are implementation details:

- When an application sets this in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager maps it to the SQL_ROWSET_SIZE statement attribute.
- When an application sets this in an ODBC 3*.x* driver, the ODBC 3*.x* Driver Manager passes the call to the driver.
- When an application working with an ODBC 3*.x* driver calls **SQLSetScrollOptions**, SQL_ROWSET_SIZE is set to the value in the *RowsetSize* argument if the underlying driver does not support **SQLSetScrollOptions**.| -|SQL_ROWSET_SIZE|Sets the rowset size used by **SQLExtendedFetch** when **SQLExtendedFetch** is called by an ODBC 2*.x* application. The following are implementation details:

- When an application sets this, the ODBC 3*.x* Driver Manager passes the call to the driver, regardless of driver version.
- When an application working with an ODBC 2.*x* driver calls **SQLSetScrollOptions**, SQL_ROWSET_SIZE is set to the value in the **RowsetSize** argument.| -|**SQLBulkOperations**|Performs an insert operation, or update, delete, or fetch by bookmark operations. The following are implementation details:

- When an application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager maps it to **SQLSetPos** with an *Operation* of SQL_ADD.
- When working with an ODBC 2.*x* driver that does not support **SQLSetPos** with an *Operation* of SQL_ADD, the ODBC 3*.x* Driver Manager does not map **SQLSetPos** with an *Operation* of SQL_ADD to **SQLBulkOperations** with an *Operation* of SQL_ADD. This is because **SQLBulkOperations** cannot be called in state S7, which in ODBC 2.*x* was the only state in which **SQLSetPos** could be called.
- If the application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC 2.*x* driver before calling **SQLFetchScroll**, the ODBC 3*.x* Driver Manager returns an error.| -|**SQLExtendedFetch**|Returns the specified rowset. Except for the restriction just noted, the ODBC 3*.x* Driver Manager passes calls to **SQLExtendedFetch** to the driver, regardless of the driver version.| -|**SQLFetch**|Returns the next rowset. The following are implementation details:

- When an application calls **SQLFetch** in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager maps it to **SQLExtendedFetch**. The *FetchOrientation* argument of **SQLExtendedFetch** is set to SQL_FETCH_NEXT. The Driver Manager uses the cached value of the SQL_ATTR_ROW_STATUS_PTR statement attribute for the *RowStatusArray* argument and the cached value of the SQL_ATTR_ROWS_FETCHED_PTR statement attribute for the *RowCountPtr* argument.
- An ODBC 3*.x* application can mix calls to **SQLFetch** and **SQLFetchScroll** in an ODBC 2.*x* driver because the ODBC 3*.x* Driver Manager maps **SQLFetch** to **SQLExtendedFetch** when an application calls it in an ODBC 2.*x* driver.
- If an ODBC 2.*x* driver does not support **SQLExtendedFetch**, the ODBC 3*.x* Driver Manager does not map **SQLFetch** or **SQLFetchScroll** to **SQLExtendedFetch** when an application calls it in that driver. If the application attempts to set SQL_ATTR_ROW_ARRAY_SIZE to a value greater than 1, SQLSTATE HYC00 (Optional feature not implemented) is returned.
- Except for the restrictions just noted, the ODBC 3*.x* Driver Manager passes calls to **SQLFetch** to the driver, regardless of the driver version.| -|**SQLFetchScroll**|Returns the specified rowset. The following are implementation details:

- When an application calls **SQLFetchScroll** in an ODBC 2.*x* driver, the ODBC 3*.x* Driver Manager maps it to **SQLExtendedFetch**. It uses the cached value of the SQL_ATTR_ROW_STATUS_PTR statement attribute for the *RowStatusArray* argument and the cached value of the SQL_ATTR_ROWS_FETCHED_PTR statement attribute for the *RowCountPtr* argument. If the *FetchOrientation* argument in **SQLFetchScroll** is SQL_FETCH_BOOKMARK, it uses the cached value of the SQL_ATTR_FETCH_BOOKMARK_PTR statement attribute for the *FetchOffset* argument and returns an error if the *FetchOffset* argument of **SQLFetchScroll** is not 0.
- When an application calls this in an ODBC 3*.x* driver, the ODBC 3*.x* Driver Manager passes the call to the driver.| -|**SQLSetPos**|Performs various positioned operations. The ODBC 3*.x* Driver Manager passes calls to **SQLSetPos** to the driver, regardless of the driver version.| -|**SQLSetScrollOptions**|When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC 3*.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**.| +|SQL_ATTR_FETCH_BOOKMARK_PTR|Points to the bookmark to use with **SQLFetchScroll**. The following are implementation details:

- When an application sets this in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager caches it. It dereferences the pointer and passes the value to the ODBC *2.x* driver in the *FetchOffset* argument of **SQLExtendedFetch** when **SQLFetchScroll** is later called by the application.
- When an application sets this in an ODBC *3.x* driver, the ODBC *3.x* Driver Manager passes the call to the driver.| +|SQL_ATTR_ROW_STATUS_PTR|Points to the row status array filled by **SQLFetch**, **SQLFetchScroll**, **SQLBulkOperations**, and **SQLSetPos**. The following are implementation details:

- When an application sets this in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager caches its value. It passes this value to the ODBC *2.x* driver in the *RowStatusArray* argument of **SQLExtendedFetch** when **SQLFetchScroll** or **SQLFetch** is called.
- When an application sets this in an ODBC *3.x* driver, the ODBC *3.x* Driver Manager passes the call to the driver.
- In state S6, if an application sets SQL_ATTR_ROW_STATUS_PTR and then calls **SQLBulkOperations** (with an *Operation* of SQL_ADD) or **SQLSetPos** without first calling **SQLFetch** or **SQLFetchScroll**, SQLSTATE HY011 (Attribute cannot be set now) is returned.| +|SQL_ATTR_ROWS_FETCHED_PTR|Points to the buffer in which **SQLFetch** and **SQLFetchScroll** return the number of rows fetched. The following are implementation details:

- When an application sets this in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager caches its value. It passes this value to the ODBC *2.x* driver in the *RowCountPtr* argument of **SQLExtendedFetch** when **SQLFetch** or **SQLFetchScroll** is called by the application.
- When an application sets this in an ODBC *3.x* driver, the ODBC *3.x* Driver Manager passes the call to the driver.| +|SQL_ATTR_ROW_ARRAY_SIZE|Sets the rowset size. The following are implementation details:

- When an application sets this in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager maps it to the SQL_ROWSET_SIZE statement attribute.
- When an application sets this in an ODBC *3.x* driver, the ODBC *3.x* Driver Manager passes the call to the driver.
- When an application working with an ODBC *3.x* driver calls **SQLSetScrollOptions**, SQL_ROWSET_SIZE is set to the value in the *RowsetSize* argument if the underlying driver does not support **SQLSetScrollOptions**.| +|SQL_ROWSET_SIZE|Sets the rowset size used by **SQLExtendedFetch** when **SQLExtendedFetch** is called by an ODBC *2.x* application. The following are implementation details:

- When an application sets this, the ODBC *3.x* Driver Manager passes the call to the driver, regardless of driver version.
- When an application working with an ODBC *2.x* driver calls **SQLSetScrollOptions**, SQL_ROWSET_SIZE is set to the value in the **RowsetSize** argument.| +|**SQLBulkOperations**|Performs an insert operation, or update, delete, or fetch by bookmark operations. The following are implementation details:

- When an application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager maps it to **SQLSetPos** with an *Operation* of SQL_ADD.
- When working with an ODBC *2.x* driver that does not support **SQLSetPos** with an *Operation* of SQL_ADD, the ODBC *3.x* Driver Manager does not map **SQLSetPos** with an *Operation* of SQL_ADD to **SQLBulkOperations** with an *Operation* of SQL_ADD. This is because **SQLBulkOperations** cannot be called in state S7, which in ODBC *2.x* was the only state in which **SQLSetPos** could be called.
- If the application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC *2.x* driver before calling **SQLFetchScroll**, the ODBC *3.x* Driver Manager returns an error.| +|**SQLExtendedFetch**|Returns the specified rowset. Except for the restriction just noted, the ODBC *3.x* Driver Manager passes calls to **SQLExtendedFetch** to the driver, regardless of the driver version.| +|**SQLFetch**|Returns the next rowset. The following are implementation details:

- When an application calls **SQLFetch** in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager maps it to **SQLExtendedFetch**. The *FetchOrientation* argument of **SQLExtendedFetch** is set to SQL_FETCH_NEXT. The Driver Manager uses the cached value of the SQL_ATTR_ROW_STATUS_PTR statement attribute for the *RowStatusArray* argument and the cached value of the SQL_ATTR_ROWS_FETCHED_PTR statement attribute for the *RowCountPtr* argument.
- An ODBC *3.x* application can mix calls to **SQLFetch** and **SQLFetchScroll** in an ODBC *2.x* driver because the ODBC *3.x* Driver Manager maps **SQLFetch** to **SQLExtendedFetch** when an application calls it in an ODBC *2.x* driver.
- If an ODBC *2.x* driver does not support **SQLExtendedFetch**, the ODBC *3.x* Driver Manager does not map **SQLFetch** or **SQLFetchScroll** to **SQLExtendedFetch** when an application calls it in that driver. If the application attempts to set SQL_ATTR_ROW_ARRAY_SIZE to a value greater than 1, SQLSTATE HYC00 (Optional feature not implemented) is returned.
- Except for the restrictions just noted, the ODBC *3.x* Driver Manager passes calls to **SQLFetch** to the driver, regardless of the driver version.| +|**SQLFetchScroll**|Returns the specified rowset. The following are implementation details:

- When an application calls **SQLFetchScroll** in an ODBC *2.x* driver, the ODBC *3.x* Driver Manager maps it to **SQLExtendedFetch**. It uses the cached value of the SQL_ATTR_ROW_STATUS_PTR statement attribute for the *RowStatusArray* argument and the cached value of the SQL_ATTR_ROWS_FETCHED_PTR statement attribute for the *RowCountPtr* argument. If the *FetchOrientation* argument in **SQLFetchScroll** is SQL_FETCH_BOOKMARK, it uses the cached value of the SQL_ATTR_FETCH_BOOKMARK_PTR statement attribute for the *FetchOffset* argument and returns an error if the *FetchOffset* argument of **SQLFetchScroll** is not 0.
- When an application calls this in an ODBC *3.x* driver, the ODBC *3.x* Driver Manager passes the call to the driver.| +|**SQLSetPos**|Performs various positioned operations. The ODBC *3.x* Driver Manager passes calls to **SQLSetPos** to the driver, regardless of the driver version.| +|**SQLSetScrollOptions**|When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC *3.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**.| diff --git a/docs/odbc/reference/develop-app/affected-odbc-components.md b/docs/odbc/reference/develop-app/affected-odbc-components.md index afceee26992..d60a522c9a8 100644 --- a/docs/odbc/reference/develop-app/affected-odbc-components.md +++ b/docs/odbc/reference/develop-app/affected-odbc-components.md @@ -23,11 +23,11 @@ Backward compatibility describes how applications, the Driver Manager, and drive |Type|Version of DM|Version of application|Version of driver| |----------|-------------------|----------------------------|-----------------------| -|Backward Compatibility of Driver Manager|3*.x*|2.*x*|2.*x*| -|Backward Compatibility of Driver[1]|3*.x*|2.*x*|3.*x*| -|Backward Compatibility of Application|3.*x*|3.*x*|2.*x*| +|Backward Compatibility of Driver Manager|*3.x*|*2.x*|*2.x*| +|Backward Compatibility of Driver[1]|*3.x*|*2.x*|*3.x*| +|Backward Compatibility of Application|*3.x*|*3.x*|*2.x*| [1] The backward compatibility of drivers is primarily discussed in Appendix G: Driver Guidelines for Backward Compatibility. > [!NOTE] -> A standards-compliant application - for example, an application that has been written in accordance with the Open Group or ISO CLI standards - is guaranteed to work with an ODBC 3*.x* driver through the ODBC 3*.x* Driver Manager. It is assumed that the functionality that the application is using is available in the driver. It is also assumed that the standards-compliant application has been compiled with the ODBC 3*.x* header files. +> A standards-compliant application - for example, an application that has been written in accordance with the Open Group or ISO CLI standards - is guaranteed to work with an ODBC *3.x* driver through the ODBC *3.x* Driver Manager. It is assumed that the functionality that the application is using is available in the driver. It is also assumed that the standards-compliant application has been compiled with the ODBC *3.x* header files. diff --git a/docs/odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md b/docs/odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md index ee5d58428ce..4f989ea2fd0 100644 --- a/docs/odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md +++ b/docs/odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md @@ -17,7 +17,7 @@ ms.author: genemi manager: craigg --- # Backward Compatibility and Standards Compliance -Backward compatibility is the ability of newer ODBC components to work with old ODBC components. The following sections discuss how these components are affected by the changes in ODBC 3*.x*. The information contained in them primarily addresses the writing of an ODBC 3*.x* application and how backward compatibility issues are handled by ODBC drivers. For specific guidelines about how backward compatibility issues affect the writing of an ODBC 3*.x* driver, see [Appendix G: Driver Guidelines for Backward Compatibility](../../../odbc/reference/appendixes/appendix-g-driver-guidelines-for-backward-compatibility.md). +Backward compatibility is the ability of newer ODBC components to work with old ODBC components. The following sections discuss how these components are affected by the changes in ODBC *3.x*. The information contained in them primarily addresses the writing of an ODBC *3.x* application and how backward compatibility issues are handled by ODBC drivers. For specific guidelines about how backward compatibility issues affect the writing of an ODBC *3.x* driver, see [Appendix G: Driver Guidelines for Backward Compatibility](../../../odbc/reference/appendixes/appendix-g-driver-guidelines-for-backward-compatibility.md). This section contains the following topics. diff --git a/docs/odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md b/docs/odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md index 2c2d58b0b34..27520214b9a 100644 --- a/docs/odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md +++ b/docs/odbc/reference/develop-app/block-cursors-scrollable-backward-compatibility-odbc-3-x-applications.md @@ -19,23 +19,23 @@ ms.author: genemi manager: craigg --- # Block Cursors, Scrollable Cursors, and Backward Compatibility for ODBC 3.x Applications -The existence of both **SQLFetchScroll** and **SQLExtendedFetch** represents the first clear split in ODBC between the Application Programming Interface (API), which is the set of functions the application calls, and the Service Provider Interface (SPI), which is the set of functions the driver implements. This split is required to balance the requirement in ODBC 3.*x*, which uses **SQLFetchScroll**, to align with the standards and be compatible with ODBC 2.*x*, which uses **SQLExtendedFetch**. +The existence of both **SQLFetchScroll** and **SQLExtendedFetch** represents the first clear split in ODBC between the Application Programming Interface (API), which is the set of functions the application calls, and the Service Provider Interface (SPI), which is the set of functions the driver implements. This split is required to balance the requirement in ODBC *3.x*, which uses **SQLFetchScroll**, to align with the standards and be compatible with ODBC *2.x*, which uses **SQLExtendedFetch**. - The ODBC 3*.x* API, which is the set of functions the application calls, includes **SQLFetchScroll** and related statement attributes. The ODBC 3*.x* SPI, which is the set of functions the driver implements, includes **SQLFetchScroll**, **SQLExtendedFetch**, and related statement attributes. Because ODBC does not formally enforce this split between the API and the SPI, it is possible for ODBC 3*.x* applications to call **SQLExtendedFetch** and related statement attributes. However, there is no reason for ODBC 3*.x* applications to do this. For more information about APIs and SPIs, see the introduction to [ODBC Architecture](../../../odbc/reference/odbc-architecture.md). + The ODBC *3.x* API, which is the set of functions the application calls, includes **SQLFetchScroll** and related statement attributes. The ODBC *3.x* SPI, which is the set of functions the driver implements, includes **SQLFetchScroll**, **SQLExtendedFetch**, and related statement attributes. Because ODBC does not formally enforce this split between the API and the SPI, it is possible for ODBC *3.x* applications to call **SQLExtendedFetch** and related statement attributes. However, there is no reason for ODBC *3.x* applications to do this. For more information about APIs and SPIs, see the introduction to [ODBC Architecture](../../../odbc/reference/odbc-architecture.md). - For information about how the ODBC 3.*x* Driver Manager maps calls to ODBC 2.*x* and ODBC 3.*x* drivers, and what functions and statement attributes an ODBC 3.*x* driver should implement for block and scrollable cursors, see [What the Driver Does](../../../odbc/reference/appendixes/what-the-driver-does.md) in Appendix G: Driver Guidelines for Backward Compatibility. + For information about how the ODBC *3.x* Driver Manager maps calls to ODBC *2.x* and ODBC *3.x* drivers, and what functions and statement attributes an ODBC *3.x* driver should implement for block and scrollable cursors, see [What the Driver Does](../../../odbc/reference/appendixes/what-the-driver-does.md) in Appendix G: Driver Guidelines for Backward Compatibility. - The following table summarizes what functions and statement attributes an ODBC 3.*x* application should use with block and scrollable cursors. It also lists changes between ODBC 2.*x* and ODBC 3.*x* in this area that ODBC 3.*x* applications should be aware of to be compatible with ODBC 2.*x* drivers. + The following table summarizes what functions and statement attributes an ODBC *3.x* application should use with block and scrollable cursors. It also lists changes between ODBC *2.x* and ODBC *3.x* in this area that ODBC *3.x* applications should be aware of to be compatible with ODBC *2.x* drivers. |Function or

statement attribute|Comments| |-----------------------------------------|--------------| -|SQL_ATTR_FETCH_BOOKMARK_PTR|Points to the bookmark to use with **SQLFetchScroll**.

When an application sets this in an ODBC 2.*x* driver, this must point to a fixed-length bookmark.| -|SQL_ATTR_ROW_STATUS_PTR|Points to the row status array filled by **SQLFetch**, **SQLFetchScroll**, **SQLBulkOperations**, and **SQLSetPos**.

If an application sets this in an ODBC 2.*x* driver and calls **SQLBulkOperation** with an *Operation* of SQL_ADD before calling **SQLFetchScroll**, **SQLFetch**, or **SQLExtendedFetch**, SQLSTATE HY011 (Attribute cannot be set now) is returned.

When an application calls **SQLFetch** in an ODBC 2.*x* driver, **SQLFetch** is mapped to **SQLExtendedFetch** and therefore returns values in this array.| -|SQL_ATTR_ROWS_FETCHED_PTR|Points to the buffer in which **SQLFetch** and **SQLFetchScroll** return the number of rows fetched.

When an application calls **SQLFetch** in an ODBC 2.*x* driver, **SQLFetch** is mapped to **SQLExtendedFetch** and therefore returns a value in this buffer.| -|SQL_ATTR_ROW_ARRAY_SIZE|Sets the rowset size.

If an application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC 2.*x* driver, SQL_ROWSET_SIZE will be used for the call, not SQL_ATTR_ROW_ARRAY_SIZE, because the call is mapped to **SQLSetPos** with an *Operation* of SQL_ADD, which uses SQL_ROWSET_SIZE.

Calling **SQLSetPos** with an *Operation* of SQL_ADD or **SQLExtendedFetch** in an ODBC 2.*x* driver uses SQL_ROWSET_SIZE.

Calling **SQLFetch** or **SQLFetchScroll** in an ODBC 2.*x* driver uses SQL_ATTR_ROW_ARRAY_SIZE.| -|**SQLBulkOperations**|Performs insert and bookmark operations. When **SQLBulkOperations** with an *Operation* of SQL_ADD is called in an ODBC 2.*x* driver, it is mapped to **SQLSetPos** with an *Operation* of SQL_ADD. The following are implementation details:

- When working with an ODBC 2.*x* driver, an application must use only the implicitly allocated ARD associated with the *StatementHandle*; it cannot allocate another ARD for adding rows, because explicit descriptor operations are not supported in an ODBC 2.*x* driver. An application must use **SQLBindCol** to bind to the ARD, not **SQLSetDescField** or **SQLSetDescRec**.
- When calling an ODBC 3.*x* driver, an application can call **SQLBulkOperations** with an *Operation* of SQL_ADD before calling **SQLFetch** or **SQLFetchScroll**. When calling an ODBC 2.*x* driver, an application must call **SQLFetchScroll** before calling **SQLBulkOperations** with an Operation of SQL_ADD.| -|**SQLFetch**|Returns the next rowset. The following are implementation details:

- When an application calls **SQLFetch** in an ODBC 2.*x* driver, it is mapped to **SQLExtendedFetch**.
- When an application calls **SQLFetch** in an ODBC 3.*x* driver, it returns the number of rows specified with the SQL_ATTR_ROW_ARRAY_SIZE statement attribute.| -|**SQLFetchScroll**|Returns the specified rowset. The following are implementation details:

- When an application calls **SQLFetchScroll** in an ODBC 2.*x* driver, it returns SQLSTATE 01S01 (Error in row) before each error that applies to a single row. It does this only because the ODBC 3*.x* Driver Manager maps this to **SQLExtendedFetch** and **SQLExtendedFetch** returns this SQLSTATE. When an application calls **SQLFetchScroll** in an ODBC 3.*x* driver, it never returns SQLSTATE 01S01 (Error in row).
- When an application calls **SQLFetchScroll** in an ODBC 2.*x* driver with *FetchOrientation* set to SQL_FETCH_BOOKMARK, the *FetchOffset* argument must be set to 0. SQLSTATE HYC00 (Optional feature not implemented) is returned if offset-based bookmark fetching is attempted with an ODBC 2.*x* driver.| +|SQL_ATTR_FETCH_BOOKMARK_PTR|Points to the bookmark to use with **SQLFetchScroll**.

When an application sets this in an ODBC *2.x* driver, this must point to a fixed-length bookmark.| +|SQL_ATTR_ROW_STATUS_PTR|Points to the row status array filled by **SQLFetch**, **SQLFetchScroll**, **SQLBulkOperations**, and **SQLSetPos**.

If an application sets this in an ODBC *2.x* driver and calls **SQLBulkOperation** with an *Operation* of SQL_ADD before calling **SQLFetchScroll**, **SQLFetch**, or **SQLExtendedFetch**, SQLSTATE HY011 (Attribute cannot be set now) is returned.

When an application calls **SQLFetch** in an ODBC *2.x* driver, **SQLFetch** is mapped to **SQLExtendedFetch** and therefore returns values in this array.| +|SQL_ATTR_ROWS_FETCHED_PTR|Points to the buffer in which **SQLFetch** and **SQLFetchScroll** return the number of rows fetched.

When an application calls **SQLFetch** in an ODBC *2.x* driver, **SQLFetch** is mapped to **SQLExtendedFetch** and therefore returns a value in this buffer.| +|SQL_ATTR_ROW_ARRAY_SIZE|Sets the rowset size.

If an application calls **SQLBulkOperations** with an *Operation* of SQL_ADD in an ODBC *2.x* driver, SQL_ROWSET_SIZE will be used for the call, not SQL_ATTR_ROW_ARRAY_SIZE, because the call is mapped to **SQLSetPos** with an *Operation* of SQL_ADD, which uses SQL_ROWSET_SIZE.

Calling **SQLSetPos** with an *Operation* of SQL_ADD or **SQLExtendedFetch** in an ODBC *2.x* driver uses SQL_ROWSET_SIZE.

Calling **SQLFetch** or **SQLFetchScroll** in an ODBC *2.x* driver uses SQL_ATTR_ROW_ARRAY_SIZE.| +|**SQLBulkOperations**|Performs insert and bookmark operations. When **SQLBulkOperations** with an *Operation* of SQL_ADD is called in an ODBC *2.x* driver, it is mapped to **SQLSetPos** with an *Operation* of SQL_ADD. The following are implementation details:

- When working with an ODBC *2.x* driver, an application must use only the implicitly allocated ARD associated with the *StatementHandle*; it cannot allocate another ARD for adding rows, because explicit descriptor operations are not supported in an ODBC *2.x* driver. An application must use **SQLBindCol** to bind to the ARD, not **SQLSetDescField** or **SQLSetDescRec**.
- When calling an ODBC *3.x* driver, an application can call **SQLBulkOperations** with an *Operation* of SQL_ADD before calling **SQLFetch** or **SQLFetchScroll**. When calling an ODBC *2.x* driver, an application must call **SQLFetchScroll** before calling **SQLBulkOperations** with an Operation of SQL_ADD.| +|**SQLFetch**|Returns the next rowset. The following are implementation details:

- When an application calls **SQLFetch** in an ODBC *2.x* driver, it is mapped to **SQLExtendedFetch**.
- When an application calls **SQLFetch** in an ODBC *3.x* driver, it returns the number of rows specified with the SQL_ATTR_ROW_ARRAY_SIZE statement attribute.| +|**SQLFetchScroll**|Returns the specified rowset. The following are implementation details:

- When an application calls **SQLFetchScroll** in an ODBC *2.x* driver, it returns SQLSTATE 01S01 (Error in row) before each error that applies to a single row. It does this only because the ODBC *3.x* Driver Manager maps this to **SQLExtendedFetch** and **SQLExtendedFetch** returns this SQLSTATE. When an application calls **SQLFetchScroll** in an ODBC *3.x* driver, it never returns SQLSTATE 01S01 (Error in row).
- When an application calls **SQLFetchScroll** in an ODBC *2.x* driver with *FetchOrientation* set to SQL_FETCH_BOOKMARK, the *FetchOffset* argument must be set to 0. SQLSTATE HYC00 (Optional feature not implemented) is returned if offset-based bookmark fetching is attempted with an ODBC *2.x* driver.| > [!NOTE] -> ODBC 3.*x* applications should not use **SQLExtendedFetch** or the SQL_ROWSET_SIZE statement attribute. Instead, they should use **SQLFetchScroll** and the SQL_ATTR_ROW_ARRAY_SIZE statement attribute. ODBC 3.*x* applications should not use **SQLSetPos** with an *Operation* of SQL_ADD but should use **SQLBulkOperations** with an *Operation* of SQL_ADD. +> ODBC *3.x* applications should not use **SQLExtendedFetch** or the SQL_ROWSET_SIZE statement attribute. Instead, they should use **SQLFetchScroll** and the SQL_ATTR_ROW_ARRAY_SIZE statement attribute. ODBC *3.x* applications should not use **SQLSetPos** with an *Operation* of SQL_ADD but should use **SQLBulkOperations** with an *Operation* of SQL_ADD. diff --git a/docs/odbc/reference/develop-app/bookmark-types.md b/docs/odbc/reference/develop-app/bookmark-types.md index 77ad88c0dd8..60879fd76c2 100644 --- a/docs/odbc/reference/develop-app/bookmark-types.md +++ b/docs/odbc/reference/develop-app/bookmark-types.md @@ -18,8 +18,8 @@ ms.author: genemi manager: craigg --- # Bookmark Types -All bookmarks in ODBC 3*.x* are variable-length bookmarks. This allows a primary key or a unique index associated with a table to be used as a bookmark. The bookmark also can be a 32-bit value, as was used in ODBC 2.*x*. To specify that a bookmark is used with a cursor, an ODBC 3*.x* application sets the SQL_ATTR_USE_BOOKMARK statement attribute to SQL_UB_VARIABLE. A variable-length bookmark is automatically used. +All bookmarks in ODBC *3.x* are variable-length bookmarks. This allows a primary key or a unique index associated with a table to be used as a bookmark. The bookmark also can be a 32-bit value, as was used in ODBC *2.x*. To specify that a bookmark is used with a cursor, an ODBC *3.x* application sets the SQL_ATTR_USE_BOOKMARK statement attribute to SQL_UB_VARIABLE. A variable-length bookmark is automatically used. An application can call **SQLColAttribute** with the *FieldIdentifier* argument set to SQL_DESC_OCTET_LENGTH to obtain the length of the bookmark. Because a variable-length bookmark can be a long value, an application should not bind to column 0 unless it will use the bookmark for many of the rows in the rowset. - Fixed-length bookmarks are supported only for backward compatibility. If an ODBC 2.*x* application working with an ODBC 3*.x* driver calls **SQLSetStmtOption** to set SQL_USE_BOOKMARKS to SQL_UB_ON, it is mapped in the Driver Manager to SQL_UB_VARIABLE. A variable-length bookmark is used, even if only 32 bits of it are populated. If a driver supports fixed-length bookmarks, it will support variable-length bookmarks. If an ODBC 3*.x* application working with an ODBC 2.*x* driver calls **SQLSetStmtAttr** to set SQL_ATTR_USE_BOOKMARKS to SQL_UB_VARIABLE, it is mapped in the Driver Manager to SQL_UB_ON and a 32-bit fixed-length bookmark is used. The SQL_ATTR_FETCH_BOOKMARK_PTR statement attribute must then point to a 32-bit bookmark. If the bookmarks used are longer than 32 bits, such as when primary keys are used as bookmarks, the cursor must map the actual values to 32-bit values. It could, for example, build a hash table of them. When an ODBC 3*.x* application working with an ODBC 2.*x* driver binds a bookmark, the buffer length must be 4. + Fixed-length bookmarks are supported only for backward compatibility. If an ODBC *2.x* application working with an ODBC *3.x* driver calls **SQLSetStmtOption** to set SQL_USE_BOOKMARKS to SQL_UB_ON, it is mapped in the Driver Manager to SQL_UB_VARIABLE. A variable-length bookmark is used, even if only 32 bits of it are populated. If a driver supports fixed-length bookmarks, it will support variable-length bookmarks. If an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLSetStmtAttr** to set SQL_ATTR_USE_BOOKMARKS to SQL_UB_VARIABLE, it is mapped in the Driver Manager to SQL_UB_ON and a 32-bit fixed-length bookmark is used. The SQL_ATTR_FETCH_BOOKMARK_PTR statement attribute must then point to a 32-bit bookmark. If the bookmarks used are longer than 32 bits, such as when primary keys are used as bookmarks, the cursor must map the actual values to 32-bit values. It could, for example, build a hash table of them. When an ODBC *3.x* application working with an ODBC *2.x* driver binds a bookmark, the buffer length must be 4. diff --git a/docs/odbc/reference/develop-app/c-data-types-in-odbc.md b/docs/odbc/reference/develop-app/c-data-types-in-odbc.md index b69da634d03..b814fe6a4e8 100644 --- a/docs/odbc/reference/develop-app/c-data-types-in-odbc.md +++ b/docs/odbc/reference/develop-app/c-data-types-in-odbc.md @@ -21,7 +21,7 @@ ODBC defines the C data types that are used by application variables and their c ODBC also defines a default mapping from each SQL data type to a C data type. For example, a 2-byte integer in the data source is mapped to a 2-byte integer in the application. To use the default mapping, an application specifies the SQL_C_DEFAULT type identifier. However, use of this identifier is discouraged for interoperability reasons. - All integer C data types defined in ODBC 1*.x* were signed. Unsigned C data types and their corresponding type identifiers were added in ODBC 2.0. Because of this, applications and drivers need to be particularly careful when dealing with 1*.x* versions. + All integer C data types defined in ODBC *1.x* were signed. Unsigned C data types and their corresponding type identifiers were added in ODBC 2.0. Because of this, applications and drivers need to be particularly careful when dealing with *1.x* versions. ## C Data Type Extensibility In ODBC 3.8, you can specify driver-specific C data types. This enables you to bind a SQL type as a driver-specific C type in ODBC applications when you call [SQLBindCol](../../../odbc/reference/syntax/sqlbindcol-function.md), [SQLGetData](../../../odbc/reference/syntax/sqlgetdata-function.md), or [SQLBindParameter](../../../odbc/reference/syntax/sqlbindparameter-function.md). This can be useful for supporting new server types, because existing C data types might not correctly represent the new server data types. Using driver-specific C types can increase the number of conversions that drivers can perform. diff --git a/docs/odbc/reference/develop-app/calling-sqlclosecursor.md b/docs/odbc/reference/develop-app/calling-sqlclosecursor.md index 53ba29e6621..d3c18975f1d 100644 --- a/docs/odbc/reference/develop-app/calling-sqlclosecursor.md +++ b/docs/odbc/reference/develop-app/calling-sqlclosecursor.md @@ -19,4 +19,4 @@ ms.author: genemi manager: craigg --- # Calling SQLCloseCursor -Because **SQLCloseCursor** is almost the same as **SQLFreeStmt** with SQL_CLOSE, the Driver Manager does not map this function. Replacement functions are mapped so that existing ODBC 2*.x* applications can easily move to ODBC 3.*x* by using the new functions. Such a move makes it easier for such applications to begin using new ODBC 3.*x* functionality inside of conditional code in a modular fashion. **SQLCloseCursor** does not represent any new functionality. An application does not gain any advantage by moving to **SQLCloseCursor** from **SQLFreeStmt** with SQL_CLOSE. +Because **SQLCloseCursor** is almost the same as **SQLFreeStmt** with SQL_CLOSE, the Driver Manager does not map this function. Replacement functions are mapped so that existing ODBC *2.x* applications can easily move to ODBC *3.x* by using the new functions. Such a move makes it easier for such applications to begin using new ODBC *3.x* functionality inside of conditional code in a modular fashion. **SQLCloseCursor** does not represent any new functionality. An application does not gain any advantage by moving to **SQLCloseCursor** from **SQLFreeStmt** with SQL_CLOSE. diff --git a/docs/odbc/reference/develop-app/calling-sqlgetdiagfield.md b/docs/odbc/reference/develop-app/calling-sqlgetdiagfield.md index 087a09ff5fd..84e75d8b809 100644 --- a/docs/odbc/reference/develop-app/calling-sqlgetdiagfield.md +++ b/docs/odbc/reference/develop-app/calling-sqlgetdiagfield.md @@ -19,4 +19,4 @@ ms.author: genemi manager: craigg --- # Calling SQLGetDiagField -When an ODBC 3.*x* application calls **SQLGetDiagField** in an ODBC 2*.x* driver, the driver will return SQL_SUCCESS and the appropriate information in *\*DiagInfoPtr* if the *DiagIdentifier* argument is SQL_DIAG_CLASS_ORIGIN, SQL_DIAG_CLASS_SUBCLASS_ORIGIN, SQL_DIAG_CONNECTION_NAME, SQL_DIAG_MESSAGE_TEXT, SQL_DIAG_NATIVE, SQL_DIAG_NUMBER, SQL_DIAG_RETURNCODE, SQL_DIAG_SERVER_NAME, or SQL_DIAG_SQLSTATE. All other diagnostic fields will return SQL_ERROR. +When an ODBC *3.x* application calls **SQLGetDiagField** in an ODBC *2.x* driver, the driver will return SQL_SUCCESS and the appropriate information in *\*DiagInfoPtr* if the *DiagIdentifier* argument is SQL_DIAG_CLASS_ORIGIN, SQL_DIAG_CLASS_SUBCLASS_ORIGIN, SQL_DIAG_CONNECTION_NAME, SQL_DIAG_MESSAGE_TEXT, SQL_DIAG_NATIVE, SQL_DIAG_NUMBER, SQL_DIAG_RETURNCODE, SQL_DIAG_SERVER_NAME, or SQL_DIAG_SQLSTATE. All other diagnostic fields will return SQL_ERROR. diff --git a/docs/odbc/reference/develop-app/calling-sqlsetpos.md b/docs/odbc/reference/develop-app/calling-sqlsetpos.md index 50210647732..f7df8663471 100644 --- a/docs/odbc/reference/develop-app/calling-sqlsetpos.md +++ b/docs/odbc/reference/develop-app/calling-sqlsetpos.md @@ -19,7 +19,7 @@ ms.author: genemi manager: craigg --- # Calling SQLSetPos -In ODBC 2.*x*, the pointer to the row status array was an argument to **SQLExtendedFetch**. The row status array was later updated by a call to **SQLSetPos**. Some drivers have relied on the fact that this array does not change between **SQLExtendedFetch** and **SQLSetPos**. In ODBC 3.*x*, the pointer to the status array is a descriptor field and therefore the application can easily change it to point to a different array. This can be a problem when an ODBC 3.*x* application is working with an ODBC 2.*x* driver but is calling **SQLSetStmtAttr** to set the array status pointer and is calling **SQLFetchScroll** to fetch data. The Driver Manager maps it as a sequence of calls to **SQLExtendedFetch**. In the following code, an error would normally be raised when the Driver Manager maps the second **SQLSetStmtAttr** call when working with an ODBC 2*.x* driver: +In ODBC *2.x*, the pointer to the row status array was an argument to **SQLExtendedFetch**. The row status array was later updated by a call to **SQLSetPos**. Some drivers have relied on the fact that this array does not change between **SQLExtendedFetch** and **SQLSetPos**. In ODBC *3.x*, the pointer to the status array is a descriptor field and therefore the application can easily change it to point to a different array. This can be a problem when an ODBC *3.x* application is working with an ODBC *2.x* driver but is calling **SQLSetStmtAttr** to set the array status pointer and is calling **SQLFetchScroll** to fetch data. The Driver Manager maps it as a sequence of calls to **SQLExtendedFetch**. In the following code, an error would normally be raised when the Driver Manager maps the second **SQLSetStmtAttr** call when working with an ODBC *2.x* driver: ``` SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, rgfRowStatus, 0); @@ -28,7 +28,7 @@ SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, rgfRowStat1, 0); SQLSetPos(hstmt, iRow, fOption, fLock); ``` - The error would be raised if there were no way to change the row status pointer in ODBC 2.*x* between calls to **SQLExtendedFetch**. Instead, the Driver Manager performs the following steps when working with an ODBC 2*.x* driver: + The error would be raised if there were no way to change the row status pointer in ODBC *2.x* between calls to **SQLExtendedFetch**. Instead, the Driver Manager performs the following steps when working with an ODBC *2.x* driver: 1. Initializes an internal Driver Manager flag *fSetPosError* to TRUE. diff --git a/docs/odbc/reference/develop-app/compatibility-matrix.md b/docs/odbc/reference/develop-app/compatibility-matrix.md index 018ff5fc7f4..e803b86b5b0 100644 --- a/docs/odbc/reference/develop-app/compatibility-matrix.md +++ b/docs/odbc/reference/develop-app/compatibility-matrix.md @@ -23,12 +23,12 @@ manager: craigg # Compatibility Matrix The following table describes the compatibility of the types of applications and drivers defined previously in this section. -|Application type

and version|32-bit ODBC

2.*x* driver|ODBC 3.*x*

driver|ODBC 3.8 driver|ISO and Open Group-compliant driver| +|Application type

and version|32-bit ODBC

*2.x* driver|ODBC *3.x*

driver|ODBC 3.8 driver|ISO and Open Group-compliant driver| |--------------------------------------|-----------------------------------|---------------------------|---------------------|-----------------------------------------| |16-bit application, any version|Compatible|Compatible|Compatible|Compatible| -|Pure 2.*x* application|Compatible|Compatible|Compatible|Not compatible[3]| -|Pure 2.*x* recompiled application|Compatible|Compatible[1]|Compatible[1]|Not compatible[3]| -|Pure 2.*x* Unicode application|Compatible|Compatible[1]|Compatible[1]|Not Compatible[3]| +|Pure *2.x* application|Compatible|Compatible|Compatible|Not compatible[3]| +|Pure *2.x* recompiled application|Compatible|Compatible[1]|Compatible[1]|Not compatible[3]| +|Pure *2.x* Unicode application|Compatible|Compatible[1]|Compatible[1]|Not Compatible[3]| |Pure Open Group and ISO-compliant application|Not compatible|Compatible[2]|Compatible[2]|Compatible[2]| |Pure 3.0 application|Not compatible|Compatible|Compatible|Not compatible[4]| |Pure 3.5 application|Not compatible|Compatible|Compatible|Not compatible[4]| @@ -39,9 +39,9 @@ The following table describes the compatibility of the types of applications and [2] The application must compile using ODBC 3.5 (or higher)headers and link with the ODBC Driver Manager. It must also set the header flag ODBC_STD. - [3] This configuration can potentially fail to work because there are features in ODBC 2.*x* that are not in the standards, such as bookmarks. + [3] This configuration can potentially fail to work because there are features in ODBC *2.x* that are not in the standards, such as bookmarks. - [4] This configuration can potentially fail to work because there are features in ODBC 3*.x* that are not in the standards, such as bookmarks. + [4] This configuration can potentially fail to work because there are features in ODBC *3.x* that are not in the standards, such as bookmarks. [5] This configuration can potentially fail because there are features in ODBC 3.8 that are not in ODBC 2.x or 3.x drivers, such as driver-specific [C Data Types in ODBC](../../../odbc/reference/develop-app/c-data-types-in-odbc.md). diff --git a/docs/odbc/reference/develop-app/cursor-library-operations.md b/docs/odbc/reference/develop-app/cursor-library-operations.md index 41b07155183..0f12ef7231b 100644 --- a/docs/odbc/reference/develop-app/cursor-library-operations.md +++ b/docs/odbc/reference/develop-app/cursor-library-operations.md @@ -23,4 +23,4 @@ manager: craigg > [!IMPORTANT] > This feature will be removed in a future version of Windows. Avoid using this feature in new development work and plan to modify applications that currently use this feature. Microsoft recommends using the driver's cursor functionality. - If an application working with an ODBC 2*.x* driver makes calls to the ODBC 3.*x* cursor library, the application might be able to use ODBC 3.*x* features that are not supported by the ODBC 2*.x* driver. An application writer should be careful how these features are used, however. Use of the ODBC 3.*x* cursor library does not make an ODBC 2*.x* driver into an ODBC 3.*x* driver. + If an application working with an ODBC *2.x* driver makes calls to the ODBC *3.x* cursor library, the application might be able to use ODBC *3.x* features that are not supported by the ODBC *2.x* driver. An application writer should be careful how these features are used, however. Use of the ODBC *3.x* cursor library does not make an ODBC *2.x* driver into an ODBC *3.x* driver. diff --git a/docs/odbc/reference/develop-app/datetime-data-type-changes.md b/docs/odbc/reference/develop-app/datetime-data-type-changes.md index 189602eb18d..24d65dc28b6 100644 --- a/docs/odbc/reference/develop-app/datetime-data-type-changes.md +++ b/docs/odbc/reference/develop-app/datetime-data-type-changes.md @@ -20,15 +20,15 @@ ms.author: genemi manager: craigg --- # Datetime Data Type Changes -In ODBC 3.*x*, the identifiers for date, time, and timestamp SQL data types have changed from SQL_DATE, SQL_TIME, and SQL_TIMESTAMP (with instances of **#define** in the header file of 9, 10, and 11) to SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP (with instances of **#define** in the header file of 91, 92, and 93), respectively. The corresponding C type identifiers have changed from SQL_C_DATE, SQL_C_TIME, and SQL_C_TIMESTAMP to SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, and SQL_C_TYPE_TIMESTAMP, respectively. +In ODBC *3.x*, the identifiers for date, time, and timestamp SQL data types have changed from SQL_DATE, SQL_TIME, and SQL_TIMESTAMP (with instances of **#define** in the header file of 9, 10, and 11) to SQL_TYPE_DATE, SQL_TYPE_TIME, and SQL_TYPE_TIMESTAMP (with instances of **#define** in the header file of 91, 92, and 93), respectively. The corresponding C type identifiers have changed from SQL_C_DATE, SQL_C_TIME, and SQL_C_TIMESTAMP to SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, and SQL_C_TYPE_TIMESTAMP, respectively. - The column size and decimal digits returned for the SQL datetime data types in ODBC 3.*x* are the same as the precision and scale returned for them in ODBC 2.*x*. These values are different than the values in the SQL_DESC_PRECISION and SQL_DESC_SCALE descriptor fields. (For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md).) + The column size and decimal digits returned for the SQL datetime data types in ODBC *3.x* are the same as the precision and scale returned for them in ODBC *2.x*. These values are different than the values in the SQL_DESC_PRECISION and SQL_DESC_SCALE descriptor fields. (For more information, see [Column Size, Decimal Digits, Transfer Octet Length, and Display Size](../../../odbc/reference/appendixes/column-size-decimal-digits-transfer-octet-length-and-display-size.md).) These changes affect **SQLDescribeCol**, **SQLDescribeParam**, and **SQLColAttribute**; **SQLBindCol**, **SQLBindParameter**, and **SQLGetData**; and **SQLColumns**, **SQLGetTypeInfo**, **SQLProcedureColumns**, **SQLStatistics**, and **SQLSpecialColumns**. - The following table shows how the ODBC 3*.x* Driver Manager performs mapping of the date, time, and timestamp C data types entered in the *TargetType* arguments of **SQLBindCol** and **SQLGetData** or in the *ValueType* argument of **SQLBindParameter**. + The following table shows how the ODBC *3.x* Driver Manager performs mapping of the date, time, and timestamp C data types entered in the *TargetType* arguments of **SQLBindCol** and **SQLGetData** or in the *ValueType* argument of **SQLBindParameter**. -|Data type

code entered|2.*x* app to

2.*x* driver|2.*x* app to

3.*x* driver|3.*x* app to

2.*x* driver|3.*x* app to

3.*x* driver| +|Data type

code entered|*2.x* app to

*2.x* driver|*2.x* app to

*3.x* driver|*3.x* app to

*2.x* driver|*3.x* app to

*3.x* driver| |--------------------------------|-----------------------------------|-----------------------------------|-----------------------------------|-----------------------------------| |SQL_C_DATE (9)|No mapping|SQL_C_TYPE_DATE (91)|No mapping[1]|SQL_C_TYPE_DATE (91)| |SQL_C_TYPE_DATE (91)|Error (from DM)|Error (from DM)|SQL_C_DATE (9)|No mapping[2]| @@ -37,13 +37,13 @@ In ODBC 3.*x*, the identifiers for date, time, and timestamp SQL data types have |SQL_C_TIMESTAMP (11)|No mapping|SQL_C_TYPE_TIMESTAMP (93)|No mapping[1]|SQL_C_TYPE_TIMESTAMP (93)| |SQL_C_TYPE_TIMESTAMP (93)|Error (from DM)|Error (from DM)|SQL_C_TIMESTAMP (11)|No mapping[2]| - [1] As a result of this, an ODBC 3.*x* application working with an ODBC 2.*x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. + [1] As a result of this, an ODBC *3.x* application working with an ODBC *2.x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. - [2] As a result of this, an ODBC 3.*x* application working with an ODBC 3.*x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. + [2] As a result of this, an ODBC *3.x* application working with an ODBC *3.x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. - The following table shows how the ODBC 3*.x* Driver Manager performs mapping of the date, time, and timestamp SQL data types entered in the *ParameterType* argument of **SQLBindParameter** or in the *DataType* argument of **SQLGetTypeInfo**. + The following table shows how the ODBC *3.x* Driver Manager performs mapping of the date, time, and timestamp SQL data types entered in the *ParameterType* argument of **SQLBindParameter** or in the *DataType* argument of **SQLGetTypeInfo**. -|Data type

code entered|2.*x* app to

2.*x* driver|2.*x* app to

3.*x* driver|3.*x* app to

2.*x* driver|3.*x* app to

3.*x* driver| +|Data type

code entered|*2.x* app to

*2.x* driver|*2.x* app to

*3.x* driver|*3.x* app to

*2.x* driver|*3.x* app to

*3.x* driver| |--------------------------------|-----------------------------------|-----------------------------------|-----------------------------------|-----------------------------------| |SQL_DATE (9)|No mapping|SQL_TYPE_DATE (91)|No mapping[1]|SQL_TYPE_DATE (91)| |SQL_TYPE_DATE (91)|Error (from DM)|Error (from DM)|SQL_DATE (9)|No mapping[2]| @@ -52,6 +52,6 @@ In ODBC 3.*x*, the identifiers for date, time, and timestamp SQL data types have |SQL_TIMESTAMP (11)|No mapping|SQL_TYPE_TIMESTAMP (93)|No mapping[1]|SQL_TYPE_TIMESTAMP (93)| |SQL_TYPE_TIMESTAMP (93)|Error (from DM)|Error (from DM)|SQL_TIMESTAMP (11)|No mapping[2]| - [1] As a result of this, an ODBC 3.*x* application working with an ODBC 2.*x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. + [1] As a result of this, an ODBC *3.x* application working with an ODBC *2.x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. - [2] As a result of this, an ODBC 3.*x* application working with an ODBC 3.*x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. + [2] As a result of this, an ODBC *3.x* application working with an ODBC *3.x* driver can use the date, time, or timestamp codes returned in the result sets that are returned by the catalog functions. diff --git a/docs/odbc/reference/develop-app/declaring-the-application-s-odbc-version.md b/docs/odbc/reference/develop-app/declaring-the-application-s-odbc-version.md index 40283d4da9f..0954b32b559 100644 --- a/docs/odbc/reference/develop-app/declaring-the-application-s-odbc-version.md +++ b/docs/odbc/reference/develop-app/declaring-the-application-s-odbc-version.md @@ -20,13 +20,13 @@ ms.author: genemi manager: craigg --- # Declaring the Application's ODBC Version -Before an application allocates a connection, it must set the SQL_ATTR_ODBC_VERSION environment attribute. This attribute states that the application follows the ODBC 2.*x* or ODBC 3.*x* specification when using the following items: +Before an application allocates a connection, it must set the SQL_ATTR_ODBC_VERSION environment attribute. This attribute states that the application follows the ODBC *2.x* or ODBC *3.x* specification when using the following items: -- **SQLSTATEs**. Many SQLSTATE values are different in ODBC 2.*x* and ODBC 3.*x*. +- **SQLSTATEs**. Many SQLSTATE values are different in ODBC *2.x* and ODBC *3.x*. -- **Date, Time, and Timestamp Type Identifiers**. The following table shows the type identifiers for date, time, and timestamp data in ODBC 2.*x* and ODBC 3.*x*. +- **Date, Time, and Timestamp Type Identifiers**. The following table shows the type identifiers for date, time, and timestamp data in ODBC *2.x* and ODBC *3.x*. - |ODBC 2.*x*|ODBC 3.*x*| + |ODBC *2.x*|ODBC *3.x*| |----------------|----------------| |**SQL Type Identifiers**|| |SQL_DATE|SQL_TYPE_DATE| @@ -37,9 +37,9 @@ Before an application allocates a connection, it must set the SQL_ATTR_ODBC_VERS |SQL_C_TIME|SQL_C_TYPE_TIME| |SQL_C_TIMESTAMP|SQL_C_TYPE_TIMESTAMP| -- _CatalogName_ **Argument in SQLTables**. In ODBC 2.*x*, the wildcard characters ("%" and "_") in the *CatalogName* argument are treated literally. In ODBC 3.*x*, they are treated as wildcard characters. Thus, an application that follows the ODBC 2.*x* specification cannot use these as wildcard characters and does not escape them when using them as literals. An application that follows the ODBC 3.*x* specification can use these as wildcard characters or escape them and use them as literals. For more information, see [Arguments in Catalog Functions](../../../odbc/reference/develop-app/arguments-in-catalog-functions.md). +- _CatalogName_ **Argument in SQLTables**. In ODBC *2.x*, the wildcard characters ("%" and "_") in the *CatalogName* argument are treated literally. In ODBC *3.x*, they are treated as wildcard characters. Thus, an application that follows the ODBC *2.x* specification cannot use these as wildcard characters and does not escape them when using them as literals. An application that follows the ODBC *3.x* specification can use these as wildcard characters or escape them and use them as literals. For more information, see [Arguments in Catalog Functions](../../../odbc/reference/develop-app/arguments-in-catalog-functions.md). - The ODBC 3*.x* Driver Manager and ODBC 3*.x* drivers check the version of the ODBC specification to which an application is written and respond accordingly. For example, if the application follows the ODBC 2.*x* specification and calls **SQLExecute** before calling **SQLPrepare**, the ODBC 3*.x* Driver Manager returns SQLSTATE S1010 (Function sequence error). If the application follows the ODBC 3*.x* specification, the Driver Manager returns SQLSTATE HY010 (Function sequence error). For more information, see [Backward Compatibility and Standards Compliance](../../../odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md). + The ODBC *3.x* Driver Manager and ODBC *3.x* drivers check the version of the ODBC specification to which an application is written and respond accordingly. For example, if the application follows the ODBC *2.x* specification and calls **SQLExecute** before calling **SQLPrepare**, the ODBC *3.x* Driver Manager returns SQLSTATE S1010 (Function sequence error). If the application follows the ODBC *3.x* specification, the Driver Manager returns SQLSTATE HY010 (Function sequence error). For more information, see [Backward Compatibility and Standards Compliance](../../../odbc/reference/develop-app/backward-compatibility-and-standards-compliance.md). > [!IMPORTANT] -> Applications that follow the ODBC 3.*x* specification must use conditional code to avoid using functionality new to ODBC 3.*x* when working with ODBC 2.*x* drivers. ODBC 2.*x* drivers do not support functionality new to ODBC 3.*x* just because the application declares that it follows the ODBC 3.*x* specification. Furthermore, ODBC 3.*x* drivers do not cease to support functionality new to ODBC 3.*x* just because the application declares that it follows the ODBC 2.*x* specification. +> Applications that follow the ODBC *3.x* specification must use conditional code to avoid using functionality new to ODBC *3.x* when working with ODBC *2.x* drivers. ODBC *2.x* drivers do not support functionality new to ODBC *3.x* just because the application declares that it follows the ODBC *3.x* specification. Furthermore, ODBC *3.x* drivers do not cease to support functionality new to ODBC *3.x* just because the application declares that it follows the ODBC *2.x* specification. diff --git a/docs/odbc/reference/develop-app/duplicated-features.md b/docs/odbc/reference/develop-app/duplicated-features.md index f9541581406..f67bae7f414 100644 --- a/docs/odbc/reference/develop-app/duplicated-features.md +++ b/docs/odbc/reference/develop-app/duplicated-features.md @@ -19,13 +19,13 @@ ms.author: genemi manager: craigg --- # Duplicated Features -The following ODBC 2.*x* functions have been duplicated by ODBC 3.*x* functions. As a result, the ODBC 2.*x* functions are deprecated in ODBC 3.*x*. The ODBC 3.*x* functions are referred to as replacement functions. +The following ODBC *2.x* functions have been duplicated by ODBC *3.x* functions. As a result, the ODBC *2.x* functions are deprecated in ODBC *3.x*. The ODBC *3.x* functions are referred to as replacement functions. - When an application uses a deprecated ODBC 2.*x* function and the underlying driver is an ODBC 3.*x* driver, the Driver Manager maps the function call to the corresponding replacement function. The only exception to this rule is **SQLExtendedFetch**. (See the footnote at the end of the following table.) For more information about these mappings, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. + When an application uses a deprecated ODBC *2.x* function and the underlying driver is an ODBC *3.x* driver, the Driver Manager maps the function call to the corresponding replacement function. The only exception to this rule is **SQLExtendedFetch**. (See the footnote at the end of the following table.) For more information about these mappings, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. - When an application uses a replacement function and the underlying driver is an ODBC 2.*x* driver, the Driver Manager maps the function call to the corresponding deprecated function. + When an application uses a replacement function and the underlying driver is an ODBC *2.x* driver, the Driver Manager maps the function call to the corresponding deprecated function. -|ODBC 2.*x* function|ODBC 3.*x* function| +|ODBC *2.x* function|ODBC *3.x* function| |-------------------------|-------------------------| |**SQLAllocConnect**|**SQLAllocHandle**| |**SQLAllocEnv**|**SQLAllocHandle**| @@ -43,7 +43,7 @@ The following ODBC 2.*x* functions have been duplicated by ODBC 3.*x* functions. |**SQLSetStmtOption**|**SQLSetStmtAttr**| |**SQLTransact**|**SQLEndTran**| - [1] The function **SQLExtendedFetch** is duplicated functionality; **SQLFetchScroll** provides the same functionality in ODBC 3.*x*. However, the Driver Manager does not map **SQLExtendedFetch** to **SQLFetchScroll** when going against an ODBC 3.*x* driver. For more information, see [What the Driver Manager Does](../../../odbc/reference/appendixes/what-the-driver-manager-does.md) in Appendix G: Driver Guidelines for Backward Compatibility. The Driver Manager maps **SQLFetchScroll** to **SQLExtendedFetch** when going against an ODBC 2.*x* driver. + [1] The function **SQLExtendedFetch** is duplicated functionality; **SQLFetchScroll** provides the same functionality in ODBC *3.x*. However, the Driver Manager does not map **SQLExtendedFetch** to **SQLFetchScroll** when going against an ODBC *3.x* driver. For more information, see [What the Driver Manager Does](../../../odbc/reference/appendixes/what-the-driver-manager-does.md) in Appendix G: Driver Guidelines for Backward Compatibility. The Driver Manager maps **SQLFetchScroll** to **SQLExtendedFetch** when going against an ODBC *2.x* driver. > [!NOTE] -> The function **SQLBindParam** is a special case. **SQLBindParam** is duplicated functionality. This is not an ODBC 2*.x* function, but a function that is present in the Open Group and ISO standards. The functionality provided by this function is completely subsumed by that of **SQLBindParameter**. As a result, the Driver Manager maps a call to **SQLBindParam** to **SQLBindParameter** when the underlying driver is an ODBC 3.*x* driver. However, when the underlying driver is an ODBC 2*.x* driver, the Driver Manager does not perform this mapping. +> The function **SQLBindParam** is a special case. **SQLBindParam** is duplicated functionality. This is not an ODBC *2.x* function, but a function that is present in the Open Group and ISO standards. The functionality provided by this function is completely subsumed by that of **SQLBindParameter**. As a result, the Driver Manager maps a call to **SQLBindParam** to **SQLBindParameter** when the underlying driver is an ODBC *3.x* driver. However, when the underlying driver is an ODBC *2.x* driver, the Driver Manager does not perform this mapping. diff --git a/docs/odbc/reference/develop-app/header-files.md b/docs/odbc/reference/develop-app/header-files.md index 278c3c71900..a30f1029463 100644 --- a/docs/odbc/reference/develop-app/header-files.md +++ b/docs/odbc/reference/develop-app/header-files.md @@ -19,7 +19,7 @@ The Sql.h header file contains prototypes for the functions and features in the The header files all contain a **#define**, ODBCVER, that an application or driver can set to be compiled for different versions of ODBC. - To align with the ISO CLI and Open Group CLI, the header files contain aliases for the information types used in calls to **SQLGetInfo**. In the following table, the column "ODBC name" indicates the ODBC name for the information type in [ODBC API Reference](../../../odbc/reference/syntax/odbc-api-reference.md). The column "Alias in header file" indicates the name that is used in the ISO CLI and the Open Group CLI. The actual numeric value of these manifest names is the same in both ODBC and the standard CLIs. These aliases enable a standards-compliant application or driver to compile with the ODBC 3*.x* header files. + To align with the ISO CLI and Open Group CLI, the header files contain aliases for the information types used in calls to **SQLGetInfo**. In the following table, the column "ODBC name" indicates the ODBC name for the information type in [ODBC API Reference](../../../odbc/reference/syntax/odbc-api-reference.md). The column "Alias in header file" indicates the name that is used in the ISO CLI and the Open Group CLI. The actual numeric value of these manifest names is the same in both ODBC and the standard CLIs. These aliases enable a standards-compliant application or driver to compile with the ODBC *3.x* header files. These aliases include expansions of abbreviations in the ODBC names so that the names are more understandable. "MAX" is expanded to "MAXIMUM", "LEN" to "LENGTH", "MULT" to "MULTIPLE", "OJ" to "OUTER_JOIN", and "TXN" to "TRANSACTION." diff --git a/docs/odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md b/docs/odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md index 0515484fc46..8ea4af66c4a 100644 --- a/docs/odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md +++ b/docs/odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md @@ -21,9 +21,9 @@ ms.author: genemi manager: craigg --- # Mapping Replacement Functions for Backward Compatibility of Applications -An ODBC 3*.x* application working through the ODBC 3*.x* Driver Manager will work against an ODBC 2.*x* driver as long as no new features are used. Both duplicated functionality and behavioral changes do, however, affect the way that the ODBC 3.*x* application works on an ODBC 2.*x* driver. When working with an ODBC 2.*x* driver, the Driver Manager maps the following ODBC 3.*x* functions, which have replaced one or more ODBC 2.*x* functions, into the corresponding ODBC 2.*x* functions. +An ODBC *3.x* application working through the ODBC *3.x* Driver Manager will work against an ODBC *2.x* driver as long as no new features are used. Both duplicated functionality and behavioral changes do, however, affect the way that the ODBC *3.x* application works on an ODBC *2.x* driver. When working with an ODBC *2.x* driver, the Driver Manager maps the following ODBC *3.x* functions, which have replaced one or more ODBC *2.x* functions, into the corresponding ODBC *2.x* functions. -|ODBC 3.*x* function|ODBC 2.*x* function| +|ODBC *3.x* function|ODBC *2.x* function| |-------------------------|-------------------------| |**SQLAllocHandle**|**SQLAllocEnv**, **SQLAllocConnect**, or **SQLAllocStmt**| |**SQLBulkOperations**|**SQLSetPos**| @@ -96,7 +96,7 @@ SQLColAttribute(StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttribu the Driver Manager returns SQL_ERROR with SQLSTATE HY091 (Invalid descriptor field identifier). No further rules of this section apply. -2. The Driver Manager maps SQL_COLUMN_COUNT, SQL_COLUMN_NAME, or SQL_COLUMN_NULLABLE to SQL_DESC_COUNT, SQL_DESC_NAME, or SQL_DESC_NULLABLE, respectively. (An ODBC 2*.x* driver need only support SQL_COLUMN_COUNT, SQL_COLUMN_NAME, and SQL_COLUMN_NULLABLE, not SQL_DESC_COUNT, SQL_DESC_NAME, and SQL_DESC_NULLABLE.) The call to SQLColAttribute is mapped to: +2. The Driver Manager maps SQL_COLUMN_COUNT, SQL_COLUMN_NAME, or SQL_COLUMN_NULLABLE to SQL_DESC_COUNT, SQL_DESC_NAME, or SQL_DESC_NULLABLE, respectively. (An ODBC *2.x* driver need only support SQL_COLUMN_COUNT, SQL_COLUMN_NAME, and SQL_COLUMN_NULLABLE, not SQL_DESC_COUNT, SQL_DESC_NAME, and SQL_DESC_NULLABLE.) The call to SQLColAttribute is mapped to: ``` SQLColAttributes(StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttributePtr, BufferLength, StringLengthPtr, NumericAttributePtr); @@ -213,7 +213,7 @@ SQLGetConnectAttr(ConnectionHandle, Attribute, ValuePtr, BufferLength, StringLen will result in the following sequence of steps: -1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC 2.*x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. +1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC *2.x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. 2. If *Attribute* is equal to SQL_ATTR_AUTO_IPD or SQL_ATTR_METADATA_ID, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). @@ -228,7 +228,7 @@ SQLGetConnectAttr(ConnectionHandle, Attribute, ValuePtr, BufferLength, StringLen Note that the *BufferLength* and *StringLengthPtr* are ignored. ## SQLGetData - When an ODBC 3.*x* application working with an ODBC 2*.x* driver calls **SQLGetData** with the *ColumnNumber* argument equal to 0, the ODBC 3*.x* Driver Manager maps this to a call to **SQLGetStmtOption** with the *Option* attribute set to SQL_GET_BOOKMARK. + When an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLGetData** with the *ColumnNumber* argument equal to 0, the ODBC *3.x* Driver Manager maps this to a call to **SQLGetStmtOption** with the *Option* attribute set to SQL_GET_BOOKMARK. ## SQLGetStmtAttr The Driver Manager maps this to **SQLGetStmtOption**. The following call to **SQLGetStmtAttr**: @@ -239,7 +239,7 @@ SQLGetStmtAttr(StatementHandle, Attribute, ValuePtr, BufferLength, StringLengthP will result in the following sequence of steps: -1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC 2.*x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. +1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC *2.x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. 2. If *Attribute* is one of the following: @@ -298,7 +298,7 @@ SQLSetConnectAttr(ConnectionHandle, Attribute, ValuePtr, StringLength); will result in the following sequence of steps: -1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC 2.*x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. +1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC *2.x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. 2. If *Attribute* is equal to SQL_ATTR_AUTO_IPD, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). @@ -313,7 +313,7 @@ SQLSetConnectAttr(ConnectionHandle, Attribute, ValuePtr, StringLength); where *hdbc*, *fOption*, and *vParam* will be set to the values of *ConnectionHandle*, *Attribute*, and *ValuePtr*, respectively. *StringLengthPtr* is ignored. > [!NOTE] -> The ability to set statement attributes on the connection level has been deprecated. Statement attributes should never be set on the connection level by an ODBC 3.*x* application. +> The ability to set statement attributes on the connection level has been deprecated. Statement attributes should never be set on the connection level by an ODBC *3.x* application. ## SQLSetStmtAttr The Driver Manager maps this to **SQLSetStmtOption**. The following call to **SQLSetStmtAttr**: @@ -324,7 +324,7 @@ SQLSetStmtAttr(StatementHandle, Attribute, ValuePtr, StringLength); will result in the following sequence of steps: -1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC 2.*x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. +1. If *Attribute* is not a driver-defined connection or statement attribute and is not an attribute defined in ODBC *2.x*, the Driver Manager returns SQL_ERROR with SQLSTATE HY092 (Invalid attribute/option identifier). No further rules in this section apply. 2. If *Attribute* is one of the following: @@ -376,7 +376,7 @@ SQLSetStmtAttr(StatementHandle, Attribute, ValuePtr, StringLength); where *hstmt*, *fOption*, and *vParam* will be set to the values of *StatementHandle*, *Attribute*, and *ValuePtr*, respectively. The *StringLength* argument is ignored. - If an ODBC 2.*x* driver supports character-string, driver-specific statement options, an ODBC 3.*x* application should call **SQLSetStmtOption** to set those options. + If an ODBC *2.x* driver supports character-string, driver-specific statement options, an ODBC *3.x* application should call **SQLSetStmtOption** to set those options. ## Mappings for Handling Parameter Arrays When the application calls: @@ -393,23 +393,23 @@ SQLParamOptions (StatementHandle, Size, &RowCount); The Driver Manager later returns a pointer to this variable when the application calls **SQLGetStmtAttr** to retrieve SQL_ATTR_PARAMS_PROCESSED_PTR. The Driver Manager cannot change this internal variable until the statement handle is returned to the prepared or allocated state. - An ODBC 3.*x* application can call **SQLGetStmtAttr** to obtain the value of SQL_ATTR_PARAMS_PROCESSED_PTR even though it has not explicitly set the SQL_DESC_ARRAY_SIZE field in the APD. This situation could arise, for example, if the application has a generic routine that checks for the current "row" of parameters being processed when **SQLExecute** returns SQL_NEED_DATA. This routine is invoked whether or not the SQL_DESC_ARRAY_SIZE is 1 or is greater than 1. To account for this, the Driver Manager will need to define this internal variable whether or not the application has called **SQLSetStmtAttr** to set the SQL_DESC_ARRAY_SIZE field in APD. If SQL_DESC_ARRAY_SIZE has not been set, the Driver Manager has to make sure that this variable contains the value 1 prior to returning from **SQLExecDirect** or **SQLExecute**. + An ODBC *3.x* application can call **SQLGetStmtAttr** to obtain the value of SQL_ATTR_PARAMS_PROCESSED_PTR even though it has not explicitly set the SQL_DESC_ARRAY_SIZE field in the APD. This situation could arise, for example, if the application has a generic routine that checks for the current "row" of parameters being processed when **SQLExecute** returns SQL_NEED_DATA. This routine is invoked whether or not the SQL_DESC_ARRAY_SIZE is 1 or is greater than 1. To account for this, the Driver Manager will need to define this internal variable whether or not the application has called **SQLSetStmtAttr** to set the SQL_DESC_ARRAY_SIZE field in APD. If SQL_DESC_ARRAY_SIZE has not been set, the Driver Manager has to make sure that this variable contains the value 1 prior to returning from **SQLExecDirect** or **SQLExecute**. ## Error Handling - In ODBC 3.*x*, calling **SQLFetch** or **SQLFetchScroll** populates the SQL_DESC_ARRAY_STATUS_PTR in the IRD, and the SQL_DIAG_ROW_NUMBER field of a given diagnostic record contains the number of the row in the rowset that this record pertains to. Using this, the application can correlate an error message with a given row position. + In ODBC *3.x*, calling **SQLFetch** or **SQLFetchScroll** populates the SQL_DESC_ARRAY_STATUS_PTR in the IRD, and the SQL_DIAG_ROW_NUMBER field of a given diagnostic record contains the number of the row in the rowset that this record pertains to. Using this, the application can correlate an error message with a given row position. - An ODBC 2.*x* driver will be unable to provide this functionality. However, it will provide error demarcation with SQLSTATE 01S01 (Error in row). An ODBC 3.*x* application that is using **SQLFetch** or **SQLFetchScroll** while going against an ODBC 2.*x* driver needs to be aware of this fact. Note also that such an application will be unable to call **SQLGetDiagField** to actually get the SQL_DIAG_ROW_NUMBER field anyway. An ODBC 3.*x* application working with an ODBC 2.*x* driver will be able to call **SQLGetDiagField** only with a *DiagIdentifier* argument of SQL_DIAG_MESSAGE_TEXT, SQL_DIAG_NATIVE, SQL_DIAG_RETURNCODE, or SQL_DIAG_SQLSTATE. The ODBC 3*.x* Driver Manager maintains the diagnostic data structure when working with an ODBC 2.*x* driver, but the ODBC 2.*x* driver returns only these four fields. + An ODBC *2.x* driver will be unable to provide this functionality. However, it will provide error demarcation with SQLSTATE 01S01 (Error in row). An ODBC *3.x* application that is using **SQLFetch** or **SQLFetchScroll** while going against an ODBC *2.x* driver needs to be aware of this fact. Note also that such an application will be unable to call **SQLGetDiagField** to actually get the SQL_DIAG_ROW_NUMBER field anyway. An ODBC *3.x* application working with an ODBC *2.x* driver will be able to call **SQLGetDiagField** only with a *DiagIdentifier* argument of SQL_DIAG_MESSAGE_TEXT, SQL_DIAG_NATIVE, SQL_DIAG_RETURNCODE, or SQL_DIAG_SQLSTATE. The ODBC *3.x* Driver Manager maintains the diagnostic data structure when working with an ODBC *2.x* driver, but the ODBC *2.x* driver returns only these four fields. - When an ODBC 2.*x* application is working with an ODBC 2.*x* driver, if an operation can cause multiple errors to be returned by the Driver Manager, different errors may be returned by the ODBC 3*.x* Driver Manager than by the ODBC 2.*x* Driver Manager. + When an ODBC *2.x* application is working with an ODBC *2.x* driver, if an operation can cause multiple errors to be returned by the Driver Manager, different errors may be returned by the ODBC *3.x* Driver Manager than by the ODBC *2.x* Driver Manager. ## Mappings for Bookmark Operations - The ODBC 3*.x* Driver Manager performs the following mappings when an ODBC 3.*x* application working with an ODBC 2.*x* driver performs bookmark operations. + The ODBC *3.x* Driver Manager performs the following mappings when an ODBC *3.x* application working with an ODBC *2.x* driver performs bookmark operations. ### SQLBindCol - When an ODBC 3.*x* application working with an ODBC 2.*x* driver calls **SQLBindCol** to bind to column 0 with *fCType* equal to SQL_C_VARBOOKMARK, the ODBC 3*.x* Driver Manager checks to see whether the *BufferLength* argument is less than 4 or greater than 4, and if so, returns SQLSTATE HY090 (Invalid string or buffer length). If the *BufferLength* argument is equal to 4, the Driver Manager calls **SQLBindCol** in the driver, after replacing *fCType* with SQL_C_BOOKMARK. + When an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLBindCol** to bind to column 0 with *fCType* equal to SQL_C_VARBOOKMARK, the ODBC *3.x* Driver Manager checks to see whether the *BufferLength* argument is less than 4 or greater than 4, and if so, returns SQLSTATE HY090 (Invalid string or buffer length). If the *BufferLength* argument is equal to 4, the Driver Manager calls **SQLBindCol** in the driver, after replacing *fCType* with SQL_C_BOOKMARK. ### SQLColAttribute - When an ODBC 3.*x* application working with an ODBC 2.*x* driver calls **SQLColAttribute** with the *ColumnNumber* argument set to 0, the Driver Manager returns the *FieldIdentifier* values listed in the following table. + When an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLColAttribute** with the *ColumnNumber* argument set to 0, the Driver Manager returns the *FieldIdentifier* values listed in the following table. |*FieldIdentifier*|Value| |-----------------------|-----------| @@ -441,7 +441,7 @@ SQLParamOptions (StatementHandle, Size, &RowCount); |SQL_DESC_UPDATEABLE|SQL_ATTR_READ_ONLY| ### SQLDescribeCol - When an ODBC 3.*x* application working with an ODBC 2.*x* driver calls **SQLDescribeCol** with the *ColumnNumber* argument set to 0, the Driver Manager returns the values listed in the following table. + When an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLDescribeCol** with the *ColumnNumber* argument set to 0, the Driver Manager returns the values listed in the following table. |Buffer|Value| |------------|-----------| @@ -453,7 +453,7 @@ SQLParamOptions (StatementHandle, Size, &RowCount); |*NullablePtr|SQL_NO_NULLS| ### SQLGetData - When an ODBC 3.*x* application working with an ODBC 2.*x* driver makes the following call to **SQLGetData** to retrieve a bookmark: + When an ODBC *3.x* application working with an ODBC *2.x* driver makes the following call to **SQLGetData** to retrieve a bookmark: ``` SQLGetData(StatementHandle, 0, SQL_C_VARBOOKMARK, TargetValuePtr, BufferLength, StrLen_or_IndPtr) @@ -467,9 +467,9 @@ SQLGetStmtOption(hstmt, SQL_GET_BOOKMARK, TargetValuePtr) where *hstmt* and *pvParam* are set to the values in *StatementHandle* and *TargetValuePtr*, respectively. The bookmark is returned in the buffer pointed to by the *pvParam* (*TargetValuePtr*) argument. The value in the buffer pointed to by the *StrLen_or_IndPtr* argument in the call to **SQLGetData** is set to 4. - This mapping is necessary to account for the case in which **SQLFetch** was called prior to the call to **SQLGetData** and the ODBC 2.*x* driver did not support **SQLExtendedFetch**. In this case, **SQLFetch** would be passed through to the ODBC 2.*x* driver, in which case bookmark retrieval is not supported. + This mapping is necessary to account for the case in which **SQLFetch** was called prior to the call to **SQLGetData** and the ODBC *2.x* driver did not support **SQLExtendedFetch**. In this case, **SQLFetch** would be passed through to the ODBC *2.x* driver, in which case bookmark retrieval is not supported. - **SQLGetData** cannot be called multiple times in an ODBC 2.*x* driver to retrieve a bookmark in parts, so calling **SQLGetData** with the *BufferLength* argument set to a value less than 4 and the *ColumnNumber* argument set to 0 will return SQLSTATE HY090 (Invalid string or buffer length). **SQLGetData** can, however, be called multiple times to retrieve the same bookmark. + **SQLGetData** cannot be called multiple times in an ODBC *2.x* driver to retrieve a bookmark in parts, so calling **SQLGetData** with the *BufferLength* argument set to a value less than 4 and the *ColumnNumber* argument set to 0 will return SQLSTATE HY090 (Invalid string or buffer length). **SQLGetData** can, however, be called multiple times to retrieve the same bookmark. ### SQLSetStmtAttr - When an ODBC 3.*x* application working with an ODBC 2.*x* driver calls **SQLSetStmtAttr** to set the SQL_ATTR_USE_BOOKMARKS attribute to SQL_UB_VARIABLE, the Driver Manager sets the attribute to SQL_UB_ON in the underlying ODBC 2.*x* driver. + When an ODBC *3.x* application working with an ODBC *2.x* driver calls **SQLSetStmtAttr** to set the SQL_ATTR_USE_BOOKMARKS attribute to SQL_UB_VARIABLE, the Driver Manager sets the attribute to SQL_UB_ON in the underlying ODBC *2.x* driver. diff --git a/docs/odbc/reference/develop-app/new-features.md b/docs/odbc/reference/develop-app/new-features.md index 2c011066602..4bcb71f5b94 100644 --- a/docs/odbc/reference/develop-app/new-features.md +++ b/docs/odbc/reference/develop-app/new-features.md @@ -19,7 +19,7 @@ ms.author: genemi manager: craigg --- # New Features -The following new functionality has been introduced in ODBC 3.*x*. An ODBC 3.*x* application working with an ODBC 2*.x* driver will not be able to use this functionality. The ODBC 3.*x* Driver Manager does not map these features when working with an ODBC 2*.x* driver. +The following new functionality has been introduced in ODBC *3.x*. An ODBC *3.x* application working with an ODBC *2.x* driver will not be able to use this functionality. The ODBC *3.x* Driver Manager does not map these features when working with an ODBC *2.x* driver. - Functions that take a descriptor handle as an argument: **SQLSetDescField**, **SQLGetDescField**, **SQLSetDescRec**, **SQLGetDescRec**, and **SQLCopyDesc**. @@ -75,7 +75,7 @@ The following new functionality has been introduced in ODBC 3.*x*. An ODBC 3.*x* - Named parameters. -- Any of the ODBC 3.*x*-specific **SQLGetInfo** options. (If an ODBC 3.*x* application working with an ODBC 2.*x* driver calls the SQL_XXX_CURSOR_ATTRIBUTES1 information types, which have replaced several ODBC 2.*x* information types, some of the information might be reliable, but some might be unreliable. For more information, see [SQLGetInfo](../../../odbc/reference/syntax/sqlgetinfo-function.md).) +- Any of the ODBC *3.x*-specific **SQLGetInfo** options. (If an ODBC *3.x* application working with an ODBC *2.x* driver calls the SQL_XXX_CURSOR_ATTRIBUTES1 information types, which have replaced several ODBC *2.x* information types, some of the information might be reliable, but some might be unreliable. For more information, see [SQLGetInfo](../../../odbc/reference/syntax/sqlgetinfo-function.md).) - Bind offsets. @@ -97,7 +97,7 @@ The following new functionality has been introduced in ODBC 3.*x*. An ODBC 3.*x* - Use of **SQLDescribeCol** and **SQLColAttribute** on column 0. -- Use of any ODBC 3.*x*-specific column attributes in a call to **SQLColAttribute**. +- Use of any ODBC *3.x*-specific column attributes in a call to **SQLColAttribute**. - Use of multiple environment handles. diff --git a/docs/odbc/reference/develop-app/sqlstate-mappings.md b/docs/odbc/reference/develop-app/sqlstate-mappings.md index c29b30b6ec3..d3e8b5c1f65 100644 --- a/docs/odbc/reference/develop-app/sqlstate-mappings.md +++ b/docs/odbc/reference/develop-app/sqlstate-mappings.md @@ -17,15 +17,15 @@ ms.author: genemi manager: craigg --- # SQLSTATE Mappings -This topic discusses SQLSTATE values for ODBC 2.*x* and ODBC 3.*x*. For more information on ODBC 3.*x* SQLSTATE values, see [Appendix A: ODBC Error Codes](../../../odbc/reference/appendixes/appendix-a-odbc-error-codes.md). +This topic discusses SQLSTATE values for ODBC *2.x* and ODBC *3.x*. For more information on ODBC *3.x* SQLSTATE values, see [Appendix A: ODBC Error Codes](../../../odbc/reference/appendixes/appendix-a-odbc-error-codes.md). - In ODBC 3.*x*, HYxxx SQLSTATEs are returned instead of S1xxx, and 42Sxx SQLSTATEs are returned instead of S00XX. This was done to align with Open Group and ISO standards. In many cases, the mapping is not one-to-one because the standards have redefined the interpretation of several SQLSTATEs. + In ODBC *3.x*, HYxxx SQLSTATEs are returned instead of S1xxx, and 42Sxx SQLSTATEs are returned instead of S00XX. This was done to align with Open Group and ISO standards. In many cases, the mapping is not one-to-one because the standards have redefined the interpretation of several SQLSTATEs. - When an ODBC 2.*x* application is upgraded to an ODBC 3.*x* application, the application has to be changed to expect ODBC 3.*x* SQLSTATEs instead of ODBC 2.*x* SQLSTATEs. The following table lists the ODBC 3.*x* SQLSTATEs that each ODBC 2.*x* SQLSTATE is mapped to. + When an ODBC *2.x* application is upgraded to an ODBC *3.x* application, the application has to be changed to expect ODBC *3.x* SQLSTATEs instead of ODBC *2.x* SQLSTATEs. The following table lists the ODBC *3.x* SQLSTATEs that each ODBC *2.x* SQLSTATE is mapped to. - When the SQL_ATTR_ODBC_VERSION environment attribute is set to SQL_OV_ODBC2, the driver posts ODBC 2.*x* SQLSTATEs instead of ODBC 3.*x* SQLSTATEs when **SQLGetDiagField** or **SQLGetDiagRec** is called. A specific mapping can be determined by noting the ODBC 2*.x* SQLSTATE in column 1 of the following table that corresponds to the ODBC 3.*x* SQLSTATE in column 2. + When the SQL_ATTR_ODBC_VERSION environment attribute is set to SQL_OV_ODBC2, the driver posts ODBC *2.x* SQLSTATEs instead of ODBC *3.x* SQLSTATEs when **SQLGetDiagField** or **SQLGetDiagRec** is called. A specific mapping can be determined by noting the ODBC *2.x* SQLSTATE in column 1 of the following table that corresponds to the ODBC *3.x* SQLSTATE in column 2. -|ODBC 2.*x* SQLSTATE|ODBC 3.*x* SQLSTATE|Comments| +|ODBC *2.x* SQLSTATE|ODBC *3.x* SQLSTATE|Comments| |-------------------------|-------------------------|--------------| |01S03|01001|| |01S04|01001|| @@ -44,7 +44,7 @@ This topic discusses SQLSTATE values for ODBC 2.*x* and ODBC 3.*x*. For more inf |S0023|42S23|| |S1000|HY000|| |S1001|HY001|| -|S1002|07009|ODBC 2.*x* SQLSTATE S1002 is mapped to ODBC 3.*x* SQLSTATE 07009 if the underlying function is **SQLBindCol**, **SQLColAttribute**, **SQLExtendedFetch**, **SQLFetch**, **SQLFetchScroll**, or **SQLGetData**.| +|S1002|07009|ODBC *2.x* SQLSTATE S1002 is mapped to ODBC *3.x* SQLSTATE 07009 if the underlying function is **SQLBindCol**, **SQLColAttribute**, **SQLExtendedFetch**, **SQLFetch**, **SQLFetchScroll**, or **SQLGetData**.| |S1003|HY003|| |S1004|HY004|| |S1008|HY008|| @@ -57,7 +57,7 @@ This topic discusses SQLSTATE values for ODBC 2.*x* and ODBC 3.*x*. For more inf |S1090|HY090|| |S1091|HY091|| |S1092|HY092|| -|S1093|07009|ODBC 3.*x* SQLSTATE 07009 is mapped to ODBC 2.*x* SQLSTATE S1093 if the underlying function is **SQLBindParameter** or **SQLDescribeParam**.| +|S1093|07009|ODBC *3.x* SQLSTATE 07009 is mapped to ODBC *2.x* SQLSTATE S1093 if the underlying function is **SQLBindParameter** or **SQLDescribeParam**.| |S1096|HY096|| |S1097|HY097|| |S1098|HY098|| @@ -77,4 +77,4 @@ This topic discusses SQLSTATE values for ODBC 2.*x* and ODBC 3.*x*. For more inf |S1T00|HYT00|| > [!NOTE] -> ODBC 3.*x* SQLSTATE 07008 is mapped to ODBC 2.*x* SQLSTATE S1000. +> ODBC *3.x* SQLSTATE 07008 is mapped to ODBC *2.x* SQLSTATE S1000. diff --git a/docs/odbc/reference/develop-app/standards-compliant-applications-and-drivers.md b/docs/odbc/reference/develop-app/standards-compliant-applications-and-drivers.md index 551a9f02ce7..6b25bd456c7 100644 --- a/docs/odbc/reference/develop-app/standards-compliant-applications-and-drivers.md +++ b/docs/odbc/reference/develop-app/standards-compliant-applications-and-drivers.md @@ -19,11 +19,11 @@ manager: craigg # Standards-Compliant Applications and Drivers A standards-compliant application or driver is one that conforms to the Open Group CAE Specification "Data Management: SQL Call-Level Interface (CLI)," and the ISO/IEC 9075-3:1995 (E) Call-Level Interface (SQL/CLI). - ODBC 3*.x* guarantees the following features: + ODBC *3.x* guarantees the following features: -- An application written to the Open Group and ISO CLI specifications will work with an ODBC 3*.x* driver or a standards-compliant driver when it is compiled with the ODBC 3*.x* header files and linked with ODBC 3*.x* libraries, and when it gains access to the driver through the ODBC 3*.x* Driver Manager. +- An application written to the Open Group and ISO CLI specifications will work with an ODBC *3.x* driver or a standards-compliant driver when it is compiled with the ODBC *3.x* header files and linked with ODBC *3.x* libraries, and when it gains access to the driver through the ODBC *3.x* Driver Manager. -- A driver written to the Open Group and ISO CLI specifications will work with an ODBC 3*.x* application or a standards-compliant application when it is compiled with the ODBC 3*.x* header files and linked with ODBC 3*.x* libraries, and when the application gains access to the driver through the ODBC 3*.x* Driver Manager. +- A driver written to the Open Group and ISO CLI specifications will work with an ODBC *3.x* application or a standards-compliant application when it is compiled with the ODBC *3.x* header files and linked with ODBC *3.x* libraries, and when the application gains access to the driver through the ODBC *3.x* Driver Manager. Standards-compliant applications and drivers are compiled with the ODBC_STD compile flag. @@ -31,8 +31,8 @@ A standards-compliant application or driver is one that conforms to the Open Gro - If a standards-compliant application calls **SQLAllocEnv** (which can occur because **SQLAllocEnv** is a valid function in the Open Group and ISO CLI), the call is mapped to **SQLAllocHandleStd** at compile time. As a result, at run time, the application calls **SQLAllocHandleStd**. During the course of processing this call, the Driver Manager sets the SQL_ATTR_ODBC_VERSION environment attribute to SQL_OV_ODBC3. A call to **SQLAllocHandleStd** is equivalent to a call to **SQLAllocHandle** with a *HandleType* of SQL_HANDLE_ENV and a call to **SQLSetEnvAttr** to set SQL_ATTR_ODBC_VERSION to SQL_OV_ODBC3. -- If a standards-compliant application calls **SQLBindParam** (which can occur because **SQLBindParam** is a valid function in the Open Group and ISO CLI), the ODBC 3*.x* Driver Manager maps the call to the equivalent call in **SQLBindParameter**. (See [SQLBindParam Mapping](../../../odbc/reference/appendixes/sqlbindparam-mapping.md) in Appendix G: Driver Guidelines for Backward Compatibility.) +- If a standards-compliant application calls **SQLBindParam** (which can occur because **SQLBindParam** is a valid function in the Open Group and ISO CLI), the ODBC *3.x* Driver Manager maps the call to the equivalent call in **SQLBindParameter**. (See [SQLBindParam Mapping](../../../odbc/reference/appendixes/sqlbindparam-mapping.md) in Appendix G: Driver Guidelines for Backward Compatibility.) -- To align with the ISO CLI, the ODBC 3*.x* header files contain aliases for information types used in calls to **SQLGetInfo**. A standards-compliant application can use these aliases instead of the ODBC 3*.x* information types. For more information, see the next topic, [Header Files](../../../odbc/reference/develop-app/header-files.md). +- To align with the ISO CLI, the ODBC *3.x* header files contain aliases for information types used in calls to **SQLGetInfo**. A standards-compliant application can use these aliases instead of the ODBC *3.x* information types. For more information, see the next topic, [Header Files](../../../odbc/reference/develop-app/header-files.md). -- A standards-compliant application must verify that all features it supports are supported in the driver it will work with. Setting the SQL_ATTR_CURSOR_SCROLLABLE statement attribute to SQL_SCROLLABLE and setting the SQL_ATTR_CURSOR_SENSITIVITY statement attribute to SQL_INSENSITIVE or SQL_SENSITIVE are capabilities that are available as optional features in the standards but are not included in the ODBC 3*.x* Core level and therefore might not be supported by all ODBC 3*.x* drivers. If a standards-compliant application uses these capabilities, it should verify that the driver that it will work with supports them. +- A standards-compliant application must verify that all features it supports are supported in the driver it will work with. Setting the SQL_ATTR_CURSOR_SCROLLABLE statement attribute to SQL_SCROLLABLE and setting the SQL_ATTR_CURSOR_SENSITIVITY statement attribute to SQL_INSENSITIVE or SQL_SENSITIVE are capabilities that are available as optional features in the standards but are not included in the ODBC *3.x* Core level and therefore might not be supported by all ODBC *3.x* drivers. If a standards-compliant application uses these capabilities, it should verify that the driver that it will work with supports them. diff --git a/docs/odbc/reference/develop-app/trace-file.md b/docs/odbc/reference/develop-app/trace-file.md index 0e3d9dacfd1..07e084a836d 100644 --- a/docs/odbc/reference/develop-app/trace-file.md +++ b/docs/odbc/reference/develop-app/trace-file.md @@ -20,4 +20,4 @@ An application specifies the trace file either by setting the **TraceFile** keyw The trace file provides a log of each ODBC function call with the data types and values of all arguments. It logs all input functions and logs all returned functions with return codes and error states. - In ODBC 3*.x*, parameters to connection functions are not provided to the trace DLL. + In ODBC *3.x*, parameters to connection functions are not provided to the trace DLL. diff --git a/docs/odbc/reference/develop-app/types-of-changes.md b/docs/odbc/reference/develop-app/types-of-changes.md index a784ea8923d..657f07149c2 100644 --- a/docs/odbc/reference/develop-app/types-of-changes.md +++ b/docs/odbc/reference/develop-app/types-of-changes.md @@ -16,10 +16,10 @@ ms.author: genemi manager: craigg --- # Types of Changes -Three types of changes are made in ODBC 3.*x* (and any version of ODBC). Each of these affects backward compatibility differently and is handled in a different way. These changes are described in the following table. +Three types of changes are made in ODBC *3.x* (and any version of ODBC). Each of these affects backward compatibility differently and is handled in a different way. These changes are described in the following table. |Type of change|Description| |--------------------|-----------------| -|New features|These are features that are new to ODBC 3.*x*, such as out-of-line binding or descriptors. These are implemented only when the application and driver, as well as the Driver Manager, are of version 3*.x*, so there is no attempt to make these backward compatible.| -|Duplicated features|These are features that exist in ODBC 2*.x* and ODBC 3.*x* but are implemented in different ways in each. The functions **SQLAllocHandle** and **SQLAllocStmt** are an example. Backward compatibility issues for these and other duplicated features are mostly handled by mappings in the Driver Manager.| -|Behavioral changes|These are features that are handled differently in ODBC 2*.x* and ODBC 3.*x*. A datetime **#define** is an example. These features are handled by the ODBC 3.*x* driver based on an environment attribute setting. (See [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md) for more information.)| +|New features|These are features that are new to ODBC *3.x*, such as out-of-line binding or descriptors. These are implemented only when the application and driver, as well as the Driver Manager, are of version *3.x*, so there is no attempt to make these backward compatible.| +|Duplicated features|These are features that exist in ODBC *2.x* and ODBC *3.x* but are implemented in different ways in each. The functions **SQLAllocHandle** and **SQLAllocStmt** are an example. Backward compatibility issues for these and other duplicated features are mostly handled by mappings in the Driver Manager.| +|Behavioral changes|These are features that are handled differently in ODBC *2.x* and ODBC *3.x*. A datetime **#define** is an example. These features are handled by the ODBC *3.x* driver based on an environment attribute setting. (See [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md) for more information.)| diff --git a/docs/odbc/reference/develop-app/types-of-drivers.md b/docs/odbc/reference/develop-app/types-of-drivers.md index 0765b7b7ba6..82df0b1c1f1 100644 --- a/docs/odbc/reference/develop-app/types-of-drivers.md +++ b/docs/odbc/reference/develop-app/types-of-drivers.md @@ -23,9 +23,9 @@ ODBC drivers can be classified as follows: - **32-bit ODBC 2.** **_x_ Driver** A 32-bit driver that: - - Exports only ODBC 2*.x* functions. + - Exports only ODBC *2.x* functions. - - Exhibits ODBC 2.*x* behavior for behavioral changes. + - Exhibits ODBC *2.x* behavior for behavioral changes. - **ISO and Open Group-Compliant Driver** A 32-bit driver that: @@ -39,13 +39,13 @@ ODBC drivers can be classified as follows: - Exports only functions that are in ODBC 3.0 minus deprecated functions. - - Is capable of exhibiting ODBC 2.*x* behavior or ODBC 3.0 behavior with respect to behavioral changes, based on the SQL_ATTR_APP_ODBC_VERSION environment attribute. + - Is capable of exhibiting ODBC *2.x* behavior or ODBC 3.0 behavior with respect to behavioral changes, based on the SQL_ATTR_APP_ODBC_VERSION environment attribute. - **ODBC 3.5 (or later) ANSI Driver** A 32-bit driver that: - Exports only functions that are in ODBC 3.5 minus deprecated functions. - - Is capable of exhibiting ODBC 2.*x* behavior or ODBC 3.0 behavior, or ODBC 3.5 behavior with respect to behavioral changes, based on the SQL_ATTR_APP_ODBC_VERSION environment attribute. + - Is capable of exhibiting ODBC *2.x* behavior or ODBC 3.0 behavior, or ODBC 3.5 behavior with respect to behavioral changes, based on the SQL_ATTR_APP_ODBC_VERSION environment attribute. - **ODBC 3.5 (or later) Unicode Driver** A 32-bit driver that: @@ -56,4 +56,4 @@ ODBC drivers can be classified as follows: - Can store and process Unicode data on the data source. > [!NOTE] -> 16-bit ODBC drivers will not work directly with the ODBC 3.*x* Driver Manager. However, it is possible for 16-bit drivers to work with the 2.0 ODBC Driver Manager, which subsequently thunks up to the 3.*x* Driver Manager. +> 16-bit ODBC drivers will not work directly with the ODBC *3.x* Driver Manager. However, it is possible for 16-bit drivers to work with the 2.0 ODBC Driver Manager, which subsequently thunks up to the *3.x* Driver Manager. diff --git a/docs/odbc/reference/develop-app/unicode-function-arguments.md b/docs/odbc/reference/develop-app/unicode-function-arguments.md index c6779021b7d..3920efe6604 100644 --- a/docs/odbc/reference/develop-app/unicode-function-arguments.md +++ b/docs/odbc/reference/develop-app/unicode-function-arguments.md @@ -60,7 +60,7 @@ The ODBC 3.5 (or higher) Driver Manager supports both ANSI and Unicode versions |**SQLInstallDriver**|| > [!NOTE] -> Deprecated functions have Unicode-to-ANSI mapping support because the ODBC 3*.x* Driver Manager supports recompiling ODBC 2.*x* applications with the UNICODE **#define**. +> Deprecated functions have Unicode-to-ANSI mapping support because the ODBC *3.x* Driver Manager supports recompiling ODBC *2.x* applications with the UNICODE **#define**. This section contains the following topics. diff --git a/docs/odbc/reference/develop-app/writing-odbc-3-x-applications.md b/docs/odbc/reference/develop-app/writing-odbc-3-x-applications.md index d5d2a62708b..99d056b5cb4 100644 --- a/docs/odbc/reference/develop-app/writing-odbc-3-x-applications.md +++ b/docs/odbc/reference/develop-app/writing-odbc-3-x-applications.md @@ -21,17 +21,17 @@ ms.author: genemi manager: craigg --- # Writing ODBC 3.x Applications -When an ODBC 2.*x* application is upgraded to ODBC 3.*x*, it should be written such that it works with both ODBC 2.*x* and 3.*x* drivers. The application should incorporate conditional code to take full advantage of the ODBC 3.*x* features. +When an ODBC *2.x* application is upgraded to ODBC *3.x*, it should be written such that it works with both ODBC *2.x* and *3.x* drivers. The application should incorporate conditional code to take full advantage of the ODBC *3.x* features. - The SQL_ATTR_ODBC_VERSION environment attribute should be set to SQL_OV_ODBC2. This will ensure that the driver behaves like an ODBC 2*.x* driver with respect to the changes described in the section [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md). + The SQL_ATTR_ODBC_VERSION environment attribute should be set to SQL_OV_ODBC2. This will ensure that the driver behaves like an ODBC *2.x* driver with respect to the changes described in the section [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md). - If the application will use any of the features described in the section [New Features](../../../odbc/reference/develop-app/new-features.md), conditional code should be used to determine whether the driver is an ODBC 3.*x* or ODBC 2*.x* driver. The application uses **SQLGetDiagField** and **SQLGetDiagRec** to obtain ODBC 3.*x* SQLSTATEs while doing error processing on these conditional code fragments. The following points about the new functionality should be considered: + If the application will use any of the features described in the section [New Features](../../../odbc/reference/develop-app/new-features.md), conditional code should be used to determine whether the driver is an ODBC *3.x* or ODBC *2.x* driver. The application uses **SQLGetDiagField** and **SQLGetDiagRec** to obtain ODBC *3.x* SQLSTATEs while doing error processing on these conditional code fragments. The following points about the new functionality should be considered: -- An application affected by the change in rowset size behavior should be careful not to call **SQLFetch** when the array size is greater than 1. These applications should replace calls to **SQLExtendedFetch** with calls to **SQLSetStmtAttr** to set the SQL_ATTR_ARRAY_STATUS_PTR statement attribute and to **SQLFetchScroll**, so that they have common code that works with both ODBC 3.*x* and ODBC 2.*x* drivers. Because **SQLSetStmtAttr** with SQL_ATTR_ROW_ARRAY_SIZE will be mapped to **SQLSetStmtAttr** with SQL_ROWSET_SIZE for ODBC 2.*x* drivers, applications can just set SQL_ATTR_ROW_ARRAY_SIZE for their multirow fetch operations. +- An application affected by the change in rowset size behavior should be careful not to call **SQLFetch** when the array size is greater than 1. These applications should replace calls to **SQLExtendedFetch** with calls to **SQLSetStmtAttr** to set the SQL_ATTR_ARRAY_STATUS_PTR statement attribute and to **SQLFetchScroll**, so that they have common code that works with both ODBC *3.x* and ODBC *2.x* drivers. Because **SQLSetStmtAttr** with SQL_ATTR_ROW_ARRAY_SIZE will be mapped to **SQLSetStmtAttr** with SQL_ROWSET_SIZE for ODBC *2.x* drivers, applications can just set SQL_ATTR_ROW_ARRAY_SIZE for their multirow fetch operations. -- Most applications that are upgrading are not actually affected by changes in SQLSTATE codes. For those applications that are affected, they can do a mechanical search and replace in most cases using the error conversion table in the "SQLSTATE Mapping" section to convert ODBC 3.*x* error codes to ODBC 2*.x* codes. Since the ODBC 3*.x* Driver Manager will perform mapping from ODBC 2.*x* SQLSTATEs to ODBC 3.*x* SQLSTATEs, these application writers need only check for the ODBC 3.*x* SQLSTATEs and not worry about including ODBC 2.*x* SQLSTATEs in conditional code. +- Most applications that are upgrading are not actually affected by changes in SQLSTATE codes. For those applications that are affected, they can do a mechanical search and replace in most cases using the error conversion table in the "SQLSTATE Mapping" section to convert ODBC *3.x* error codes to ODBC *2.x* codes. Since the ODBC *3.x* Driver Manager will perform mapping from ODBC *2.x* SQLSTATEs to ODBC *3.x* SQLSTATEs, these application writers need only check for the ODBC *3.x* SQLSTATEs and not worry about including ODBC *2.x* SQLSTATEs in conditional code. -- If an application makes great use of date, time, and timestamp data types, the application can declare itself to be an ODBC 2.*x* application and use its existing code instead of using conditioning code. +- If an application makes great use of date, time, and timestamp data types, the application can declare itself to be an ODBC *2.x* application and use its existing code instead of using conditioning code. The upgrade should also include the following steps: @@ -51,7 +51,7 @@ When an ODBC 2.*x* application is upgraded to ODBC 3.*x*, it should be written s - Replace all calls to **SQLTransact** with calls to **SQLEndTran**. If the rightmost valid handle in the **SQLTransact** call is an environment handle, a *HandleType* argument of SQL_HANDLE_ENV should be used in the **SQLEndTran** call with the appropriate *Handle* argument. If the rightmost valid handle in your **SQLTransact** call is a connection handle, a *HandleType* argument of SQL_HANDLE_DBC should be used in the **SQLEndTran** call with the appropriate *Handle* argument. -- Replace all calls to **SQLColAttributes** with calls to **SQLColAttribute**. If the *FieldIdentifier* argument is either SQL_COLUMN_PRECISION, SQL_COLUMN_SCALE, or SQL_COLUMN_LENGTH, do not change anything other than the name of the function. If not, change *FieldIdentifier* from SQL_COLUMN_XXXX to SQL_DESC_XXXX. If *FieldIdentifier* is SQL_DESC_CONCISE_TYPE and the data type is a datetime data type, change to the corresponding ODBC 3*.x* data type. +- Replace all calls to **SQLColAttributes** with calls to **SQLColAttribute**. If the *FieldIdentifier* argument is either SQL_COLUMN_PRECISION, SQL_COLUMN_SCALE, or SQL_COLUMN_LENGTH, do not change anything other than the name of the function. If not, change *FieldIdentifier* from SQL_COLUMN_XXXX to SQL_DESC_XXXX. If *FieldIdentifier* is SQL_DESC_CONCISE_TYPE and the data type is a datetime data type, change to the corresponding ODBC *3.x* data type. - If using block cursors, scrollable cursors, or both, the application does the following: diff --git a/docs/odbc/reference/install/installation-components.md b/docs/odbc/reference/install/installation-components.md index cb40d386de0..e582ba4f790 100644 --- a/docs/odbc/reference/install/installation-components.md +++ b/docs/odbc/reference/install/installation-components.md @@ -24,7 +24,7 @@ manager: craigg ![Relationship between installation components](../../../odbc/reference/install/media/pr29.gif "pr29") > [!IMPORTANT] -> The Odbc.inf file that was used in ODBC 2.*x* to describe the files required by each ODBC component is not used in ODBC 3*.x*. Drivers that ship ODBC 3*.x* components do not need to create an Odbc.inf file. The removal of **SQLInstallDriver** and **SQLInstallODBC**, and the deprecation of **SQLInstallTranslator**, have rendered Odbc.inf unnecessary. The driver information that used to be in the Driver Keyword sections of Odbc.inf is now provided in the *lpszDriver* argument in **SQLInstallDriverEx**. The translator information that used to be in the [ODBC Translator] and Translator Specification sections of Odbc.inf is now provided in the *lpszTranslator* argument of **SQLInstallTranslatorEx**. These changes allow the ODBC Installer to be more portable across platforms. +> The Odbc.inf file that was used in ODBC *2.x* to describe the files required by each ODBC component is not used in ODBC *3.x*. Drivers that ship ODBC *3.x* components do not need to create an Odbc.inf file. The removal of **SQLInstallDriver** and **SQLInstallODBC**, and the deprecation of **SQLInstallTranslator**, have rendered Odbc.inf unnecessary. The driver information that used to be in the Driver Keyword sections of Odbc.inf is now provided in the *lpszDriver* argument in **SQLInstallDriverEx**. The translator information that used to be in the [ODBC Translator] and Translator Specification sections of Odbc.inf is now provided in the *lpszTranslator* argument of **SQLInstallTranslatorEx**. These changes allow the ODBC Installer to be more portable across platforms. For more information about these components, see the following topics at the end of this section. diff --git a/docs/odbc/reference/odbc-and-the-standard-cli.md b/docs/odbc/reference/odbc-and-the-standard-cli.md index 024469f5aee..33aeddd125d 100644 --- a/docs/odbc/reference/odbc-and-the-standard-cli.md +++ b/docs/odbc/reference/odbc-and-the-standard-cli.md @@ -27,17 +27,17 @@ ODBC aligns with the following specifications and standards that deal with the C As a result of this alignment, the following are true: -- An application written to the Open Group and ISO CLI specifications will work with an ODBC 3.*x* driver or a standards-compliant driver when it is compiled with the ODBC 3.*x* header files and linked with ODBC 3.*x* libraries, and when it gains access to the driver through the ODBC 3.*x* Driver Manager. +- An application written to the Open Group and ISO CLI specifications will work with an ODBC *3.x* driver or a standards-compliant driver when it is compiled with the ODBC *3.x* header files and linked with ODBC *3.x* libraries, and when it gains access to the driver through the ODBC *3.x* Driver Manager. -- A driver written to the Open Group and ISO CLI specifications will work with an ODBC 3*.x* application or a standards-compliant application when it is compiled with the ODBC 3*.x* header files and linked with ODBC 3*.x* libraries, and when the application gains access to the driver through the ODBC 3*.x* Driver Manager. (For more information, see [Standards-Compliant Applications and Drivers](../../odbc/reference/develop-app/standards-compliant-applications-and-drivers.md). +- A driver written to the Open Group and ISO CLI specifications will work with an ODBC *3.x* application or a standards-compliant application when it is compiled with the ODBC *3.x* header files and linked with ODBC *3.x* libraries, and when the application gains access to the driver through the ODBC *3.x* Driver Manager. (For more information, see [Standards-Compliant Applications and Drivers](../../odbc/reference/develop-app/standards-compliant-applications-and-drivers.md). - The Core interface conformance level encompasses all the features in the ISO CLI and all the nonoptional features in the Open Group CLI. Optional features of the Open Group CLI appear in higher interface conformance levels. Because all ODBC 3.*x* drivers are required to support the features in the Core interface conformance level, the following are true: + The Core interface conformance level encompasses all the features in the ISO CLI and all the nonoptional features in the Open Group CLI. Optional features of the Open Group CLI appear in higher interface conformance levels. Because all ODBC *3.x* drivers are required to support the features in the Core interface conformance level, the following are true: -- An ODBC 3.*x* driver will support all the features used by a standards-compliant application. +- An ODBC *3.x* driver will support all the features used by a standards-compliant application. -- An ODBC 3.*x* application using only the features in ISO CLI and the nonoptional features of the Open Group CLI will work with any standards-compliant driver. +- An ODBC *3.x* application using only the features in ISO CLI and the nonoptional features of the Open Group CLI will work with any standards-compliant driver. - In addition to the call-level interface specifications contained in the ISO/IEC and Open Group CLI standards, ODBC implements the following features. (Some of these features existed in versions of ODBC prior to ODBC 3.*x*.) + In addition to the call-level interface specifications contained in the ISO/IEC and Open Group CLI standards, ODBC implements the following features. (Some of these features existed in versions of ODBC prior to ODBC *3.x*.) - Multirow fetches by a single function call diff --git a/docs/odbc/reference/syntax/sqlfreeconnect-function.md b/docs/odbc/reference/syntax/sqlfreeconnect-function.md index 62a3b1c1305..3903d7c039b 100644 --- a/docs/odbc/reference/syntax/sqlfreeconnect-function.md +++ b/docs/odbc/reference/syntax/sqlfreeconnect-function.md @@ -26,10 +26,10 @@ manager: craigg Version Introduced: ODBC 1.0 Standards Compliance: Deprecated **Summary** - In ODBC 3*.x*, the ODBC 2.0 function **SQLFreeConnect** has been replaced by **SQLFreeHandle**. For more information, see [SQLFreeHandle](../../../odbc/reference/syntax/sqlfreehandle-function.md). + In ODBC *3.x*, the ODBC 2.0 function **SQLFreeConnect** has been replaced by **SQLFreeHandle**. For more information, see [SQLFreeHandle](../../../odbc/reference/syntax/sqlfreehandle-function.md). > [!NOTE] -> For more information about what the Driver Manager maps this function to when an ODBC 2*.x* application is working with an ODBC 3*.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. +> For more information about what the Driver Manager maps this function to when an ODBC *2.x* application is working with an ODBC *3.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. ## See Also [ODBC API Reference](../../../odbc/reference/syntax/odbc-api-reference.md) diff --git a/docs/odbc/reference/syntax/sqlfreeenv-function.md b/docs/odbc/reference/syntax/sqlfreeenv-function.md index 2eac84b7199..604fede9e21 100644 --- a/docs/odbc/reference/syntax/sqlfreeenv-function.md +++ b/docs/odbc/reference/syntax/sqlfreeenv-function.md @@ -26,10 +26,10 @@ manager: craigg Version Introduced: ODBC 1.0 Standards Compliance: Deprecated **Summary** - In ODBC 3*.x*, the ODBC 2.0 function **SQLFreeEnv** has been replaced by **SQLFreeHandle**. For more information, see [SQLFreeHandle](../../../odbc/reference/syntax/sqlfreehandle-function.md). + In ODBC *3.x*, the ODBC 2.0 function **SQLFreeEnv** has been replaced by **SQLFreeHandle**. For more information, see [SQLFreeHandle](../../../odbc/reference/syntax/sqlfreehandle-function.md). > [!NOTE] -> For more information about what the Driver Manager maps this function to when an ODBC 2*.x* application is working with an ODBC 3*.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. +> For more information about what the Driver Manager maps this function to when an ODBC *2.x* application is working with an ODBC *3.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. ## See Also [ODBC API Reference](../../../odbc/reference/syntax/odbc-api-reference.md) diff --git a/docs/odbc/reference/syntax/sqlinstalltranslator-function.md b/docs/odbc/reference/syntax/sqlinstalltranslator-function.md index 6795597e71b..ad7409483a2 100644 --- a/docs/odbc/reference/syntax/sqlinstalltranslator-function.md +++ b/docs/odbc/reference/syntax/sqlinstalltranslator-function.md @@ -28,4 +28,4 @@ manager: craigg **Summary** In ODBC 3.0, **SQLInstallTranslator** has been replaced by [SQLInstallTranslatorEx](../../../odbc/reference/syntax/sqlinstalltranslatorex-function.md). Calls to **SQLInstallTranslator** will be mapped to **SQLInstallTranslatorEx**. For more information, see **SQLInstallTranslatorEx**. - **SQLInstallTranslator** will return FALSE if an application calls it in the ODBC 3*.x* Driver Manager with the *lpszInfFile* argument set to a value other than NULL. The Odbc.inf file used in ODBC 2.*x* is no longer supported in ODBC 3*.x*, even for backward compatibility. + **SQLInstallTranslator** will return FALSE if an application calls it in the ODBC *3.x* Driver Manager with the *lpszInfFile* argument set to a value other than NULL. The Odbc.inf file used in ODBC *2.x* is no longer supported in ODBC *3.x*, even for backward compatibility. diff --git a/docs/odbc/reference/syntax/sqlsetdescrec-function.md b/docs/odbc/reference/syntax/sqlsetdescrec-function.md index 5da68513dda..aa8598850be 100644 --- a/docs/odbc/reference/syntax/sqlsetdescrec-function.md +++ b/docs/odbc/reference/syntax/sqlsetdescrec-function.md @@ -95,7 +95,7 @@ SQLRETURN SQLSetDescRec( |HY013|Memory management error|The function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.| |HY016|Cannot modify an implementation row descriptor|The *DescriptorHandle* argument was associated with an IRD.| |HY021|Inconsistent descriptor information|The *Type* field, or any other field associated with the SQL_DESC_TYPE field in the descriptor, was not valid or consistent.

Descriptor information checked during a consistency check was not consistent. (See "Consistency Checks," later in this section.)| -|HY090|Invalid string or buffer length|(DM) The driver was an ODBC 2*.x* driver, the descriptor was an ARD, the *ColumnNumber* argument was set to 0, and the value specified for the argument *BufferLength* was not equal to 4.| +|HY090|Invalid string or buffer length|(DM) The driver was an ODBC *2.x* driver, the descriptor was an ARD, the *ColumnNumber* argument was set to 0, and the value specified for the argument *BufferLength* was not equal to 4.| |HY117|Connection is suspended due to unknown transaction state. Only disconnect and read-only functions are allowed.|(DM) For more information about suspended state, see [SQLEndTran Function](../../../odbc/reference/syntax/sqlendtran-function.md).| |HYT01|Connection timeout expired|The connection timeout period expired before the data source responded to the request. The connection timeout period is set through **SQLSetConnectAttr**, SQL_ATTR_CONNECTION_TIMEOUT.| |IM001|Driver does not support this function|(DM) The driver associated with the *DescriptorHandle* does not support the function.| diff --git a/docs/odbc/reference/syntax/sqlsetenvattr-function.md b/docs/odbc/reference/syntax/sqlsetenvattr-function.md index 153810644c8..169d4ee20d5 100644 --- a/docs/odbc/reference/syntax/sqlsetenvattr-function.md +++ b/docs/odbc/reference/syntax/sqlsetenvattr-function.md @@ -76,7 +76,7 @@ SQLRETURN SQLSetEnvAttr( |HYC00|Optional feature not implemented|The value specified for the argument *Attribute* was a valid ODBC environment attribute for the version of ODBC supported by the driver, but was not supported by the driver.

(DM) The *Attribute* argument was SQL_ATTR_OUTPUT_NTS, and *ValuePtr* was SQL_FALSE.| ## Comments - An application can call **SQLSetEnvAttr** only if no connection handle is allocated on the environment. All environment attributes successfully set by the application for the environment persist until **SQLFreeHandle** is called on the environment. More than one environment handle can be allocated simultaneously in ODBC 3*.x*. + An application can call **SQLSetEnvAttr** only if no connection handle is allocated on the environment. All environment attributes successfully set by the application for the environment persist until **SQLFreeHandle** is called on the environment. More than one environment handle can be allocated simultaneously in ODBC *3.x*. The format of information set through *ValuePtr* depends on the specified *Attribute*. **SQLSetEnvAttr** will accept attribute information in one of two different formats: a null-terminated character string or a 32-bit integer value. The format of each is noted in the attribute's description. @@ -88,7 +88,7 @@ SQLRETURN SQLSetEnvAttr( |-----------------|-------------------------| |SQL_ATTR_CONNECTION_POOLING (ODBC 3.8)|A 32-bit SQLUINTEGER value that enables or disables connection pooling at the environment level. The following values are used:

SQL_CP_OFF = Connection pooling is turned off. This is the default.

SQL_CP_ONE_PER_DRIVER = A single connection pool is supported for each driver. Every connection in a pool is associated with one driver.

SQL_CP_ONE_PER_HENV = A single connection pool is supported for each environment. Every connection in a pool is associated with one environment.

SQL_CP_DRIVER_AWARE = Use the connection-pool awareness feature of the driver, if it is available. If the driver does not support connection-pool awareness, SQL_CP_DRIVER_AWARE is ignored and SQL_CP_ONE_PER_HENV is used. For more information, see [Driver-Aware Connection Pooling](../../../odbc/reference/develop-app/driver-aware-connection-pooling.md). In an environment where some drivers support and some drivers do not support connection-pool awareness, SQL_CP_DRIVER_AWARE can enable the connection-pool awareness feature on those supporting drivers, but it is equivalent to setting to SQL_CP_ONE_PER_HENV on those drivers that do not support connection-pool awareness feature.

Connection pooling is enabled by calling **SQLSetEnvAttr** to set the SQL_ATTR_CONNECTION_POOLING attribute to SQL_CP_ONE_PER_DRIVER or SQL_CP_ONE_PER_HENV. This call must be made before the application allocates the shared environment for which connection pooling is to be enabled. The environment handle in the call to **SQLSetEnvAttr** is set to null, which makes SQL_ATTR_CONNECTION_POOLING a process-level attribute. After connection pooling is enabled, the application then allocates an implicit shared environment by calling **SQLAllocHandle** with the *InputHandle* argument set to SQL_HANDLE_ENV.

After connection pooling has been enabled and a shared environment has been selected for an application, SQL_ATTR_CONNECTION_POOLING cannot be reset for that environment, because **SQLSetEnvAttr** is called with a null environment handle when setting this attribute. If this attribute is set while connection pooling is already enabled on a shared environment, the attribute affects only shared environments that are allocated subsequently.

It is also possible to enable connection pooling on an environment. Note the following about environment connection pooling:

- Enabling connection pooling on a NULL handle is a process-level attribute. Subsequently allocated environments will be a shared environment, and will inherit the process-level connection pooling setting.
- After an environment is allocated, an application can still change its connection pool setting.
- If environment connection pooling is enabled and the connection's driver uses driver pooling, environment pooling takes preference.

SQL_ATTR_CONNECTION_POOLING is implemented inside the Driver Manager. A driver does not need to implement SQL_ATTR_CONNECTION_POOLING. ODBC 2.0 and 3.0 applications can set this environment attribute.

For more information, see [ODBC Connection Pooling](../../../odbc/reference/develop-app/driver-manager-connection-pooling.md).| |SQL_ATTR_CP_MATCH (ODBC 3.0)|A 32-bit SQLUINTEGER value that determines how a connection is chosen from a connection pool. When **SQLConnect** or **SQLDriverConnect** is called, the Driver Manager determines which connection is reused from the pool. The Driver Manager tries to match the connection options in the call and the connection attributes set by the application to the keywords and connection attributes of the connections in the pool. The value of this attribute determines the level of precision of the matching criteria.

The following values are used to set the value of this attribute:

SQL_CP_STRICT_MATCH = Only connections that exactly match the connection options in the call and the connection attributes set by the application are reused. This is the default.

SQL_CP_RELAXED_MATCH = Connections with matching connection string keywords can be used. Keywords must match, but not all connection attributes must match.

For more information about how the Driver Manager performs the match in connecting to a pooled connection, see [SQLConnect](../../../odbc/reference/syntax/sqlconnect-function.md). For more information about connection pooling, see [ODBC Connection Pooling](../../../odbc/reference/develop-app/driver-manager-connection-pooling.md).| -|SQL_ATTR_ODBC_VERSION (ODBC 3.0)|A 32-bit integer that determines whether certain functionality exhibits ODBC 2*.x* behavior or ODBC 3*.x* behavior. The following values are used to set the value of this attribute:

SQL_OV_ODBC3_80 = The Driver Manager and driver exhibit the following ODBC 3.8 behavior:

- The driver returns and expects ODBC 3.*x* codes for date, time, and timestamp.
- The driver returns ODBC 3.*x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** accepts a search pattern.
- The Driver Manager supports C data type extensibility. For more information about C data type extensibility, see [C Data Types in ODBC](../../../odbc/reference/develop-app/c-data-types-in-odbc.md).

For more information, see [What's New in ODBC 3.8](../../../odbc/reference/what-s-new-in-odbc-3-8.md).

SQL_OV_ODBC3 = The Driver Manager and driver exhibit the following ODBC 3*.x* behavior:

- The driver returns and expects ODBC 3*.x* codes for date, time, and timestamp.
- The driver returns ODBC 3*.x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** accepts a search pattern.
- The Driver Manager does not support C data type extensibility.

SQL_OV_ODBC2 = The Driver Manager and driver exhibit the following ODBC 2*.x* behavior. This is especially useful for an ODBC 2*.x* application working with an ODBC 3*.x* driver.

- The driver returns and expects ODBC 2*.x* codes for date, time, and timestamp.
- The driver returns ODBC 2*.x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** does not accept a search pattern.
- The Driver Manager does not support C data type extensibility.

An application must set this environment attribute before it calls any function that has an SQLHENV argument, or the call will return SQLSTATE HY010 (Function sequence error). It is driver-specific whether additional behavior exists for these environmental flags.

- For more information, see [Declaring the Application's ODBC Version](../../../odbc/reference/develop-app/declaring-the-application-s-odbc-version.md) and [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md).| +|SQL_ATTR_ODBC_VERSION (ODBC 3.0)|A 32-bit integer that determines whether certain functionality exhibits ODBC *2.x* behavior or ODBC *3.x* behavior. The following values are used to set the value of this attribute:

SQL_OV_ODBC3_80 = The Driver Manager and driver exhibit the following ODBC 3.8 behavior:

- The driver returns and expects ODBC *3.x* codes for date, time, and timestamp.
- The driver returns ODBC *3.x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** accepts a search pattern.
- The Driver Manager supports C data type extensibility. For more information about C data type extensibility, see [C Data Types in ODBC](../../../odbc/reference/develop-app/c-data-types-in-odbc.md).

For more information, see [What's New in ODBC 3.8](../../../odbc/reference/what-s-new-in-odbc-3-8.md).

SQL_OV_ODBC3 = The Driver Manager and driver exhibit the following ODBC *3.x* behavior:

- The driver returns and expects ODBC *3.x* codes for date, time, and timestamp.
- The driver returns ODBC *3.x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** accepts a search pattern.
- The Driver Manager does not support C data type extensibility.

SQL_OV_ODBC2 = The Driver Manager and driver exhibit the following ODBC *2.x* behavior. This is especially useful for an ODBC *2.x* application working with an ODBC *3.x* driver.

- The driver returns and expects ODBC *2.x* codes for date, time, and timestamp.
- The driver returns ODBC *2.x* SQLSTATE codes when **SQLError**, **SQLGetDiagField**, or **SQLGetDiagRec** is called.
- The *CatalogName* argument in a call to **SQLTables** does not accept a search pattern.
- The Driver Manager does not support C data type extensibility.

An application must set this environment attribute before it calls any function that has an SQLHENV argument, or the call will return SQLSTATE HY010 (Function sequence error). It is driver-specific whether additional behavior exists for these environmental flags.

- For more information, see [Declaring the Application's ODBC Version](../../../odbc/reference/develop-app/declaring-the-application-s-odbc-version.md) and [Behavioral Changes](../../../odbc/reference/develop-app/behavioral-changes.md).| |SQL_ATTR_OUTPUT_NTS (ODBC 3.0)|A 32-bit integer that determines how the driver returns string data. If SQL_TRUE, the driver returns string data null-terminated. If SQL_FALSE, the driver does not return string data null-terminated.

This attribute defaults to SQL_TRUE. A call to **SQLSetEnvAttr** to set it to SQL_TRUE returns SQL_SUCCESS. A call to **SQLSetEnvAttr** to set it to SQL_FALSE returns SQL_ERROR and SQLSTATE HYC00 (Optional feature not implemented).| ## Related Functions diff --git a/docs/odbc/reference/syntax/sqlsetpos-function.md b/docs/odbc/reference/syntax/sqlsetpos-function.md index a1592cedcb7..880c2b9972c 100644 --- a/docs/odbc/reference/syntax/sqlsetpos-function.md +++ b/docs/odbc/reference/syntax/sqlsetpos-function.md @@ -54,7 +54,7 @@ SQLRETURN SQLSetPos( SQL_POSITION SQL_REFRESH SQL_UPDATE SQL_DELETE > [!NOTE] -> The SQL_ADD value for the *Operation* argument has been deprecated for ODBC 3*.x*. ODBC 3.*x* drivers will need to support SQL_ADD for backward compatibility. This functionality has been replaced by a call to **SQLBulkOperations** with an *Operation* of SQL_ADD. When an ODBC 3.*x* application works with an ODBC 2.*x* driver, the Driver Manager maps a call to **SQLBulkOperations** with an *Operation* of SQL_ADD to **SQLSetPos** with an *Operation* of SQL_ADD. +> The SQL_ADD value for the *Operation* argument has been deprecated for ODBC *3.x*. ODBC *3.x* drivers will need to support SQL_ADD for backward compatibility. This functionality has been replaced by a call to **SQLBulkOperations** with an *Operation* of SQL_ADD. When an ODBC *3.x* application works with an ODBC *2.x* driver, the Driver Manager maps a call to **SQLBulkOperations** with an *Operation* of SQL_ADD to **SQLSetPos** with an *Operation* of SQL_ADD. For more information, see "Comments." @@ -79,7 +79,7 @@ SQLRETURN SQLSetPos( |01000|General warning|Driver-specific informational message. (Function returns SQL_SUCCESS_WITH_INFO.)| |01001|Cursor operation conflict|The *Operation* argument was SQL_DELETE or SQL_UPDATE, and no rows or more than one row were deleted or updated. (For more information about updates to more than one row, see the description of the SQL_ATTR_SIMULATE_CURSOR *Attribute* in **SQLSetStmtAttr**.) (Function returns SQL_SUCCESS_WITH_INFO.)

The *Operation* argument was SQL_DELETE or SQL_UPDATE, and the operation failed because of optimistic concurrency. (Function returns SQL_SUCCESS_WITH_INFO.)| |01004|String data right truncation|The *Operation* argument was SQL_REFRESH, and string or binary data returned for a column or columns with a data type of SQL_C_CHAR or SQL_C_BINARY resulted in the truncation of nonblank character or non-NULL binary data.| -|01S01|Error in row|The *RowNumber* argument was 0, and an error occurred in one or more rows while performing the operation specified with the *Operation* argument.

(SQL_SUCCESS_WITH_INFO is returned if an error occurs on one or more, but not all, rows of a multirow operation, and SQL_ERROR is returned if an error occurs on a single-row operation.)

(This SQLSTATE is returned only when **SQLSetPos** is called after **SQLExtendedFetch**, if the driver is an ODBC 2.*x* driver and the cursor library is not used.)| +|01S01|Error in row|The *RowNumber* argument was 0, and an error occurred in one or more rows while performing the operation specified with the *Operation* argument.

(SQL_SUCCESS_WITH_INFO is returned if an error occurs on one or more, but not all, rows of a multirow operation, and SQL_ERROR is returned if an error occurs on a single-row operation.)

(This SQLSTATE is returned only when **SQLSetPos** is called after **SQLExtendedFetch**, if the driver is an ODBC *2.x* driver and the cursor library is not used.)| |01S07|Fractional truncation|The *Operation* argument was SQL_REFRESH, the data type of the application buffer was not SQL_C_CHAR or SQL_C_BINARY, and the data returned to application buffers for one or more columns was truncated. For numeric data types, the fractional part of the number was truncated. For time, timestamp, and interval data types containing a time component, the fractional portion of the time was truncated.

(Function returns SQL_SUCCESS_WITH_INFO.)| |07006|Restricted data type attribute violation|The data value of a column in the result set could not be converted to the data type specified by *TargetType* in the call to **SQLBindCol**.| |07009|Invalid descriptor index|The argument *Operation* was SQL_REFRESH or SQL_UPDATE, and a column was bound with a column number greater than the number of columns in the result set.| @@ -99,8 +99,8 @@ SQLRETURN SQLSetPos( |HY000|General error|An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by **SQLGetDiagRec** in the *\*MessageText* buffer describes the error and its cause.| |HY001|Memory allocation error|The driver was unable to allocate memory required to support execution or completion of the function.| |HY008|Operation canceled|Asynchronous processing was enabled for the *StatementHandle*. The function was called, and before it completed execution, **SQLCancel** or **SQLCancelHandle** was called on the *StatementHandle*, and then the function was called again on the *StatementHandle*.

The function was called, and before it completed execution, **SQLCancel** or **SQLCancelHandle** was called on the *StatementHandle* from a different thread in a multithread application.| -|HY010|Function sequence error|(DM) An asynchronously executing function was called for the connection handle that is associated with the *StatementHandle*. This asynchronous function was still executing when the SQLSetPos function was called.

(DM) The specified *StatementHandle* was not in an executed state. The function was called without first calling **SQLExecDirect**, **SQLExecute**, or a catalog function.

(DM) An asynchronously executing function (not this one) was called for the *StatementHandle* and was still executing when this function was called.

(DM) **SQLExecute**, **SQLExecDirect**, **SQLBulkOperations**, or **SQLSetPos** was called for the *StatementHandle* and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

(DM) The driver was an ODBC 2.*x* driver, and **SQLSetPos** was called for a *StatementHandle* after **SQLFetch** was called.| -|HY011|Attribute cannot be set now|(DM) The driver was an ODBC 2.*x* driver; the SQL_ATTR_ROW_STATUS_PTR statement attribute was set; then **SQLSetPos** was called before **SQLFetch**, **SQLFetchScroll**, or **SQLExtendedFetch** was called.| +|HY010|Function sequence error|(DM) An asynchronously executing function was called for the connection handle that is associated with the *StatementHandle*. This asynchronous function was still executing when the SQLSetPos function was called.

(DM) The specified *StatementHandle* was not in an executed state. The function was called without first calling **SQLExecDirect**, **SQLExecute**, or a catalog function.

(DM) An asynchronously executing function (not this one) was called for the *StatementHandle* and was still executing when this function was called.

(DM) **SQLExecute**, **SQLExecDirect**, **SQLBulkOperations**, or **SQLSetPos** was called for the *StatementHandle* and returned SQL_NEED_DATA. This function was called before data was sent for all data-at-execution parameters or columns.

(DM) The driver was an ODBC *2.x* driver, and **SQLSetPos** was called for a *StatementHandle* after **SQLFetch** was called.| +|HY011|Attribute cannot be set now|(DM) The driver was an ODBC *2.x* driver; the SQL_ATTR_ROW_STATUS_PTR statement attribute was set; then **SQLSetPos** was called before **SQLFetch**, **SQLFetchScroll**, or **SQLExtendedFetch** was called.| |HY013|Memory management error|The function call could not be processed because the underlying memory objects could not be accessed, possibly because of low memory conditions.| |HY090|Invalid string or buffer length|The *Operation* argument was SQL_UPDATE, a data value was a null pointer, and the column length value was not 0, SQL_DATA_AT_EXEC, SQL_COLUMN_IGNORE, SQL_NULL_DATA, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.

The *Operation* argument was SQL_UPDATE; a data value was not a null pointer; the C data type was SQL_C_BINARY or SQL_C_CHAR; and the column length value was less than 0 but not equal to SQL_DATA_AT_EXEC, SQL_COLUMN_IGNORE, SQL_NTS, or SQL_NULL_DATA, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET.

The value in a length/indicator buffer was SQL_DATA_AT_EXEC; the SQL type was either SQL_LONGVARCHAR, SQL_LONGVARBINARY, or a long data source-specific data type; and the SQL_NEED_LONG_DATA_LEN information type in **SQLGetInfo** was "Y".| |HY092|Invalid attribute identifier|(DM) The value specified for the *Operation* argument was invalid.

(DM) The value specified for the *LockType* argument was invalid.

The *Operation* argument was SQL_UPDATE or SQL_DELETE, and the SQL_ATTR_CONCURRENCY statement attribute was SQL_ATTR_CONCUR_READ_ONLY.| @@ -117,7 +117,7 @@ SQLRETURN SQLSetPos( ## Comments > [!CAUTION] -> For information on the statement states that **SQLSetPos** can be called in and what it needs to do for compatibility with ODBC 2*.x* applications, see [Block Cursors, Scrollable Cursors, and Backward Compatibility](../../../odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md). +> For information on the statement states that **SQLSetPos** can be called in and what it needs to do for compatibility with ODBC *2.x* applications, see [Block Cursors, Scrollable Cursors, and Backward Compatibility](../../../odbc/reference/appendixes/block-cursors-scrollable-cursors-and-backward-compatibility.md). ## RowNumber Argument The *RowNumber* argument specifies the number of the row in the rowset on which to perform the operation specified by the *Operation* argument. If *RowNumber* is 0, the operation applies to every row in the rowset. *RowNumber* must be a value from 0 to the number of rows in the rowset. diff --git a/docs/odbc/reference/syntax/sqlsetscrolloptions-function.md b/docs/odbc/reference/syntax/sqlsetscrolloptions-function.md index 4eba92417d5..422defce954 100644 --- a/docs/odbc/reference/syntax/sqlsetscrolloptions-function.md +++ b/docs/odbc/reference/syntax/sqlsetscrolloptions-function.md @@ -26,13 +26,13 @@ manager: craigg Version Introduced: ODBC 1.0 Standards Compliance: Deprecated **Summary** - In ODBC 3*.x*, the ODBC 2.0 function **SQLSetScrollOptions** has been replaced by calls to **SQLGetInfo** and **SQLSetStmtAttr**. + In ODBC *3.x*, the ODBC 2.0 function **SQLSetScrollOptions** has been replaced by calls to **SQLGetInfo** and **SQLSetStmtAttr**. > [!NOTE] -> For more information about what the Driver Manager maps this function to when an ODBC 2*.x* application is working with an ODBC 3*.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. +> For more information about what the Driver Manager maps this function to when an ODBC *2.x* application is working with an ODBC *3.x* driver, see [Mapping Deprecated Functions](../../../odbc/reference/appendixes/mapping-deprecated-functions.md) in Appendix G: Driver Guidelines for Backward Compatibility. > > [!NOTE] -> When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC 3*.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**. +> When the Driver Manager maps **SQLSetScrollOptions** for an application working with an ODBC *3.x* driver that does not support **SQLSetScrollOptions**, the Driver Manager sets the SQL_ROWSET_SIZE statement option, not the SQL_ATTR_ROW_ARRAY_SIZE statement attribute, to the *RowsetSize* argument in **SQLSetScrollOption**. As a result, **SQLSetScrollOptions** cannot be used by an application when fetching multiple rows by a call to **SQLFetch** or **SQLFetchScroll**. It can be used only when fetching multiple rows by a call to **SQLExtendedFetch**. ## Remarks If your application will run on a 64-bit operating system, see [ODBC 64-Bit Information](../../../odbc/reference/odbc-64-bit-information.md). diff --git a/docs/odbc/reference/syntax/sqlsetstmtattr-function.md b/docs/odbc/reference/syntax/sqlsetstmtattr-function.md index 0b884d86cb1..d4eb86aff76 100644 --- a/docs/odbc/reference/syntax/sqlsetstmtattr-function.md +++ b/docs/odbc/reference/syntax/sqlsetstmtattr-function.md @@ -29,7 +29,7 @@ manager: craigg **SQLSetStmtAttr** sets attributes related to a statement. > [!NOTE] -> For more information about what the Driver Manager maps this function to when an ODBC 3*.x* application is working with an ODBC 2*.x* driver, see [Mapping Replacement Functions for Backward Compatibility of Applications](../../../odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md). +> For more information about what the Driver Manager maps this function to when an ODBC *3.x* application is working with an ODBC *2.x* driver, see [Mapping Replacement Functions for Backward Compatibility of Applications](../../../odbc/reference/develop-app/mapping-replacement-functions-for-backward-compatibility-of-applications.md). ## Syntax @@ -119,10 +119,10 @@ SQLRETURN SQLSetStmtAttr( The format of information set with *ValuePtr* depends on the specified *Attribute*. **SQLSetStmtAttr** accepts attribute information in one of two different formats: a character string or an integer value. The format of each is noted in the attribute's description. This format applies to the information returned for each attribute in **SQLGetStmtAttr**. Character strings pointed to by the *ValuePtr* argument of **SQLSetStmtAttr** have a length of *StringLength*. > [!NOTE] -> The ability to set statement attributes at the connection level by calling **SQLSetConnectAttr** has been deprecated in ODBC 3*.x*. ODBC 3*.x* applications should never set statement attributes at the connection level. ODBC 3*.x* statement attributes cannot be set at the connection level, with the exception of the SQL_ATTR_METADATA_ID and SQL_ATTR_ASYNC_ENABLE attributes, which are both connection attributes and statement attributes, and can be set at either the connection level or the statement level. +> The ability to set statement attributes at the connection level by calling **SQLSetConnectAttr** has been deprecated in ODBC *3.x*. ODBC *3.x* applications should never set statement attributes at the connection level. ODBC *3.x* statement attributes cannot be set at the connection level, with the exception of the SQL_ATTR_METADATA_ID and SQL_ATTR_ASYNC_ENABLE attributes, which are both connection attributes and statement attributes, and can be set at either the connection level or the statement level. > > [!NOTE] -> ODBC 3*.x* drivers need only support this functionality if they should work with ODBC 2*.x* applications that set ODBC 2*.x* statement options at the connection level. For more information, see "Setting Statement Options on the Connection Level" under [SQLSetConnectOption Mapping](../../../odbc/reference/appendixes/sqlsetconnectoption-mapping.md) in Appendix G: Driver Guidelines for Backward Compatibility. +> ODBC *3.x* drivers need only support this functionality if they should work with ODBC *2.x* applications that set ODBC *2.x* statement options at the connection level. For more information, see "Setting Statement Options on the Connection Level" under [SQLSetConnectOption Mapping](../../../odbc/reference/appendixes/sqlsetconnectoption-mapping.md) in Appendix G: Driver Guidelines for Backward Compatibility. ## Statement Attributes That Set Descriptor Fields Many statement attributes correspond to a header field of a descriptor. Setting these attributes actually results in the setting of the descriptor fields. Setting fields by a call to **SQLSetStmtAttr** rather than to **SQLSetDescField** has the advantage that a descriptor handle does not have to be obtained for the function call. @@ -182,16 +182,16 @@ SQLRETURN SQLSetStmtAttr( |SQL_ATTR_PARAMS_PROCESSED_PTR (ODBC 3.0)|An SQLULEN \* record field that points to a buffer in which to return the number of sets of parameters that have been processed, including error sets. No number will be returned if this is a null pointer.

Setting this statement attribute sets the SQL_DESC_ROWS_PROCESSED_PTR field in the IPD header.

If the call to **SQLExecDirect** or **SQLExecute** that fills in the buffer pointed to by this attribute does not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined.

For more information, see [Using Arrays of Parameters](../../../odbc/reference/develop-app/using-arrays-of-parameters.md).| |SQL_ATTR_PARAMSET_SIZE (ODBC 3.0)|An SQLULEN value that specifies the number of values for each parameter. If SQL_ATTR_PARAMSET_SIZE is greater than 1, SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR of the APD point to arrays. The cardinality of each array is equal to the value of this field.

This attribute is ignored when there is no bound parameter.

For more information, see [Using Arrays of Parameters](../../../odbc/reference/develop-app/using-arrays-of-parameters.md).

Setting this statement attribute sets the SQL_DESC_ARRAY_SIZE field in the APD header.| |SQL_ATTR_QUERY_TIMEOUT (ODBC 1.0)|An SQLULEN value corresponding to the number of seconds to wait for an SQL statement to execute before returning to the application. If *ValuePtr* is equal to 0 (default), there is no timeout.

If the specified timeout exceeds the maximum timeout in the data source or is smaller than the minimum timeout, **SQLSetStmtAttr** substitutes that value and returns SQLSTATE 01S02 (Option value changed).

Note that the application need not call **SQLCloseCursor** to reuse the statement if a **SELECT** statement timed out.

The query timeout set in this statement attribute is valid in both synchronous and asynchronous modes.| -|SQL_ATTR_RETRIEVE_DATA (ODBC 2.0)|An SQLULEN value:

SQL_RD_ON = **SQLFetchScroll** and, in ODBC 3*.x*, **SQLFetch** retrieve data after it positions the cursor to the specified location. This is the default.

SQL_RD_OFF = **SQLFetchScroll** and, in ODBC 3*.x*, **SQLFetch** do not retrieve data after it positions the cursor.

By setting SQL_RETRIEVE_DATA to SQL_RD_OFF, an application can verify that a row exists or retrieve a bookmark for the row without incurring the overhead of retrieving rows. For more information, see [Scrolling and Fetching Rows](../../../odbc/reference/develop-app/scrolling-and-fetching-rows-odbc.md).

The value of this attribute can be set on an open cursor; however, the setting might not take effect immediately, in which case the driver will return SQLSTATE 01S02 (Option value changed) and reset the attribute to its original value.| +|SQL_ATTR_RETRIEVE_DATA (ODBC 2.0)|An SQLULEN value:

SQL_RD_ON = **SQLFetchScroll** and, in ODBC *3.x*, **SQLFetch** retrieve data after it positions the cursor to the specified location. This is the default.

SQL_RD_OFF = **SQLFetchScroll** and, in ODBC *3.x*, **SQLFetch** do not retrieve data after it positions the cursor.

By setting SQL_RETRIEVE_DATA to SQL_RD_OFF, an application can verify that a row exists or retrieve a bookmark for the row without incurring the overhead of retrieving rows. For more information, see [Scrolling and Fetching Rows](../../../odbc/reference/develop-app/scrolling-and-fetching-rows-odbc.md).

The value of this attribute can be set on an open cursor; however, the setting might not take effect immediately, in which case the driver will return SQLSTATE 01S02 (Option value changed) and reset the attribute to its original value.| |SQL_ATTR_ROW_ARRAY_SIZE (ODBC 3.0)|An SQLULEN value that specifies the number of rows returned by each call to **SQLFetch** or **SQLFetchScroll**. It is also the number of rows in a bookmark array used in a bulk bookmark operation in **SQLBulkOperations**. The default value is 1.

If the specified rowset size exceeds the maximum rowset size supported by the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).

For more information, see [Rowset Size](../../../odbc/reference/develop-app/rowset-size.md).

Setting this statement attribute sets the SQL_DESC_ARRAY_SIZE field in the ARD header.| |SQL_ATTR_ROW_BIND_OFFSET_PTR (ODBC 3.0)|An SQLULEN * value that points to an offset added to pointers to change binding of column data. If this field is non-null, the driver dereferences the pointer, adds the dereferenced value to each of the deferred fields in the descriptor record (SQL_DESC_DATA_PTR, SQL_DESC_INDICATOR_PTR, and SQL_DESC_OCTET_LENGTH_PTR), and uses the new pointer values when binding. It is set to null by default.

Setting this statement attribute sets the SQL_DESC_BIND_OFFSET_PTR field in the ARD header.| |SQL_ATTR_ROW_BIND_TYPE (ODBC 1.0)|An SQLULEN value that sets the binding orientation to be used when **SQLFetch** or **SQLFetchScroll** is called on the associated statement. Column-wise binding is selected by setting the value to SQL_BIND_BY_COLUMN. Row-wise binding is selected by setting the value to the length of a structure or an instance of a buffer into which result columns will be bound.

If a length is specified, it must include space for all of the bound columns and any padding of the structure or buffer to ensure that when the address of a bound column is incremented with the specified length, the result will point to the beginning of the same column in the next row. When using the **sizeof** operator with structures or unions in ANSI C, this behavior is guaranteed.

Column-wise binding is the default binding orientation for **SQLFetch** and **SQLFetchScroll**.

For more information, see [Binding Columns for Use with Block Cursors](../../../odbc/reference/develop-app/binding-columns-for-use-with-block-cursors.md).

Setting this statement attribute sets the SQL_DESC_BIND_TYPE field in the ARD header.| |SQL_ATTR_ROW_NUMBER (ODBC 2.0)|An SQLULEN value that is the number of the current row in the entire result set. If the number of the current row cannot be determined or there is no current row, the driver returns 0.

This attribute can be retrieved by a call to **SQLGetStmtAttr** but not set by a call to **SQLSetStmtAttr**.| |SQL_ATTR_ROW_OPERATION_PTR (ODBC 3.0)|An SQLUSMALLINT \* value that points to an array of SQLUSMALLINT values used to ignore a row during a bulk operation using **SQLSetPos**. Each value is set to either SQL_ROW_PROCEED (for the row to be included in the bulk operation) or SQL_ROW_IGNORE (for the row to be excluded from the bulk operation). (Rows cannot be ignored by using this array during calls to **SQLBulkOperations**.)

This statement attribute can be set to a null pointer, in which case the driver does not return row status values. This attribute can be set at any time, but the new value is not used until the next time **SQLSetPos** is called.

For more information, see [Updating Rows in the Rowset with SQLSetPos](../../../odbc/reference/develop-app/updating-rows-in-the-rowset-with-sqlsetpos.md) and [Deleting Rows in the Rowset with SQLSetPos](../../../odbc/reference/develop-app/deleting-rows-in-the-rowset-with-sqlsetpos.md).

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the ARD.| -|SQL_ATTR_ROW_STATUS_PTR (ODBC 3.0)|An SQLUSMALLINT \* value that points to an array of SQLUSMALLINT values containing row status values after a call to **SQLFetch** or **SQLFetchScroll**. The array has as many elements as there are rows in the rowset.

This statement attribute can be set to a null pointer, in which case the driver does not return row status values. This attribute can be set at any time, but the new value is not used until the next time **SQLBulkOperations**, **SQLFetch**, **SQLFetchScroll**, or **SQLSetPos** is called.

For more information, see [Number of Rows Fetched and Status](../../../odbc/reference/develop-app/number-of-rows-fetched-and-status.md).

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the IRD header.

This attribute is mapped by an ODBC 2*.x* driver to the *rgbRowStatus* array in a call to **SQLExtendedFetch**.| +|SQL_ATTR_ROW_STATUS_PTR (ODBC 3.0)|An SQLUSMALLINT \* value that points to an array of SQLUSMALLINT values containing row status values after a call to **SQLFetch** or **SQLFetchScroll**. The array has as many elements as there are rows in the rowset.

This statement attribute can be set to a null pointer, in which case the driver does not return row status values. This attribute can be set at any time, but the new value is not used until the next time **SQLBulkOperations**, **SQLFetch**, **SQLFetchScroll**, or **SQLSetPos** is called.

For more information, see [Number of Rows Fetched and Status](../../../odbc/reference/develop-app/number-of-rows-fetched-and-status.md).

Setting this statement attribute sets the SQL_DESC_ARRAY_STATUS_PTR field in the IRD header.

This attribute is mapped by an ODBC *2.x* driver to the *rgbRowStatus* array in a call to **SQLExtendedFetch**.| |SQL_ATTR_ROWS_FETCHED_PTR (ODBC 3.0)|An SQLULEN \* value that points to a buffer in which to return the number of rows fetched after a call to **SQLFetch** or **SQLFetchScroll**; the number of rows affected by a bulk operation performed by a call to **SQLSetPos** with an *Operation* argument of SQL_REFRESH; or the number of rows affected by a bulk operation performed by **SQLBulkOperations**. This number includes error rows.

For more information, see [Number of Rows Fetched and Status](../../../odbc/reference/develop-app/number-of-rows-fetched-and-status.md).

Setting this statement attribute sets the SQL_DESC_ROWS_PROCESSED_PTR field in the IRD header.

If the call to **SQLFetch** or **SQLFetchScroll** that fills in the buffer pointed to by this attribute does not return SQL_SUCCESS or SQL_SUCCESS_WITH_INFO, the contents of the buffer are undefined.| |SQL_ATTR_SIMULATE_CURSOR (ODBC 2.0)|An SQLULEN value that specifies whether drivers that simulate positioned update and delete statements guarantee that such statements affect only one single row.

To simulate positioned update and delete statements, most drivers construct a searched **UPDATE** or **DELETE** statement containing a **WHERE** clause that specifies the value of each column in the current row. Unless these columns make up a unique key, such a statement can affect more than one row.

To guarantee that such statements affect only one row, the driver determines the columns in a unique key and adds these columns to the result set. If an application guarantees that the columns in the result set make up a unique key, the driver is not required to do so. This may reduce execution time.

SQL_SC_NON_UNIQUE = The driver does not guarantee that simulated positioned update or delete statements will affect only one row; it is the application's responsibility to do so. If a statement affects more than one row, **SQLExecute**, **SQLExecDirect**, or **SQLSetPos** returns SQLSTATE 01001 (Cursor operation conflict).

SQL_SC_TRY_UNIQUE = The driver attempts to guarantee that simulated positioned update or delete statements affect only one row. The driver always executes such statements, even if they might affect more than one row, such as when there is no unique key. If a statement affects more than one row, **SQLExecute**, **SQLExecDirect**, or **SQLSetPos** returns SQLSTATE 01001 (Cursor operation conflict).

SQL_SC_UNIQUE = The driver guarantees that simulated positioned update or delete statements affect only one row. If the driver cannot guarantee this for a given statement, **SQLExecDirect** or **SQLPrepare** returns an error.

If the data source provides native SQL support for positioned update and delete statements and the driver does not simulate cursors, SQL_SUCCESS is returned when SQL_SC_UNIQUE is requested for SQL_SIMULATE_CURSOR. SQL_SUCCESS_WITH_INFO is returned if SQL_SC_TRY_UNIQUE or SQL_SC_NON_UNIQUE is requested. If the data source provides the SQL_SC_TRY_UNIQUE level of support and the driver does not, SQL_SUCCESS is returned for SQL_SC_TRY_UNIQUE and SQL_SUCCESS_WITH_INFO is returned for SQL_SC_NON_UNIQUE.

If the specified cursor simulation type is not supported by the data source, the driver substitutes a different simulation type and returns SQLSTATE 01S02 (Option value changed). For SQL_SC_UNIQUE, the driver substitutes, in order, SQL_SC_TRY_UNIQUE or SQL_SC_NON_UNIQUE. For SQL_SC_TRY_UNIQUE, the driver substitutes SQL_SC_NON_UNIQUE.

The default is SQL_SC_UNIQUE.

For more information, see [Simulating Positioned Update and Delete Statements](../../../odbc/reference/develop-app/simulating-positioned-update-and-delete-statements.md).| -|SQL_ATTR_USE_BOOKMARKS (ODBC 2.0)|An SQLULEN value that specifies whether an application will use bookmarks with a cursor:

SQL_UB_OFF = Off (the default)

SQL_UB_VARIABLE = An application will use bookmarks with a cursor, and the driver will provide variable-length bookmarks if they are supported. SQL_UB_FIXED is deprecated in ODBC 3*.x*. ODBC 3*.x* applications should always use variable-length bookmarks, even when working with ODBC 2*.x* drivers (which supported only 4-byte, fixed-length bookmarks). This is because a fixed-length bookmark is just a special case of a variable-length bookmark. When working with an ODBC 2*.x* driver, the Driver Manager maps SQL_UB_VARIABLE to SQL_UB_FIXED.

To use bookmarks with a cursor, the application must specify this attribute with the SQL_UB_VARIABLE value before opening the cursor.

For more information, see [Retrieving Bookmarks](../../../odbc/reference/develop-app/retrieving-bookmarks.md).| +|SQL_ATTR_USE_BOOKMARKS (ODBC 2.0)|An SQLULEN value that specifies whether an application will use bookmarks with a cursor:

SQL_UB_OFF = Off (the default)

SQL_UB_VARIABLE = An application will use bookmarks with a cursor, and the driver will provide variable-length bookmarks if they are supported. SQL_UB_FIXED is deprecated in ODBC *3.x*. ODBC *3.x* applications should always use variable-length bookmarks, even when working with ODBC *2.x* drivers (which supported only 4-byte, fixed-length bookmarks). This is because a fixed-length bookmark is just a special case of a variable-length bookmark. When working with an ODBC *2.x* driver, the Driver Manager maps SQL_UB_VARIABLE to SQL_UB_FIXED.

To use bookmarks with a cursor, the application must specify this attribute with the SQL_UB_VARIABLE value before opening the cursor.

For more information, see [Retrieving Bookmarks](../../../odbc/reference/develop-app/retrieving-bookmarks.md).| [1] These functions can be called asynchronously only if the descriptor is an implementation descriptor, not an application descriptor. diff --git a/docs/odbc/reference/syntax/sqlspecialcolumns-function.md b/docs/odbc/reference/syntax/sqlspecialcolumns-function.md index 7df0a769298..6c2756b4c59 100644 --- a/docs/odbc/reference/syntax/sqlspecialcolumns-function.md +++ b/docs/odbc/reference/syntax/sqlspecialcolumns-function.md @@ -145,9 +145,9 @@ SQLRETURN SQLSpecialColumns( **SQLSpecialColumns** returns the results as a standard result set, ordered by SCOPE. - The following columns have been renamed for ODBC 3*.x*. The column name changes do not affect backward compatibility because applications bind by column number. + The following columns have been renamed for ODBC *3.x*. The column name changes do not affect backward compatibility because applications bind by column number. -|ODBC 2.0 column|ODBC 3*.x* column| +|ODBC 2.0 column|ODBC *3.x* column| |---------------------|-----------------------| |PRECISION|COLUMN_SIZE| |LENGTH|BUFFER_LENGTH| diff --git a/docs/odbc/reference/syntax/sqlstatistics-function.md b/docs/odbc/reference/syntax/sqlstatistics-function.md index e5bfeb41f3d..2845fe138c4 100644 --- a/docs/odbc/reference/syntax/sqlstatistics-function.md +++ b/docs/odbc/reference/syntax/sqlstatistics-function.md @@ -80,7 +80,7 @@ SQLRETURN SQLStatistics( SQL_ENSURE requests that the driver unconditionally retrieve the statistics. (Drivers that conform only to the Open Group standard and do not support ODBC extensions will not be able to support SQL_ENSURE.) - SQL_QUICK requests that the driver retrieve the CARDINALITY and PAGES only if they are readily available from the server. In this case, the driver does not ensure that the values are current. (Applications that are written to the Open Group standard will always get SQL_QUICK behavior from ODBC 3*.x*-compliant drivers.) + SQL_QUICK requests that the driver retrieve the CARDINALITY and PAGES only if they are readily available from the server. In this case, the driver does not ensure that the values are current. (Applications that are written to the Open Group standard will always get SQL_QUICK behavior from ODBC *3.x*-compliant drivers.) ## Returns SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE. @@ -120,9 +120,9 @@ SQLRETURN SQLStatistics( > [!NOTE] > For more information about the general use, arguments, and returned data of ODBC catalog functions, see [Catalog Functions](../../../odbc/reference/develop-app/catalog-functions.md). - The following columns have been renamed for ODBC 3*.x*. The column name changes do not affect backward compatibility because applications bind by column number. + The following columns have been renamed for ODBC *3.x*. The column name changes do not affect backward compatibility because applications bind by column number. -|ODBC 2.0 column|ODBC 3*.x* column| +|ODBC 2.0 column|ODBC *3.x* column| |---------------------|-----------------------| |TABLE_QUALIFIER|TABLE_CAT| |TABLE_OWNER|TABLE_SCHEM| diff --git a/docs/odbc/reference/syntax/sqltableprivileges-function.md b/docs/odbc/reference/syntax/sqltableprivileges-function.md index a96c208c122..d262fc01746 100644 --- a/docs/odbc/reference/syntax/sqltableprivileges-function.md +++ b/docs/odbc/reference/syntax/sqltableprivileges-function.md @@ -108,9 +108,9 @@ SQLRETURN SQLTablePrivileges( > [!NOTE] > For more information about the general use, arguments, and returned data of ODBC catalog functions, see [Catalog Functions](../../../odbc/reference/develop-app/catalog-functions.md). - The following columns have been renamed for ODBC 3*.x*. The column name changes do not affect backward compatibility because applications bind by column number. + The following columns have been renamed for ODBC *3.x*. The column name changes do not affect backward compatibility because applications bind by column number. -|ODBC 2.0 column|ODBC 3*.x* column| +|ODBC 2.0 column|ODBC *3.x* column| |---------------------|-----------------------| |TABLE_QUALIFIER|TABLE_CAT| |TABLE_OWNER|TABLE_SCHEM| diff --git a/docs/odbc/reference/syntax/sqltransact-function.md b/docs/odbc/reference/syntax/sqltransact-function.md index dedcd8fdcd4..5111fe4f344 100644 --- a/docs/odbc/reference/syntax/sqltransact-function.md +++ b/docs/odbc/reference/syntax/sqltransact-function.md @@ -26,7 +26,7 @@ manager: craigg Version Introduced: ODBC 1.0 Standards Compliance: Deprecated **Summary** - In ODBC 3.*x*, the ODBC 2*.x* function **SQLTransact** has been replaced by **SQLEndTran**. For more information, see [SQLEndTran](../../../odbc/reference/syntax/sqlendtran-function.md). + In ODBC *3.x*, the ODBC *2.x* function **SQLTransact** has been replaced by **SQLEndTran**. For more information, see [SQLEndTran](../../../odbc/reference/syntax/sqlendtran-function.md). > [!NOTE] > The attribute SQL_ASYNC_DBC_FUNCTION_ENABLE, which was introduced in ODBC 3.8, is not supported by **SQLTransact**. Applications using an asynchronous operation on a connection handle must use **SQLEndTran**. From 5cd930439dc001be17c9285eb3604e58df8915a0 Mon Sep 17 00:00:00 2001 From: Mihaela Blendea Date: Wed, 10 Jul 2019 14:31:32 -0700 Subject: [PATCH 45/46] Add new known issue --- docs/big-data-cluster/release-notes-big-data-cluster.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/big-data-cluster/release-notes-big-data-cluster.md b/docs/big-data-cluster/release-notes-big-data-cluster.md index b4a6095ca0d..c5a9090acd4 100644 --- a/docs/big-data-cluster/release-notes-big-data-cluster.md +++ b/docs/big-data-cluster/release-notes-big-data-cluster.md @@ -109,6 +109,11 @@ The following sections describe the known issues and limitations with this relea - AKS logs may contain SA password for big data cluster deployments. +#### Kibana logs dashboards + +- Between Aris CTP 3.0 and 3.1, the Kibana version was upgraded from 6.3.1 to 7.0.1. This has made the Edge browser incompatible with Kibana. Users will see a blank page when loading the current version of the Kibana dashboards in Edge. See [here]( https://www.elastic.co/support/matrix#matrix_browse) for supported browsers for Kibana.rs + + ## CTP 3.0 (May) The following sections describe the new features and known issues for big data clusters in SQL Server 2019 CTP 3.0. From 858adad31848cc259975a8e67fc3bf13922de45d Mon Sep 17 00:00:00 2001 From: Vasu Bhog Date: Wed, 10 Jul 2019 15:10:04 -0700 Subject: [PATCH 46/46] Azure Data Studio July Release Update --- docs/azure-data-studio/download.md | 24 +++++++++---------- .../release-notes-azure-data-studio.md | 24 +++++++++++++++++-- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/docs/azure-data-studio/download.md b/docs/azure-data-studio/download.md index 72025fe8d7b..5ced88d878d 100644 --- a/docs/azure-data-studio/download.md +++ b/docs/azure-data-studio/download.md @@ -9,7 +9,7 @@ author: "markingmyname" ms.author: "maghan" manager: jroth ms.custom: "seodec18" -ms.date: "06/25/2019" +ms.date: "07/10/2019" ms.reviewer: "alayu; sstein" --- @@ -18,16 +18,16 @@ ms.reviewer: "alayu; sstein" [!INCLUDE[name-sos](../includes/name-sos.md)] runs on Windows, macOS, and Linux. -Download and install the latest release, the *June Release*: +Download and install the latest release, the *July Release*: > [!NOTE] > If you're updating from SQL Operations Studio and want to keep your settings, keyboard shortcuts, or code snippets, see [Move user settings](#move-user-settings). |Platform|Download|Release date| Version | |:---|:---|:---|:---| -|Windows|[User Installer (recommended)](https://go.microsoft.com/fwlink/?linkid=2094100)
[System Installer](https://go.microsoft.com/fwlink/?linkid=2094200)
[.zip](https://go.microsoft.com/fwlink/?linkid=2094201)|June 6, 2019 |1.8.0| -|macOS|[.zip](https://go.microsoft.com/fwlink/?linkid=2094202)|June 6, 2019 |1.8.0| -|Linux|[.deb](https://go.microsoft.com/fwlink/?linkid=2094203)
[.rpm](https://go.microsoft.com/fwlink/?linkid=2094102)
[.tar.gz](https://go.microsoft.com/fwlink/?linkid=2094101)|June 6, 2019 |1.8.0| +|Windows|[User Installer (recommended)](https://go.microsoft.com/fwlink/?linkid=2098449)
[System Installer](https://go.microsoft.com/fwlink/?linkid=2098450)
[.zip](https://go.microsoft.com/fwlink/?linkid=2098500)|July 10, 2019 |1.9.0| +|macOS|[.zip](https://go.microsoft.com/fwlink/?linkid=2098501)|July 10, 2019 |1.9.0| +|Linux|[.deb](https://go.microsoft.com/fwlink/?linkid=2098279)
[.rpm](https://go.microsoft.com/fwlink/?linkid=2098280)
[.tar.gz](https://go.microsoft.com/fwlink/?linkid=2098197)|July 10, 2019 |1.9.0| For details about the latest release, see the [release notes](release-notes.md). @@ -40,25 +40,25 @@ The *user installer* is recommended because it does not require administrator pr **User Installer** (recommended) -1. Download and run the [[!INCLUDE[name-sos](../includes/name-sos-short.md)] *user* installer for Windows](https://go.microsoft.com/fwlink/?linkid=2094100). +1. Download and run the [[!INCLUDE[name-sos](../includes/name-sos-short.md)] *user* installer for Windows](https://go.microsoft.com/fwlink/?linkid=2098449). 2. Start the [!INCLUDE[name-sos-short](../includes/name-sos-short.md)] app. **System Installer** -1. Download and run the [[!INCLUDE[name-sos](../includes/name-sos-short.md)] *system* installer for Windows](https://go.microsoft.com/fwlink/?linkid=2094200). +1. Download and run the [[!INCLUDE[name-sos](../includes/name-sos-short.md)] *system* installer for Windows](https://go.microsoft.com/fwlink/?linkid=2098450 ). 2. Start the [!INCLUDE[name-sos-short](../includes/name-sos-short.md)] app. **.zip file** -1. Download [[!INCLUDE[name-sos](../includes/name-sos-short.md)] .zip for Windows](https://go.microsoft.com/fwlink/?linkid=2094201). +1. Download [[!INCLUDE[name-sos](../includes/name-sos-short.md)] .zip for Windows](https://go.microsoft.com/fwlink/?linkid=2098500). 2. Browse to the downloaded file and extract it. 3. Run `\azuredatastudio-windows\azuredatastudio.exe` ## Get Azure Data Studio for macOS -1. Download [[!INCLUDE[name-sos](../includes/name-sos-short.md)] for macOS](https://go.microsoft.com/fwlink/?linkid=2094202). +1. Download [[!INCLUDE[name-sos](../includes/name-sos-short.md)] for macOS](https://go.microsoft.com/fwlink/?linkid=2098501). 2. To expand the contents of the zip, double-click it. 3. To make [!INCLUDE[name-sos](../includes/name-sos-short.md)] available in the *Launchpad*, drag *Azure Data Studio.app* to the *Applications* folder. @@ -66,9 +66,9 @@ The *user installer* is recommended because it does not require administrator pr ## Get Azure Data Studio for Linux 1. Download [!INCLUDE[name-sos](../includes/name-sos-short.md)] for Linux by using one of the installers or the tar.gz archive: - - [.deb](https://go.microsoft.com/fwlink/?linkid=2094203) - - [.rpm](https://go.microsoft.com/fwlink/?linkid=2094102) - - [.tar.gz](https://go.microsoft.com/fwlink/?linkid=2094101) + - [.deb](https://go.microsoft.com/fwlink/?linkid=2098279) + - [.rpm](https://go.microsoft.com/fwlink/?linkid=2098280) + - [.tar.gz](https://go.microsoft.com/fwlink/?linkid=2098197) 1. To extract the file and launch [!INCLUDE[name-sos](../includes/name-sos-short.md)], open a new Terminal window and type the following commands: **Debian Installation:** diff --git a/docs/azure-data-studio/release-notes-azure-data-studio.md b/docs/azure-data-studio/release-notes-azure-data-studio.md index 99ee4101912..ee495cd2adf 100644 --- a/docs/azure-data-studio/release-notes-azure-data-studio.md +++ b/docs/azure-data-studio/release-notes-azure-data-studio.md @@ -10,13 +10,33 @@ ms.author: "maghan" manager: jroth ms.reviewer: "alayu; sstein" ms.custom: "seodec18" -ms.date: "06/06/2019" +ms.date: "07/10/2019" --- # Release notes for Azure Data Studio **[Download and install the latest release!](download.md)** +## July 2019 + +July 10, 2019   /   version: 1.9.0 + +  + +| Change | Details | +| :----- | :------ | +| Release of SentryOne Plan Explorer extension | Our valued Microsoft partner, SentryOne, will be shipping their [SentryOne Plan Explorer extension for Azure Data Studio](https://www.sentryone.com/products/sentryone-plan-explorer-extension-azure-data-studio).
This is a free extension, which provides enhanced plan diagrams for queries run in Azure Data Studio, with optimized layout algorithms and intuitive color-coding to help quickly identify the most expensive operators affecting query performance. To learn more about the extension, check out SentryOne's blog post [here](https://sqlperformance.com/2019/07/sentryone/plan-explorer-extension-azure-data-studio). | +| New Features coming to Schema Compare | •   Schema Compare File Support (.SCMP)
•   Cancel Schema Compare Support
•   Complete changes can be found [here](https://github.com/microsoft/azuredatastudio/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22July+2019+Release%22+label%3A%22Area%3A+Schema+Compare%22+is%3Aclosed+)| +| Notebook Improvements | •   Plotly Python Support
•   Open Notebook from Browser
•   Python Package Management Dialog
•   Performance and Markdown Enhancements
•   Keyboard Shortcuts Update
•   Bug Fixes and Minor Features can be found [here](https://github.com/microsoft/azuredatastudio/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22July+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22+) | +| SQL Server 2019 Support | This release includes support for additional SQL Server 2019 Big Data Cluster features including:
•   Service Endpoints table within the Management Dashboard that lists all key services in the cluster.
•   Cluster Status Notebook shows how you can query & troubleshoot cluster status across all services and pods.| +| Updated Language Packs Available| There are now 10 language packs available in the Extension Manager marketplace. Simply, search for the specific language using the extension marketplace and install. Once you install the selected language, Azure Data Studio will prompt you to restart with the new language. | +| SQL Server Profiler Update | The SQL Server Profile extension has been updated to include new features including:
•   Filtering by Database Name
•   Copy & Paste Support
•   Save/Load Filter
A full list of improvements for SQL Server Profiler Extension can be found [here](https://github.com/microsoft/azuredatastudio/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+milestone%3A%22July+2019+Release%22+label%3A%22Area%3A+SQL+Profiler%22+). | +| Visual Studio Code May Release Merge 1.35 | Latest improvements can be found [here](https://code.visualstudio.com/updates/v1_35). | +| Resolved bugs and issues | In previous releases of Azure Data Studio, if a user database was selected when connecting from the Connection dialog, the resulting Object Explorer entry was scoped entirely to that single database. Beginning in this release, that behavior is being changed so that server level properties are also shown in the object explorer.
For a complete list of fixes see [Bugs and issues, on GitHub](https://github.com/microsoft/azuredatastudio/milestone/35?closed=1). | +|   |   | + + + ## June 2019 June 6, 2019   /   version: 1.8.0 @@ -29,7 +49,7 @@ June 6, 2019   /   version: 1.8.0 | Release of Database Administration Tool Extensions for Windows | This extension launches two of the most used experiences in SQL Server Management Studio from Azure Data Studio. Users can right click on many different objects (such as Databases, Tables, Columns, Views, and more) and select Properties to view the SSMS Properties Dialog for that object. In addition, users can right click on a database and select Generate Scripts to launch the well known SSMS Generate Scripts Wizard. | Schema Compare Improvements | •   Added Exclude/Include Options
•   Generate Script opens script after being generated
•   Removed double scroll bars
•   Formatting and layout improvements
•   Complete changes can be found [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+label%3A%22Area%3A+Schema+Compare%22+is%3Aclosed)| | Moved Messages section to own tab | When users ran SQL queries, results and messages were on stacked panels. Now they are in separate tabs in one panel like in SSMS. | -| SQL Notebook Improvements | •   Users can now choose to use their own Python 3 or Anaconda installs in notebooks
•   Multiple Stability + fit/finish fixes •   View the full list of improvements [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)| +| SQL Notebook Improvements | •   Users can now choose to use their own Python 3 or Anaconda installs in notebooks
•   Multiple Stability + fit/finish fixes
•   View the full list of improvements [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)| | Visual Studio Code May Release Merge 1.34 | Latest improvements can be found [here](https://code.visualstudio.com/updates/v1_34) | | Resolved bugs and issues. | See [Bugs and issues, on GitHub](https://github.com/microsoft/azuredatastudio/milestone/32?closed=1). | |   |   |