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

Commit 0734358

Browse files
authored
Merge pull request #17008 from icoric/icoric-patch-7
sql colorizer updates - tsql docs / statements pt.2
2 parents b1e4043 + c78096a commit 0734358

40 files changed

Lines changed: 133 additions & 152 deletions

File tree

docs/t-sql/statements/create-broker-priority-transact-sql.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ ms.author: maghan
3737
## Syntax
3838

3939
```syntaxsql
40-
4140
CREATE BROKER PRIORITY ConversationPriorityName
4241
FOR CONVERSATION
4342
[ SET ( [ CONTRACT_NAME = {ContractName | ANY } ]
@@ -163,7 +162,7 @@ FOR CONVERSATION
163162
### A. Assigning a priority level to both directions of a conversation.
164163
These two conversation priorities ensure that all operations that use `SimpleContract` between `TargetService` and the `InitiatorAService` are assigned priority level 3.
165164

166-
```
165+
```sql
167166
CREATE BROKER PRIORITY InitiatorAToTargetPriority
168167
FOR CONVERSATION
169168
SET (CONTRACT_NAME = SimpleContract,
@@ -181,7 +180,7 @@ CREATE BROKER PRIORITY TargetToInitiatorAPriority
181180
### B. Setting the priority level for all conversations that use a contract
182181
Assigns a priority level of `7` to all operations that use a contract named `SimpleContract`. This assumes that there are no other priorities that specify both `SimpleContract` and either a local or a remote service.
183182

184-
```
183+
```sql
185184
CREATE BROKER PRIORITY SimpleContractDefaultPriority
186185
FOR CONVERSATION
187186
SET (CONTRACT_NAME = SimpleContract,
@@ -193,7 +192,7 @@ CREATE BROKER PRIORITY SimpleContractDefaultPriority
193192
### C. Setting a base priority level for a database.
194193
Defines conversation priorities for two specific services, and then defines a conversation priority that will match all other conversation endpoints. This does not replace the default priority, which is always 5, but does minimize the number of items that are assigned the default.
195194

196-
```
195+
```sql
197196
CREATE BROKER PRIORITY [//Adventure-Works.com/Expenses/ClaimPriority]
198197
FOR CONVERSATION
199198
SET (CONTRACT_NAME = ANY,

docs/t-sql/statements/create-cryptographic-provider-transact-sql.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ ms.author: vanto
3333

3434
## Syntax
3535

36-
```
37-
36+
```syntaxsql
3837
CREATE CRYPTOGRAPHIC PROVIDER provider_name
3938
FROM FILE = path_of_DLL
4039
```
@@ -67,7 +66,7 @@ CREATE CRYPTOGRAPHIC PROVIDER provider_name
6766
## Examples
6867
The following example creates a cryptographic provider called `SecurityProvider` in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] from a .dll file. The .dll file is named `c:\SecurityProvider\SecurityProvider_v1.dll` and it is installed on the server. The provider's certificate must first be installed on the server.
6968

70-
```
69+
```sql
7170
-- Install the provider
7271
CREATE CRYPTOGRAPHIC PROVIDER SecurityProvider
7372
FROM FILE = 'C:\SecurityProvider\SecurityProvider_v1.dll';

docs/t-sql/statements/create-database-audit-specification-transact-sql.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ms.author: vanto
3535
## Syntax
3636

