Skip to content

Commit 6b36993

Browse files
committed
[SCOPED] Fix code block descriptions
1 parent 1ab12ea commit 6b36993

File tree

34 files changed

+86
-87
lines changed

34 files changed

+86
-87
lines changed

azure-sql/includes/virtual-machines-sql-server-akv-next-steps.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following Transact-SQL scripts provide examples for each of these areas.
1919

2020
Each example is based on the two prerequisites: an asymmetric key from your key vault called **CONTOSO_KEY** and a credential created by the AKV Integration feature called **Azure_EKM_cred**. The following Transact-SQL commands setup these prerequisites for running the examples.
2121

22-
``` sql
22+
```sql
2323
USE master;
2424
GO
2525

@@ -46,7 +46,7 @@ CREATION_DISPOSITION = OPEN_EXISTING;
4646

4747
1. Create a SQL Server login to be used by the Database Engine for TDE, then add the credential to it.
4848

49-
``` sql
49+
```sql
5050
USE master;
5151
-- Create a SQL Server login associated with the asymmetric key
5252
-- for the Database engine to use when it loads a database
@@ -64,7 +64,7 @@ CREATION_DISPOSITION = OPEN_EXISTING;
6464

6565
1. Create the database encryption key that will be used for TDE.
6666

67-
``` sql
67+
```sql
6868
USE ContosoDatabase;
6969
GO
7070

@@ -83,7 +83,7 @@ CREATION_DISPOSITION = OPEN_EXISTING;
8383

8484
1. Create a SQL Server login to be used by the Database Engine for encrypting backups, and add the credential to it.
8585

86-
``` sql
86+
```sql
8787
USE master;
8888
-- Create a SQL Server login associated with the asymmetric key
8989
-- for the Database engine to use when it is encrypting the backup.
@@ -100,7 +100,7 @@ CREATION_DISPOSITION = OPEN_EXISTING;
100100

101101
1. Backup the database specifying encryption with the asymmetric key stored in the key vault.
102102

103-
``` sql
103+
```sql
104104
USE master;
105105
BACKUP DATABASE [DATABASE_TO_BACKUP]
106106
TO DISK = N'[PATH TO BACKUP FILE]'
@@ -113,7 +113,7 @@ CREATION_DISPOSITION = OPEN_EXISTING;
113113

114114
This script creates a symmetric key protected by the asymmetric key in the key vault, and then uses the symmetric key to encrypt data in the database.
115115

116-
``` sql
116+
```sql
117117
CREATE SYMMETRIC KEY DATA_ENCRYPTION_KEY
118118
WITH ALGORITHM=AES_256
119119
ENCRYPTION BY ASYMMETRIC KEY CONTOSO_KEY;

azure-sql/load-from-csv-with-bcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ sqlcmd.exe -S <server name> -d <database name> -U <username> -P <password> -I -Q
5454

5555
Open Notepad and copy the following lines of data into a new text file and then save this file to your local temp directory, `C:\Temp\DimDate2.txt`. This data is in ASCII format.
5656

57-
```txt
57+
```text
5858
20150301,1,3
5959
20150501,2,4
6060
20151001,4,2

azure-sql/managed-instance/managed-instance-link-failover-how-to.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ To drop your distributed availability group, replace the following value and the
253253

254254
- `<DAGName>` with the name of the distributed availability group on SQL Server (used to create the link).
255255

256-
``` sql
256+
```sql
257257
-- Run on SQL Server
258258
USE MASTER
259259
GO
@@ -282,7 +282,7 @@ If you decide to drop your availability group, replace the following value and t
282282

283283
- `<AGName>` with the name of the availability group on SQL Server (used to create the link).
284284

285-
``` sql
285+
```sql
286286
-- Run on SQL Server
287287
USE MASTER
288288
GO

docs/analytics-platform-system/create-ssis-script-task-using-pdw-destination-adapter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This SSIS package script code is a code example for using the SSIS PDW destinati
2525

2626
- Replace four occurrences of the placeholder value *XXXXXXXX* with the values appropriate to your environment and intended action.
2727

