Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 33165ff

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/sql-docs-pr into release-dallas
2 parents d37d06a + 83bdf74 commit 33165ff

103 files changed

Lines changed: 8235 additions & 8307 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

azure-sql/managed-instance/doc-changes-updates-known-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This article lists the currently known issues with [Azure SQL Managed Instance](
3535
|[Agent becomes unresponsive upon modifying, disabling, or enabling existing jobs](#agent-becomes-unresponsive-upon-modifying-disabling-or-enabling-existing-jobs)|May 2020|Resolved|June 2020|
3636
|[Permissions on resource group not applied to SQL Managed Instance](#permissions-on-resource-group-not-applied-to-sql-managed-instance)|Feb 2020|Resolved|Nov 2020|
3737
|[Limitation of manual failover via portal for failover groups](#limitation-of-manual-failover-via-portal-for-failover-groups)|Jan 2020|Has Workaround||
38-
|[SQL Agent roles need explicit EXECUTE permissions for non-sysadmin logins](#in-memory-oltp-memory-limits-are-not-applied)|Dec 2019|Has Workaround||
38+
|[SQL Agent roles need explicit EXECUTE permissions for non-sysadmin logins](#sql-agent-roles-need-explicit-execute-permissions-for-non-sysadmin-logins)|Dec 2019|Has Workaround||
3939
|[SQL Agent jobs can be interrupted by Agent process restart](#sql-agent-jobs-can-be-interrupted-by-agent-process-restart)|Dec 2019|Resolved|Mar 2020|
4040
|[Azure AD logins and users are not supported in SSDT](#azure-ad-logins-and-users-are-not-supported-in-ssdt)|Nov 2019|No Workaround||
4141
|[In-memory OLTP memory limits are not applied](#in-memory-oltp-memory-limits-are-not-applied)|Oct 2019|Has Workaround||

azure-sql/virtual-machines/windows/azure-storage-sql-server-backup-restore-use.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The following Azure components are used when backing up to Azure Blob storage.
4747

4848
| Component | Description |
4949
| --- | --- |
50-
| **Storage account** |The storage account is the starting point for all storage services. To access Azure Blob storage, first create an Azure Storage account. SQL Server is agnostic to the type of storage redundancy used. Backup to Page blobs and block blobs is supported for every storage redundancy (LRS\ZRS\GRS\RA-GRS\RA-GZRS\etc.). For more information about Azure Blob storage, see [How to use Azure Blob storage](https://azure.microsoft.com/develop/net/how-to-guides/blob-storage/). |
50+
| **Storage account** |The storage account is the starting point for all storage services. To access Azure Blob storage, first create an Azure Storage account. SQL Server is agnostic to the type of storage redundancy used. Backup to Page blobs and block blobs is supported for every storage redundancy (LRS\ZRS\GRS\RA-GRS\RA-GZRS\etc.). For more information about Azure Blob storage, see [How to use Azure Blob storage](/azure/storage/blobs/storage-quickstart-blobs-dotnet). |
5151
| **Container** |A container provides a grouping of a set of blobs, and can store an unlimited number of Blobs. To write a SQL Server backup to Azure Blob storage, you must have at least the root container created. |
5252
| **Blob** |A file of any type and size. Blobs are addressable using the following URL format: `https://<storageaccount>.blob.core.windows.net/<container>/<blob>`. For more information about page Blobs, see [Understanding Block and Page Blobs](/rest/api/storageservices/Understanding-Block-Blobs--Append-Blobs--and-Page-Blobs) |
5353

docs/database-engine/availability-groups/windows/troubleshoot-always-on-availability-groups-configuration-sql-server.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,23 @@ ms.author: mathoma
3838
|[Related Content](#RelatedContent)|Contains a list of relevant resources that are external to [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] Books Online.|
3939

4040
## <a name="IsHadrEnabled"></a> Always On Availability Groups Is Not Enabled
41-
The [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature must be enabled on each of the instances of [!INCLUDE[ssnoversion](../../../includes/ssnoversion-md.md)]. For more information, see [Enable and Disable Always On Availability Groups &#40;SQL Server&#41;](../../../database-engine/availability-groups/windows/enable-and-disable-always-on-availability-groups-sql-server.md).
42-
41+
42+
The [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] feature must be enabled on each of the instances of [!INCLUDE[ssnoversion](../../../includes/ssnoversion-md.md)]. For more information, see [Enable and Disable Always On Availability Groups &#40;SQL Server&#41;](../../../database-engine/availability-groups/windows/enable-and-disable-always-on-availability-groups-sql-server.md).
43+
44+
If the Always On Availability Groups feature is not enabled, you will get this error message when you try to create an Availability group on SQL Server.
45+
46+
`The Always On Availability Groups feature must be enabled for server instance 'SQL1VM' before you can create an availability group on this instance. To enable this feature, open the SQL Server Configuration Manager, select SQL Server Services, right-click on the SQL Server service name, select Properties, and use the Always On Availability Groups tab of the Server Properties dialog. Enabling Always On Availability Groups may require that the server instance is hosted by a Windows Server Failover Cluster (WSFC) node. (Microsoft.SqlServer.Management.HadrTasks)`
47+
48+
The error message clearly indicates that the AG feature is not enabled and also directs you how to enable it.
49+
50+
If SQL Server was installed and the Always On Availability Groups feature enabled before you install the Windows Failover Clustering feature, you may get this error you when you attempt to create an Always On AG. In such cases you can take the following steps to resolve it:
51+
52+
1. Disable the AG feature
53+
1. Restart SQL Server service
54+
1. Enable the AG feature back
55+
1. Again restart the SQL Service
56+
57+
4358
## <a name="Accounts"></a> Accounts
4459
The accounts under which [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] is running must be correctly configured.
4560

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
---
2-
title: "Add Business Logic to XML Data | Microsoft Docs"
2+
title: "Add Business Logic to XML Data"
33
description: Learn how you can add business logic to XML data by applying XSL transformations, using domain-specific constraints on data, or by triggering validation rules.
44
ms.custom: ""
5-
ms.date: "03/14/2017"
5+
ms.date: 05/05/2022
66
ms.prod: sql
77
ms.prod_service: "database-engine"
8-
ms.reviewer: ""
8+
ms.reviewer: randolphwest
99
ms.technology: xml
1010
ms.topic: conceptual
11-
helpviewer_keywords:
11+
helpviewer_keywords:
1212
- "business logic [XML]"
13-
ms.assetid: 0877fb38-f1a2-43d8-86cf-4754be224dc1
1413
author: MikeRayMSFT
1514
ms.author: mikeray
1615
---
17-
# Add Business Logic to XML Data
16+
# Add business logic to XML data
17+
1818
[!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb.md)]
19-
Your business logic can be added to XML data in several ways:
20-
21-
- You can write row or column constraints to enforce domain-specific constraints during insertion and modification of XML data.
22-
23-
- You can write a trigger on the XML column that fires when you insert or update values in the column. The trigger can contain domain-specific validation rules or populate property tables.
24-
25-
- The Database Engine includes the ability to execute managed code. You can use this common language runtime (CLR) integration to write functions in managed code to which you pass XML values, and use XML processing capabilities provided by the System.Xml namespace. An example is to apply XSL transformation to XML data. Alternatively, you can deserialize the XML into one or more managed classes and operate on them by using managed code.
26-
27-
- You can write Transact-SQL stored procedures and functions that start the processing on the XML column for your business needs.
28-
29-
## Example: Applying XSL Transformation
30-
Consider a CLR function **TransformXml()** that accepts an **xml** data type instance and an XSL transformation stored in a file, applies the transformation to the XML data, and then returns the transformed XML in the result. Following is a skeleton function that is written in C#:
31-
32-
```
33-
public static SqlXml TransformXml (SqlXml XmlData, string xslPath) {
34-
// Load XSL transformation
35-
XslCompiledTransform xform = new XslCompiledTransform();
36-
XPathDocument xslDoc = new XPathDocument (xslPath);
37-
xform.Load(xslDoc);
38-
39-
// Load XML data
40-
XPathDocument xDoc = new XPathDocument (XmlData.CreateReader());
41-
42-
// Return the transformed value
43-
MemoryStream xsltResult = new MemoryStream();
44-
xform.Transform(xDoc, null, xsltResult);
45-
SqlXml retSqlXml = new SqlXml(xsltResult);
46-
return (retSqlXml);
47-
}
48-
```
49-
50-
After the assembly is registered and a user-defined [!INCLUDE[tsql](../../includes/tsql-md.md)] function is created, **SqlXslTransform()** corresponding to **TransformXml()**, the function can be invoked from Transact-SQL as shown in the following query:
51-
52-
```
53-
SELECT SqlXslTransform (xCol, 'C:\MyFile\xsltransform.xsl')
54-
FROM T
55-
WHERE xCol.exist('/book/title/text()[contains(.,"custom")]') =1;
56-
```
57-
58-
The query result contains a rowset of the transformed XML.
59-
60-
The CLR integration into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] expands the possibilities for decomposing XML data into tables or property promotion, and querying XML data by using managed classes in the System.Xml namespace. For more information, see [XML Data &#40;SQL Server&#41;](../../relational-databases/xml/xml-data-sql-server.md).
61-
62-
19+
20+
Your business logic can be added to XML data in several ways:
21+
22+
- You can write row or column constraints to enforce domain-specific constraints during insertion and modification of XML data.
23+
24+
- You can write a trigger on the XML column that fires when you insert or update values in the column. The trigger can contain domain-specific validation rules or populate property tables.
25+
26+
- The Database Engine includes the ability to execute managed code. You can use this common language runtime (CLR) integration to write functions in managed code to which you pass XML values, and use XML processing capabilities provided by the System.Xml namespace. An example is to apply XSL transformation to XML data. Alternatively, you can deserialize the XML into one or more managed classes and operate on them by using managed code.
27+
28+
- You can write Transact-SQL stored procedures and functions that start the processing on the XML column for your business needs.
29+
30+
## Example: Applying XSL transformation
31+
32+
Consider a CLR function `TransformXml()` that accepts an **xml** data type instance and an XSL transformation stored in a file, applies the transformation to the XML data, and then returns the transformed XML in the result. Following is a skeleton function that is written in C#:
33+
34+
```csharp
35+
public static SqlXml TransformXml (SqlXml XmlData, string xslPath) {
36+
// Load XSL transformation
37+
XslCompiledTransform xform = new XslCompiledTransform();
38+
XPathDocument xslDoc = new XPathDocument (xslPath);
39+
xform.Load(xslDoc);
40+
41+
// Load XML data
42+
XPathDocument xDoc = new XPathDocument (XmlData.CreateReader());
43+
44+
// Return the transformed value
45+
MemoryStream xsltResult = new MemoryStream();
46+
xform.Transform(xDoc, null, xsltResult);
47+
SqlXml retSqlXml = new SqlXml(xsltResult);
48+
return (retSqlXml);
49+
}
50+
```
51+
52+
After the assembly is registered and a user-defined [!INCLUDE[tsql](../../includes/tsql-md.md)] function is created, `SqlXslTransform()` corresponding to `TransformXml()`, the function can be invoked from Transact-SQL as shown in the following query:
53+
54+
```sql
55+
SELECT SqlXslTransform (xCol, 'C:\MyFile\xsltransform.xsl')
56+
FROM T
57+
WHERE xCol.exist('/book/title/text()[contains(.,"custom")]') = 1;
58+
```
59+
60+
The query result contains a rowset of the transformed XML.
61+
62+
The CLR integration into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] expands the possibilities for decomposing XML data into tables or property promotion, and querying XML data by using managed classes in the System.Xml namespace. For more information, see [XML Data &#40;SQL Server&#41;](../../relational-databases/xml/xml-data-sql-server.md).

0 commit comments

Comments
 (0)