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

Commit e4d4ae4

Browse files
authored
Merge pull request #17751 from v-thepet/dupeh2s2
Second batch of duplicate H2 fixes
2 parents 59f4988 + 7b1777c commit e4d4ae4

23 files changed

Lines changed: 99 additions & 90 deletions

docs/relational-databases/event-classes/clr-event-category.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,4 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
5353
## See Also
5454
[Extended Events](../../relational-databases/extended-events/extended-events.md)
5555
[Assemblies (Database Engine)](../../relational-databases/clr-integration/assemblies-database-engine.md)
56-
57-
58-
59-
## See Also
60-
[Extended Events](../../relational-databases/extended-events/extended-events.md)
61-
62-
56+

docs/relational-databases/native-client-odbc-how-to/execute-queries/set-cursor-options-odbc.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
3232

3333
You can control the type of cursor used either by setting SQL_ATTR_CURSOR_TYPE and SQL_ATTR_CONCURRENCY, or by setting SQL_ATTR_CURSOR_SENSITIVITY and SQL_ATTR_CURSOR_SCROLLABLE. You should not mix the two methods of specifying cursor behavior.
3434

35-
## Example
35+
## Examples
36+
37+
### A. Set a dynamic cursor
38+
3639
The following sample allocates a statement handle, sets a dynamic cursor type with row versioning optimistic concurrency, and then executes a SELECT.
3740

3841
```
@@ -42,7 +45,7 @@ retcode = SQLSetStmtAttr(hstmt1, SQL_ATTR_CONCURRENCY, SQLPOINTER)SQL_CONCUR_ROW
4245
retcode = SQLExecDirect(hstmt1, SELECT au_lname FROM authors", SQL_NTS);
4346
```
4447

45-
## Example
48+
### B. Set a scrollable, sensitive cursor
4649
The following sample allocates a statement handle, sets a scrollable, sensitive cursor, and then executes a SELECT
4750

4851
```

docs/relational-databases/native-client-odbc-table-valued-parameters/sending-data-as-a-table-valued-parameter-using-data-at-execution-odbc.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ from @Items
179179
}
180180
```
181181

182-
## Example
182+
## Examples
183183

184-
### Description
184+
### A. Use row streaming, one row per call
185185
This sample shows that you can use row streaming, one row per call to SQLPutData, with ODBC TVP, similar to how you might use BCP.exe to load data into a database.
186186

187187
Before building the sample, change the server name in the connection string.
@@ -209,7 +209,7 @@ create procedure MCLOGInsert (@TableVariable MCLOGType READONLY)
209209
go
210210
```
211211

212-
### Code
212+
#### Code
213213

214214
```cpp
215215
#define UNICODE
@@ -367,9 +367,7 @@ EXIT:
367367
}
368368
```
369369
370-
## Example
371-
372-
### Description
370+
### B. Use row streaming, multiple rows per call
373371
This sample shows that you can use row streaming, multiple rows per call to SQLPutData, with ODBC TVP, similar to how you might use BCP.exe to load data into a database.
374372
375373
Before building the sample, change the server name in the connection string.
@@ -397,7 +395,7 @@ create procedure MCLOGInsert (@TableVariable MCLOGType READONLY)
397395
go
398396
```
399397

400-
### Code
398+
#### Code
401399