28-
```c#
28+
```csharp
2929
#region Help: Introduction to the script task
3030
/* The Script Task allows you to perform virtually any operation that can be accomplished in
3131
* a .Net application within the context of an Integration Services control flow.

docs/connect/ado-net/introduction-microsoft-data-sqlclient-namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ SqlBulkCopy has a new property `RowsCopied64` which supports `long` value types.
158158

159159
Example usage:
160160

161-
```C#
161+
```csharp
162162
using (SqlConnection srcConn = new SqlConnection(srcConstr))
163163
using (SqlCommand srcCmd = new SqlCommand("select top 5 * from employees", srcConn))
164164
{

docs/connect/ado-net/sql/azure-active-directory-authentication.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ When the application is connecting to Azure SQL data sources by using Microsoft
5959

6060
`Active Directory Password` authentication mode supports authentication to Azure data sources with Microsoft Entra ID for native or federated Microsoft Entra users. When you're using this mode, user credentials must be provided in the connection string. The following example shows how to use `Active Directory Password` authentication.
6161

62-
```cs
62+
```csharp
6363
// Use your own server, database, user ID, and password.
6464
string ConnectionString = @"Server=demo.database.windows.net;"
6565
+ "Authentication=Active Directory Password; Encrypt=True; Database=testdb;"
@@ -78,7 +78,7 @@ When you're signed in to a domain-joined machine, you can access Azure SQL data
7878

7979
The following code snippet is an example of when `Active Directory Integrated` authentication is in use.
8080

81-
```cs
81+
```csharp
8282
// Use your own server and database.
8383
string ConnectionString1 = @"Server=demo.database.windows.net;"
8484
+ "Authentication=Active Directory Integrated; Encrypt=True; Database=testdb";
@@ -105,7 +105,7 @@ You can't set the `Credential` property of SqlConnection in this mode. With **Mi
105105

106106
The following example shows how to use `Active Directory Interactive` authentication.
107107

108-
```cs
108+
```csharp
109109
// Use your own server, database, and user ID.
110110
// User ID is optional.
111111
string ConnectionString1 = @"Server=demo.database.windows.net;"
@@ -136,7 +136,7 @@ In `Active Directory Service Principal` authentication mode, the client applicat
136136

137137
The following example shows how to use `Active Directory Service Principal` authentication.
138138

139-
```cs
139+
```csharp
140140
// Use your own server, database, app ID, and secret.
141141
string ConnectionString = @"Server=demo.database.windows.net;"
142142
+ "Authentication=Active Directory Service Principal; Encrypt=True;"
@@ -158,7 +158,7 @@ The following code snippet is an example of using `Active Directory Device Code
158158
> [!NOTE]
159159
> The timeout for `Active Directory Device Code Flow` defaults to the connection's `Connect Timeout` setting. Make sure to specify a `Connect Timeout` that provides enough time to go through the device code flow authentication process.
160160
161-
```cs
161+
```csharp
162162
// Use your own server and database and increase Connect Timeout as needed for
163163
// device code flow.
164164
string ConnectionString = @"Server=demo.database.windows.net;"
@@ -187,7 +187,7 @@ For a user-assigned managed identity, the **client id** of the managed identity
187187

188188
The following example shows how to use `Active Directory Managed Identity` authentication with a system-assigned managed identity.
189189

190-
```cs
190+
```csharp
191191
// For system-assigned managed identity
192192
// Use your own values for Server and Database.
193193
string ConnectionString1 = @"Server=demo.database.windows.net;"
@@ -208,7 +208,7 @@ using (SqlConnection conn = new SqlConnection(ConnectionString2)) {
208208

209209
The following example demonstrates `Active Directory Managed Identity` authentication with a user-assigned managed identity with **Microsoft.Data.SqlClient v3.0 onwards**.
210210

211-
```cs
211+
```csharp
212212
// For user-assigned managed identity
213213
// Use your own values for Server, Database, and User Id.
214214
@@ -233,7 +233,7 @@ using (SqlConnection conn = new SqlConnection(ConnectionString2)) {
233233

234234
The following example demonstrates `Active Directory Managed Identity` authentication with a user-assigned managed identity with **Microsoft.Data.SqlClient v2.1**.
235235

236-
```cs
236+
```csharp
237237
// For user-assigned managed identity
238238
// Use your own values for Server, Database, and User Id.
239239
@@ -291,7 +291,7 @@ With this authentication mode, the driver acquires a token by passing "[DefaultA
291291
292292
The following example shows how to use **Active Directory Default** authentication.
293293

294-
```cs
294+
```csharp
295295
// Use your own server, database
296296
string ConnectionString = @"Server=demo.database.windows.net;"
297297
+ "Authentication=Active Directory Default; Encrypt=True; Database=testdb;";
@@ -307,7 +307,7 @@ Available starting in version 5.2, like with managed identities, [workload ident
307307

308308
The following example demonstrates `Active Directory Workload Identity` authentication with a user-assigned managed identity with **Microsoft.Data.SqlClient v5.2 onwards**.
309309

310-
```cs
310+
```csharp
311311
// Use your own values for Server, Database, and User Id.
312312
// With Microsoft.Data.SqlClient v5.2+
313313
string ConnectionString = @"Server=demo.database.windows.net;"
@@ -389,7 +389,7 @@ The following example shows how to use a new authentication provider for `Active
389389

390390
In addition to improving the `Active Directory Interactive` authentication experience, **Microsoft.Data.SqlClient** 2.1.0 and later provide the following APIs for client applications to customize interactive authentication and device code flow authentication.
391391

392-
```cs
392+
```csharp
393393
public class ActiveDirectoryAuthenticationProvider
394394
{
395395
// For .NET Framework targeted applications only

docs/connect/ado-net/sql/sqlclient-support-always-encrypted.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ The easiest way to enable the encryption of parameters and the decryption of que
4141

4242
The following example uses a connection string that enables Always Encrypted:
4343

44-
```cs
44+
```csharp
4545
string connectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true; Column Encryption Setting=enabled";
4646
SqlConnection connection = new SqlConnection(connectionString);
4747
```
4848

4949
The following code snippet is an equivalent example using the SqlConnectionStringBuilder.ColumnEncryptionSetting Property.
5050

51-
```cs
51+
```csharp
5252
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
5353
builder.DataSource = "server63";
5454
builder.InitialCatalog = "Clinic";
@@ -128,7 +128,7 @@ This example inserts a row into the Patients table. Note the following details:
128128
- The data type of the parameter targeting the `SSN` column is set to an ANSI (non-Unicode) string, which maps to the char/varchar SQL Server data type. If the type of the parameter was set to a Unicode string (String), which maps to nchar/nvarchar, the query would fail, as Always Encrypted doesn't support conversions from encrypted nchar/nvarchar values to encrypted char/varchar values. See [SQL Server Data Type Mappings](/dotnet/framework/data/adonet/sql-server-data-type-mappings) for information about the data type mappings.
129129
- The data type of the parameter inserted into the `BirthDate` column is explicitly set to the target SQL Server data type using the [SqlParameter.SqlDbType Property](/dotnet/api/microsoft.data.sqlclient.sqlparameter.sqldbtype), instead of relying on the implicit mapping of .NET types to SQL Server data types applied when using the [SqlParameter.DbType Property](/dotnet/api/microsoft.data.sqlclient.sqlparameter.dbtype). By default, the [DateTime Structure](/dotnet/api/system.datetime) maps to the datetime SQL Server data type. As the data type of the `BirthDate` column is date and Always Encrypted doesn't support a conversion of encrypted datetime values to encrypted date values, using the default mapping would result in an error.
130130

131-
```cs
131+
```csharp
132132
string connectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true; Column Encryption Setting=enabled";
133133

134134
using (SqlConnection connection = new SqlConnection(builder.ConnectionString))
@@ -176,7 +176,7 @@ using (SqlCommand cmd = connection.CreateCommand())
176176

177177
The following example demonstrates filtering data based on encrypted values and retrieving plaintext data from encrypted columns.
178178

179-
```cs
179+
```csharp
180180
string connectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true; Column Encryption Setting=enabled";
181181
using (SqlConnection connection = new SqlConnection(builder.ConnectionString))
182182
using (SqlCommand cmd = connection.CreateCommand())
@@ -218,7 +218,7 @@ If Always Encrypted isn't enabled, a query can still retrieve data from encrypte
218218

219219
The following example demonstrates how to retrieve binary encrypted data from encrypted columns.
220220

221-
```cs
221+
```csharp
222222
string connectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true";
223223

224224
using (SqlConnection connection = new SqlConnection(connectionString))
@@ -278,7 +278,7 @@ To prevent such errors, make sure:
278278
- Always Encrypted is enabled for application queries targeting encrypted columns (for the connection string or in the [SqlCommand](/dotnet/api/microsoft.data.sqlclient.sqlcommand) object for a specific query).
279279
- You use SqlParameter to send data targeting encrypted columns. The following example shows a query that incorrectly filters by a literal/constant on an encrypted column (SSN) instead of passing the literal inside a SqlParameter object.
280280

281-
```cs
281+
```csharp
282282
using (SqlCommand cmd = connection.CreateCommand())
283283
{
284284
cmd.CommandText = @"SELECT [SSN], [FirstName], [LastName], [BirthDate] FROM [dbo].[Patients] WHERE SSN = '795-73-9838'";
@@ -355,7 +355,7 @@ If you want to store column master keys in a key store that isn't supported by a
355355
- [SqlConnection.RegisterColumnEncryptionKeyStoreProvidersOnConnection](/dotnet/api/microsoft.data.sqlclient.sqlconnection.registercolumnencryptionkeystoreprovidersonconnection) (Added in version 3.0.0)
356356
- [SqlCommand.RegisterColumnEncryptionKeyStoreProvidersOnCommand](/dotnet/api/microsoft.data.sqlclient.sqlcommand.registercolumnencryptionkeystoreprovidersoncommand) (Added in version 3.0.0)
357357

358-
```cs
358+
```csharp
359359
public class MyCustomKeyStoreProvider : SqlColumnEncryptionKeyStoreProvider
360360
{
361361
public const string ProviderName = "MY_CUSTOM_STORE";
@@ -436,7 +436,7 @@ When the **Microsoft .NET Data Provider for SQL Server** accesses encrypted colu
436436
Implementing your own key management tools may be required only if you use a custom key store provider. When using keys stored in keys stores, for which built-in providers exist, and or in Azure Key Vault, you can use existing tools, such as SQL Server Management Studio or PowerShell, to manage and provision keys.
437437
The below example, illustrates generating a column encryption key and using the [SqlColumnEncryptionCertificateStoreProvider class](/dotnet/api/microsoft.data.sqlclient.sqlcolumnencryptioncertificatestoreprovider) to encrypt the key with a certificate.
438438

439-
```cs
439+
```csharp
440440
using System.Security.Cryptography;
441441
static void Main(string[] args)
442442
{
@@ -502,7 +502,7 @@ To control the Always Encrypted behavior of individual queries, you need to use
502502

503503
In the below example, Always Encrypted is disabled for the database connection. The query the application issues has a parameter that targets the LastName column that isn't encrypted. The query retrieves data from the `SSN` and `BirthDate` columns that are both encrypted. In such a case, calling **sys.sp_describe_parameter_encryption** to retrieve encryption metadata isn't required. However, the decryption of the query results needs to be enabled, so that the application can receive plaintext values from the two encrypted columns. The **SqlCommandColumnEncryptionSetting** **ResultSetOnly** setting is used to ensure that.
504504

505-
```cs
505+
```csharp
506506
string connectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true";
507507
using (SqlConnection connection = new SqlConnection(connectionString))
508508
using (SqlCommand cmd = new SqlCommand(@"SELECT [SSN], [FirstName], [LastName], [BirthDate] FROM [dbo].[Patients] WHERE [LastName]=@LastName",
@@ -555,7 +555,7 @@ Although using the **SqlParameter.ForceColumnEncryption property** helps improve
555555

556556
The following code sample illustrates using the **SqlParameter.ForceColumnEncryption property** to prevent social security numbers from being sent in plaintext to the database.
557557

558-
```cs
558+
```csharp
559559
using (SqlCommand cmd = _sqlconn.CreateCommand())
560560
{
561561
// Use parameterized queries to access Always Encrypted data.
@@ -588,7 +588,7 @@ Although setting trusted key paths improves security of your application, you'll
588588

589589
The following example shows how to configure trusted column master key paths:
590590

591-
```cs
591+
```csharp
592592
// Configure trusted key paths to protect against fake key paths sent by a compromised SQL Server instance
593593
// First, create a list of trusted key paths for your server
594594
List<string> trustedKeyPathList = new List<string>();
@@ -612,7 +612,7 @@ With SqlBulkCopy, you can copy data, which is already encrypted and stored in on
612612
613613
Here's an example that copies data from one table to another. The `SSN` and `BirthDate` columns are assumed to be encrypted.
614614

615-
```cs
615+
```csharp
616616
static public void CopyTablesUsingBulk(string sourceTable, string targetTable)
617617
{
618618
string sourceConnectionString = "Data Source=server63; Initial Catalog=Clinic; Integrated Security=true";

docs/connect/ado-net/sql/tutorial-always-encrypted-enclaves-develop-net-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Your application will connect to the **ContosoHR** database that was created in
5555

5656
1. Replace the content of the Program.cs file (generated by Visual Studio) with the following code.
5757

58-
```cs
58+
```csharp
5959
using System;
6060
using Microsoft.Data.SqlClient;
6161
using System.Data;

docs/connect/jdbc/application-security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ When you use the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)],
2020

2121
A typical permission in the policy file looks like the following.
2222

23-
```config
23+
```java
2424
// Example policy file entry.
2525
grant [signedBy <signer>,] [codeBase <code source>] {
2626
permission <class> [<name> [, <action list>]];
@@ -29,7 +29,7 @@ grant [signedBy <signer>,] [codeBase <code source>] {
2929

3030
The following codebase should be restricted to the JDBC driver codebase to ensure that you grant the least number of privileges.
3131

32-
```config
32+
```java
3333
grant codeBase "file:/install_dir/lib/-" {
3434

3535
// Grant access to data source.

docs/connect/php/installation-tutorial-linux-mac.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ sudo systemctl status nginx
143143

144144
To configure nginx, you must edit the `/etc/nginx/sites-available/default` file. Add `index.php` to the list below the section that says `# Add index.php to the list if you are using PHP`:
145145

146-
```config
146+
```text
147147
# Add index.php to the list if you are using PHP
148148
index index.html index.htm index.nginx-debian.html index.php;
149149
```
150150

151151
Next, uncomment and modify the section following `# pass PHP scripts to FastCGI server` as follows:
152152

153-
```config
153+
```text
154154
# pass PHP scripts to FastCGI server
155155
#
156156
location ~ \.php$ {

0 commit comments

Comments
 (0)