3737
```syntaxsql
38-
3938
CREATE DATABASE AUDIT SPECIFICATION audit_specification_name
4039
{
4140
FOR SERVER AUDIT audit_name
@@ -93,7 +92,7 @@ CREATE DATABASE AUDIT SPECIFICATION audit_specification_name
9392
### A. Audit SELECT and INSERT on a table for any database principal
9493
The following example creates a server audit called `Payrole_Security_Audit` and then a database audit specification called `Payrole_Security_Audit` that audits `SELECT` and `INSERT` statements by the `dbo` user, for the `HumanResources.EmployeePayHistory` table in the `AdventureWorks2012` database.
9594

96-
```
95+
```sql
9796
USE master ;
9897
GO
9998
-- Create the server audit.
@@ -120,7 +119,7 @@ GO
120119
### B. Audit any DML (INSERT, UPDATE or DELETE) on _all_ objects in the _sales_ schema for a specific database role
121120
The following example creates a server audit called `DataModification_Security_Audit` and then a database audit specification called `Audit_Data_Modification_On_All_Sales_Tables` that audits `INSERT`, `UPDATE` and `DELETE` statements by users in a new database role `SalesUK`, for all objects in the `Sales` schema in the `AdventureWorks2012` database.
122121

123-
```
122+
```sql
124123
USE master ;
125124
GO
126125
-- Create the server audit.

docs/t-sql/statements/create-database-encryption-key-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ For additional examples using TDE, see [Transparent Data Encryption (TDE&#41
102102

103103
The following example creates a database encryption key by using the `AES_256` algorithm, and protects the private key with a certificate named `MyServerCert`.
104104

105-
```
105+
```sql
106106
USE AdventureWorks2012;
107107
GO
108108
CREATE DATABASE ENCRYPTION KEY

docs/t-sql/statements/create-event-notification-transact-sql.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ms.author: maghan
3535
## Syntax
3636

3737
```syntaxsql
38-
3938
CREATE EVENT NOTIFICATION event_notification_name
4039
ON { SERVER | DATABASE | QUEUE queue_name }
4140
[ WITH FAN_IN ]
@@ -136,18 +135,21 @@ TO SERVICE 'broker_service' , { 'broker_instance_specifier' | 'current database'
136135
--Create a queue to receive messages.
137136
CREATE QUEUE NotifyQueue ;
138137
GO
138+
139139
--Create a service on the queue that references
140140
--the event notifications contract.
141141
CREATE SERVICE NotifyService
142142
ON QUEUE NotifyQueue
143143
([https://schemas.microsoft.com/SQL/Notifications/PostEventNotification]);
144144
GO
145+
145146
--Create a route on the service to define the address
146147
--to which Service Broker sends messages for the service.
147148
CREATE ROUTE NotifyRoute
148149
WITH SERVICE_NAME = 'NotifyService',
149150
ADDRESS = 'LOCAL';
150-
GO
151+
GO
152+
151153
--Create the event notification.
152154
CREATE EVENT NOTIFICATION log_ddl1
153155
ON SERVER
@@ -170,7 +172,7 @@ TO SERVICE 'NotifyService',
170172
### C. Getting information about an event notification that is server scoped
171173
The following example queries the `sys.server_event_notifications` catalog view for metadata about event notification `log_ddl1` that was created with server scope.
172174

173-
```
175+
```sql
174176
SELECT * FROM sys.server_event_notifications
175177
WHERE name = 'log_ddl1';
176178
```

docs/t-sql/statements/create-external-language-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Registers external language extensions in the database from the specified file p
2222
2323
## Syntax
2424

25-
```text
25+
```syntaxsql
2626
CREATE EXTERNAL LANGUAGE language_name
2727
[ AUTHORIZATION owner_name ]
2828
FROM <file_spec> [ ,...2 ]

docs/t-sql/statements/create-external-library-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Uploads R or Python package files to a database from the specified byte stream o
4141
::: moniker range=">=sql-server-ver15||>=sql-server-linux-ver15||=sqlallproducts-allversions"
4242
## Syntax for SQL Server 2019
4343

44-
```text
44+
```syntaxsql
4545
CREATE EXTERNAL LIBRARY library_name
4646
[ AUTHORIZATION owner_name ]
4747
FROM <file_spec> [ ,...2 ]
@@ -83,7 +83,7 @@ WITH ( LANGUAGE = <language> )
8383
::: moniker range=">=sql-server-2017 <=sql-server-2017||=sqlallproducts-allversions"
8484
## Syntax for SQL Server 2017
8585

86-
```text
86+
```syntaxsql
8787
CREATE EXTERNAL LIBRARY library_name
8888
[ AUTHORIZATION owner_name ]
8989
FROM <file_spec> [ ,...2 ]
@@ -112,7 +112,7 @@ WITH ( LANGUAGE = 'R' )
112112
::: moniker range="=azuresqldb-mi-current||=sqlallproducts-allversions"
113113
## Syntax for Azure SQL Managed Instance
114114

115-
```text
115+
```syntaxsql
116116
CREATE EXTERNAL LIBRARY library_name
117117
[ AUTHORIZATION owner_name ]
118118
FROM <file_spec> [ ,...2 ]

docs/t-sql/statements/create-external-table-as-select-transact-sql.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest || = sqlallproducts-allve
3131

3232
## Syntax
3333

34-
```syntaxsql
35-
34+
```syntaxsql
3635
CREATE EXTERNAL TABLE [ [database_name . [ schema_name ] . ] | schema_name . ] table_name
3736
WITH (
3837
LOCATION = 'hdfs_folder',
@@ -203,9 +202,8 @@ To use CREATE EXTERNAL TABLE AS SELECT containing these characters, you must fir
203202
204203
The resulting Hadoop location and file name will be `hdfs:// xxx.xxx.xxx.xxx:5000/files/Customer/ QueryID_YearMonthDay_HourMinutesSeconds_FileIndex.txt.`.
205204

206-
```
207-
208-
-- Example is based on AdventureWorks
205+
```sql
206+
-- Example is based on AdventureWorks
209207
CREATE EXTERNAL TABLE hdfsCustomer
210208
WITH (
211209
LOCATION='/pdwdata/customer.tbl',
@@ -221,9 +219,8 @@ WITH (
221219
> [!NOTE]
222220
> This example specifies for 5000. If the port isn't specified, the database uses 8020 as the default port.
223221
224-
```
225-
226-
-- Example is based on AdventureWorks
222+
```sql
223+
-- Example is based on AdventureWorks
227224
CREATE EXTERNAL TABLE dbo.FactInternetSalesNew
228225
WITH
229226
(

docs/t-sql/statements/create-index-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ INSERT INTO Production.UnitMeasure (UnitMeasureCode, Name, ModifiedDate)
891891

892892
The resulting error message is:
893893

894-
```cmd
894+
```
895895
Server: Msg 2601, Level 14, State 1, Line 1
896896
Cannot insert duplicate key row in object 'UnitMeasure' with unique index 'AK_UnitMeasure_Name'. The statement has been terminated.
897897
```
@@ -953,7 +953,7 @@ GO
953953

954954
Here are the results of the second `INSERT` statement.
955955

956-
```cmd
956+
```
957957
Server: Msg 2601, Level 14, State 1, Line 5
958958
Cannot insert duplicate key row in object '#Test' with unique index
959959
'AK_Index'. The statement has been terminated.

docs/t-sql/statements/create-message-type-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ CREATE MESSAGE TYPE message_type_name
9393
### A. Creating a message type containing well-formed XML
9494
The following example creates a new message type that contains well-formed XML.
9595

96-
```
96+
```sql
9797
CREATE MESSAGE TYPE
9898
[//Adventure-Works.com/Expenses/SubmitExpense]
9999
VALIDATION = WELL_FORMED_XML ;
@@ -102,7 +102,7 @@ CREATE MESSAGE TYPE
102102
### B. Creating a message type containing typed XML
103103
The following example creates a message type for an expense report encoded in XML. The example creates an XML schema collection that holds the schema for a simple expense report. The example then creates a new message type that validates messages against the schema.
104104

105-
```
105+
```sql
106106
CREATE XML SCHEMA COLLECTION ExpenseReportSchema AS
107107
N'<?xml version="1.0" encoding="UTF-16" ?>
108108
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
@@ -141,7 +141,7 @@ N'<?xml version="1.0" encoding="UTF-16" ?>
141141
### C. Creating a message type for an empty message
142142
The following example creates a new message type with empty encoding.
143143

144-
```
144+
```sql
145145
CREATE MESSAGE TYPE
146146
[//Adventure-Works.com/Expenses/SubmitExpense]
147147
VALIDATION = EMPTY ;
@@ -150,7 +150,7 @@ CREATE MESSAGE TYPE
150150
### D. Creating a message type containing binary data
151151
The following example creates a new message type to hold binary data. Because the message will contain data that is not XML, the message type specifies a validation type of `NONE`. Notice that, in this case, the application that receives a message of this type must verify that the message contains data, and that the data is of the type expected.
152152

153-
```
153+
```sql
154154
CREATE MESSAGE TYPE
155155
[//Adventure-Works.com/Expenses/ReceiptImage]
156156
VALIDATION = NONE ;

0 commit comments

Comments
 (0)