402400
```cpp
403401
#define UNICODE

docs/relational-databases/partitions/manage-partition-wizard-f1-help.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ms.author: jrasnick
7171
### Sliding Window Scenario
7272
To manage your partitions in a sliding-window scenario, select **Manage partitioned data in a sliding window scenario**.
7373

74-
## UI element list
74+
### UI element list
7575
**Create a staging table for partition switching**
7676
Creates a staging table for the data you are switching in or switching out of the existing partitioned table.
7777

@@ -89,7 +89,7 @@ ms.author: jrasnick
8989
## <a name="SwitchIn"></a> Select Partition Switching-In Options Page
9090
Use the **Select Partition Switching-In options** page to select the staging table you are switching into the partitioned table.
9191

92-
## UI element list
92+
### UI element list
9393
**Show All Partitions**
9494
Select to show all partitions, including the partitions currently in the partitioned table.
9595

@@ -104,7 +104,7 @@ ms.author: jrasnick
104104
## <a name="SwitchOut"></a> Select Partition Switching-Out Options Page
105105
Use the **Select Partition Switching-Out options** page to select the partition and the staging table to hold the partitioned data that you are switching out of the partitioned table.
106106

107-
## UI element list
107+
### UI element list
108108
**Partition grid**
109109
Displays the partition name, **Left boundary**, **Right boundary**, **Filegroup**, and **Row count** of the partitions you selected.
110110

@@ -126,7 +126,7 @@ ms.author: jrasnick
126126

127127
You can also create the same indexes in the staging table that exist in the source partition. The staging table automatically contains a constraint based on the elements of the source partition. This constraint is typically generated from the boundary value of the source partition.
128128

129-
## UI element list
129+
### UI element list
130130
**Staging table name**
131131
Create a name for the staging table or accept the default name displayed in the edit box.
132132

@@ -254,7 +254,7 @@ ms.author: jrasnick
254254
## <a name="Summary"></a> Summary Page
255255
Use the **Summary** page to review the options that you have selected on the previous pages.
256256

257-
## UI element list
257+
### UI element list
258258
**Review your selections**
259259
Displays the selections you have made for each page of the wizard. Click a node to expand and view your previously selected options.
260260

docs/relational-databases/replication/administration/upgrade-replication-scripts-replication-transact-sql-programming.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,77 +106,80 @@ monikerRange: "=azuresqldb-mi-current||>=sql-server-2016||=sqlallproducts-allver
106106

107107
- For a push subscription, execute [sp_addmergepushsubscription_agent &#40;Transact-SQL&#41;](../../../relational-databases/system-stored-procedures/sp-addmergepushsubscription-agent-transact-sql.md) at the Publisher. Specify `@subscriber`, `@subscriber_db`, `@publication`, the Windows credentials under which the Merge Agent at the Distributor runs for `@job_name` and `@job_password`, and a schedule for this agent job. For more information, see [Specify Synchronization Schedules](../../../relational-databases/replication/specify-synchronization-schedules.md). This is done after the execution of [sp_addmergesubscription](../../../relational-databases/system-stored-procedures/sp-addmergesubscription-transact-sql.md). For more information, see [Create a Push Subscription](../../../relational-databases/replication/create-a-push-subscription.md).
108108

109-
## Example
109+
## Examples
110+
111+
### A. SQL Server 2000 script to create a transactional publication
112+
110113
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a transactional publication for the Product table. This publication supports immediate updating with queued updating as failover. Default parameters have been removed for readability.
111114

112115
[!code-sql[HowTo#sp_createtranpub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_1.sql)]
113116

114-
## Example
117+
### B. SQL Server 2005 and later script to create a transactional publication
115118
The following is an example of upgrading the previous script, which creates a transactional publication, to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. This publication supports immediate updating with queued updating as failover. Defaults for new parameters have been explicitly declared.
116119

117120
> [!NOTE]
118121
> Windows credentials are supplied at runtime using **sqlcmd** scripting variables.
119122
120123
[!code-sql[HowTo#sp_createtranpub_NWpostupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_2.sql)]
121124

122-
## Example
125+
### C. SQL Server 2000 script to create a merge publication
123126
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a merge publication for the Customers table. Default parameters have been removed for readability.
124127

125128
[!code-sql[HowTo#sp_createmergepub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_3.sql)]
126129

127-
## Example
130+
### D. SQL Server 2005 and later script to create a merge publication
128131
The following is an example of the previous script, which creates a merge publication, upgraded to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. Defaults for new parameters have been explicitly declared.
129132

130133
> [!NOTE]
131134
> Windows credentials are supplied at runtime using **sqlcmd** scripting variables.
132135
133136
[!code-sql[HowTo#sp_createmergepub_NWpostupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_4.sql)]
134137

135-
## Example
138+
### E. SQL Server 2000 script to create a push subscription to a transactional publication
136139
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a push subscription to a transactional publication. Default parameters have been removed for readability.
137140

138141
[!code-sql[HowTo#sp_createtranpushsub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_5.sql)]
139142

140-
## Example
143+
### F. SQL Server 2005 and later script to create a push subscription to a transactional publication
141144
The following is an example of the previous script, which creates a push subscription to a transactional publication, upgraded to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. Defaults for new parameters have been explicitly declared.
142145

143146
> [!NOTE]
144147
> Windows credentials are supplied at runtime using **sqlcmd** scripting variables.
145148
146149
[!code-sql[HowTo#sp_createtranpushsub_NWpostupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_6.sql)]
147150

148-
## Example
151+
### G. SQL Server 2000 script to create a push subscription to a merge publication
149152
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a push subscription to a merge publication. Default parameters have been removed for readability.
150153

151154
[!code-sql[HowTo#sp_createmergepushsub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_7.sql)]
152155

153-
## Example
156+
### H. SQL Server 2005 and later script to create a push subscription to a merge publication
154157
The following is an example of the previous script, which creates a push subscription to a merge publication, upgraded to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. Defaults for new parameters have been explicitly declared.
155158

156159
> [!NOTE]
157160
> Windows credentials are supplied at runtime using **sqlcmd** scripting variables.
158161
159162
[!code-sql[HowTo#sp_createmergepushsub_NWpostupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_8.sql)]
160163

161-
## Example
164+
### I. SQL Server 2000 script to create a pull subscription to a transactional publication
162165
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a pull subscription to a transactional publication. Default parameters have been removed for readability.
163166

164167
[!code-sql[HowTo#sp_createmergepushsub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_7.sql)]
165168

166-
## Example
169+
### J. SQL Server 2005 and later script to create a pull subscription to a transactional publication
167170
The following is an example of the previous script, which creates a pull subscription to a transactional publication, upgraded to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. Defaults for new parameters have been explicitly declared.
168171

169172
> [!NOTE]
170173
> Windows credentials are supplied at runtime using **sqlcmd** scripting variables.
171174
172175
[!code-sql[HowTo#sp_createtranpullsub_NWpostupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_9.sql)]
173176

174-
## Example
177+
### K. SQL Server 2000 script to create a pull subscription to a merge publication
175178
The following is an example of a [!INCLUDE[ssVersion2000](../../../includes/ssversion2000-md.md)] script that creates a pull subscription to a merge publication. Default parameters have been removed for readability.
176179

177180
[!code-sql[HowTo#sp_createmergepullsub_NWpreupgrade](../../../relational-databases/replication/codesnippet/tsql/upgrade-replication-scri_10.sql)]
178181

179-
## Example
182+
### L. SQL Server 2005 and later script to create a pull subscription to a merge publication
180183
The following is an example of the previous script, which creates a pull subscription to a merge publication, upgraded to run successfully for [!INCLUDE[ssVersion2005](../../../includes/ssversion2005-md.md)] and later versions. Defaults for new parameters have been explicitly declared.
181184

182185
> [!NOTE]

docs/relational-databases/replication/security/replicate-data-in-encrypted-columns-sql-server-management-studio.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ monikerRange: "=azuresqldb-mi-current||>=sql-server-2016||=sqlallproducts-allver
7070

7171
11. Execute [CLOSE SYMMETRIC KEY](../../../t-sql/statements/close-symmetric-key-transact-sql.md) to close the key.
7272

73-
## Example
73+
## Examples
74+
75+
### A. Create keys in the publication database
7476
This example creates a symmetric key, a certificate that is used to help secure the symmetric key, and a master key. These keys are created in the publication database. They are then used to create an encrypted column (EncryptedCreditCardApprovalCode) in the `SalesOrderHeader` table. This column is published in the AdvWorksSalesOrdersMerge publication instead of the unencrypted CreditCardApprovalCode column. When possible, prompt users to enter security credentials at runtime. If you must store credentials in a script file, you must secure the file to prevent unauthorized access.
7577

7678
[!code-sql[HowTo#sp_PublishEncryptedColumn](../../../relational-databases/replication/codesnippet/tsql/replicate-data-in-encryp_1.sql)]
7779

7880
[!code-sql[HowTo#sp_AddMergeArticle](../../../relational-databases/replication/codesnippet/tsql/replicate-data-in-encryp_2.sql)]
7981

80-
## Example
82+
### B. Create keys in the subscription database
8183
This example recreates the same symmetric key in the subscription database using the same values for ALGORITHM, KEY_SOURCE, and IDENTITY_VALUE from the first example. This example assumes that you have already initialized a subscription to the AdvWorksSalesOrdersMerge publication to replicate the encrypted column. When possible, prompt users to enter security credentials at runtime. If you must store credentials in a script file, you must secure the file during storage and transport to prevent unauthorized access.
8284

8385
[!code-sql[HowTo#sp_SubscriberEncryptedColumn](../../../relational-databases/replication/codesnippet/tsql/replicate-data-in-encryp_3.sql)]

docs/relational-databases/sql-trace/create-a-trace-transact-sql.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ ms.author: "mathoma"
3232
> [!IMPORTANT]
3333
> Unlike regular stored procedures, parameters of all SQL Server Profiler stored procedures (<strong>sp_trace_*xx*</strong>) are strictly typed and do not support automatic data type conversion. If these parameters are not called with the correct input parameter data types, as specified in the argument description, the stored procedure returns an error.
3434
35-
## Example
35+
## Examples
36+
3637
The following code demonstrates creating a trace using [!INCLUDE[tsql](../../includes/tsql-md.md)]. It is in three sections: creating the trace, populating the trace file, and stopping the trace. Customize the trace by adding the events that you want to trace. For the list of events and columns, see [sp_trace_setevent &#40;Transact-SQL&#41;](../../relational-databases/system-stored-procedures/sp-trace-setevent-transact-sql.md).
3738

39+
### A. Create a trace
3840
The following code creates a trace, adds events to the trace, and then starts the trace:
3941

4042
```
@@ -67,7 +69,7 @@ GO
6769
6870
```
6971

70-
## Example
72+
### B. Populate the trace file
7173
Now that the trace has been created and started, execute the following code to populate the trace with activity.
7274

7375
```
@@ -78,7 +80,7 @@ GO
7880
7981
```
8082

81-
## Example
83+
### C. Stop the trace
8284
The trace can be stopped and restarted at any time. In this example, execute the following code to stop the trace, close the trace, and delete the trace definition.
8385

8486
```
@@ -94,7 +96,7 @@ EXEC sp_trace_setstatus @TraceID, 2
9496
9597
```
9698

97-
## Example
99+
### D. Examine the trace file
98100
To examine the trace file, open the SampleTrace.trc file using [!INCLUDE[ssSqlProfiler](../../includes/sssqlprofiler-md.md)].
99101

100102
## See Also

docs/relational-databases/stored-procedures/create-a-stored-procedure.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
2222

2323
This topic describes how to create a [!INCLUDE[tsql](../../includes/tsql-md.md)] stored procedure by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] and by using the [!INCLUDE[tsql](../../includes/tsql-md.md)] CREATE PROCEDURE statement.
2424

25-
## <a name="Top"></a>
2625
- **Before you begin:** [Permissions](#Permissions)
2726

2827
- **To create a procedure, using:** [SQL Server Management Studio](#SSMSProcedure), [Transact-SQL](#TsqlProcedure)
@@ -126,7 +125,6 @@ This topic describes how to create a [!INCLUDE[tsql](../../includes/tsql-md.md)]
126125

127126
```
128127

129-
## <a name="PowerShellProcedure"></a>
130128
## See Also
131129
[CREATE PROCEDURE &#40;Transact-SQL&#41;](../../t-sql/statements/create-procedure-transact-sql.md)
132130

docs/relational-databases/system-stored-procedures/sp-check-for-sync-trigger-transact-sql.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ sp_check_for_sync_trigger [ @tabid = ] 'tabid'
5858

5959
**sp_check_for_sync_trigger** is used to coordinate between replication and user-defined triggers. This stored procedure determines if it is being called within the context of a replication trigger. For example, you can call the procedure **sp_check_for_sync_trigger** in the body of a user-defined trigger. If **sp_check_for_sync_trigger** returns **0**, the user-defined trigger continues processing. If **sp_check_for_sync_trigger** returns **1**, the user-defined trigger exits. This ensures that the user-defined trigger does not fire when the replication trigger updates the table.
6060

61-
## Example
61+
## Examples
62+
63+
### A. Add code to a trigger on a Subscriber table
6264
The following example shows code that could be used in a trigger on a Subscriber table.
6365

6466
```
@@ -69,7 +71,7 @@ IF @retcode = 1
6971
RETURN
7072
```
7173

72-
## Example
74+
### B. Add code to a trigger on a Publisher table
7375
The code can also be added to a trigger on a table at the Publisher; the code is similar, but the call to **sp_check_for_sync_trigger** includes an additional parameter.
7476

7577
```

docs/relational-databases/system-stored-procedures/sp-columns-ex-transact-sql.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,15 @@ sp_columns_ex [ @table_server = ] 'table_server'
8787
For more information, see the Microsoft ODBC documentation.
8888

8989
## Remarks
90-
**sp_columns_ex** is executed by querying the COLUMNS rowset of the **IDBSchemaRowset** interface of the OLE DB provider corresponding to *table_server*. The *table_name*, *table_schema*, *table_catalog*, and *column* parameters are passed to this interface to restrict the rows returned.
90+
- **sp_columns_ex** is executed by querying the COLUMNS rowset of the **IDBSchemaRowset** interface of the OLE DB provider corresponding to *table_server*. The *table_name*, *table_schema*, *table_catalog*, and *column* parameters are passed to this interface to restrict the rows returned.
9191

92-
**sp_columns_ex** returns an empty result set if the OLE DB provider of the specified linked server does not support the COLUMNS rowset of the **IDBSchemaRowset** interface.
92+
- **sp_columns_ex** returns an empty result set if the OLE DB provider of the specified linked server does not support the COLUMNS rowset of the **IDBSchemaRowset** interface.
93+
94+
- **sp_columns_ex** follows the requirements for delimited identifiers. For more information, see [Database Identifiers](../../relational-databases/databases/database-identifiers.md).
9395

9496
## Permissions
9597
Requires SELECT permission on the schema.
9698

97-
## Remarks
98-
**sp_columns_ex** follows the requirements for delimited identifiers. For more information, see [Database Identifiers](../../relational-databases/databases/database-identifiers.md).
99-
10099
## Examples
101100
The following example returns the data type of the `JobTitle` column of the `HumanResources.Employee` table in the [!INCLUDE[ssSampleDBobject](../../includes/sssampledbobject-md.md)] database on the linked server `Seattle1`.
102101

0 commit comments

Comments
 (0)