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

Commit 8626022

Browse files
authored
Merge pull request #8201 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to master to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents af0d9c7 + f25e985 commit 8626022

9 files changed

Lines changed: 38 additions & 42 deletions

File tree

docs/2014/relational-databases/extended-events/convert-an-existing-sql-trace-script-to-an-extended-events-session.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ manager: craigg
3434

3535
2. Obtain the ID of the trace. To do this, use the following query:
3636

37-
```
37+
```sql
3838
SELECT * FROM sys.traces;
3939
GO
4040
```
@@ -49,7 +49,7 @@ manager: craigg
4949
> [!NOTE]
5050
> In this example, the trace ID for the default trace (1) is used.
5151

52-
```
52+
```sql
5353
USE MASTER;
5454
GO
5555
DECLARE @trace_id int;
@@ -76,7 +76,7 @@ manager: craigg
7676

7777
3. Use the following query to identify the correct data fields to use for the events that you identified in the previous step. The query shows the Extended Events data fields in the "event_field" column. In the query, replace *<event_name>* with the name of an event that you specified in the previous step.
7878

79-
```
79+
```sql
8080
SELECT xp.name package_name, xe.name event_name
8181
,xc.name event_field, xc.description
8282
FROM sys.trace_xe_event_map AS em
@@ -97,7 +97,7 @@ manager: craigg
9797

9898
1. Add statements to create the event session, replacing s*ession_name* with the name that you want to use for the Extended Events session.
9999

100-
```
100+
```sql
101101
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
102102
DROP EVENT SESSION [Session_Name] ON SERVER;
103103
CREATE EVENT SESSION [Session_Name]
@@ -124,7 +124,7 @@ manager: craigg
124124

125125
To convert this to the Extended Events equivalent, the sqlserver.sp_statement_starting and the sqlserver.sp_statement_completed events are added, with a list of actions. Predicate statements are included as WHERE clauses.
126126

127-
```
127+
```sql
128128
ADD EVENT sqlserver.sp_statement_starting
129129
(ACTION
130130
(
@@ -150,9 +150,9 @@ manager: craigg
150150
)
151151
```
152152

153-
3. Add the asynchronous file target, replacing the file paths with the location where you want to save the ouput. When specifying the file target, you must include a log file and metadata file path file.
153+
3. Add the asynchronous file target, replacing the file paths with the location where you want to save the output. When specifying the file target, you must include a log file and metadata file path file.
154154

155-
```
155+
```sql
156156
ADD TARGET package0.asynchronous_file_target(
157157
SET filename='c:\temp\ExtendedEventsStoredProcs.xel', metadatafile='c:\temp\ExtendedEventsStoredProcs.xem');
158158
```
@@ -161,7 +161,7 @@ manager: craigg
161161

162162
1. You can use the sys.fn_xe_file_target_read_file function to view the output. To do this, run the following query, replacing the file paths with the paths that you specified:
163163

164-
```
164+
```sql
165165
SELECT *, CAST(event_data as XML) AS 'event_data_XML'
166166
FROM sys.fn_xe_file_target_read_file('c:\temp\ExtendedEventsStoredProcs*.xel', 'c:\temp\ExtendedEventsStoredProcs*.xem', NULL, NULL);
167167
@@ -172,7 +172,7 @@ manager: craigg
172172

173173
For more information about the sys.fn_xe_file_target_read_file function, see [sys.fn_xe_file_target_read_file &#40;Transact-SQL&#41;](/sql/relational-databases/system-functions/sys-fn-xe-file-target-read-file-transact-sql).
174174

175-
```
175+
```sql
176176
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
177177
DROP EVENT SESSION [session_name] ON SERVER;
178178
CREATE EVENT SESSION [session_name]
@@ -208,7 +208,7 @@ manager: craigg
208208

209209
## Example
210210

211-
```
211+
```sql
212212
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
213213
DROP EVENT SESSION [session_name] ON SERVER;
214214
CREATE EVENT SESSION [session_name]

docs/2014/sql-server/install/other-database-engine-upgrade-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ manager: craigg
5858
- HierarchyID
5959

6060
## Target Table of the OUTPUT INTO Clause Cannot Have Any Defined Triggers
61-
OUPUT INTO a target table when the table has any enabled triggers is not supported.
61+
OUTPUT INTO a target table when the table has any enabled triggers is not supported.
6262

6363
## Compile Time Error for UDFs When the Target of an OUTPUT INTO Clause is a Table
6464
User-defined functions (UDF) cannot be used to perform actions that modify the database state. For example, a UDF cannot perform any DDL (CREATE/ALTER/DROP) or DML (INSERT/UPDATE/DELETE) actions on any objects, except for table variables.

docs/ado/reference/ado-api/parameters-collection-ado.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Contains all the [Parameter](../../../ado/reference/ado-api/parameter-object.md)
3939

4040
2. When calling a stored procedure with parameters and explicitly appending a parameter to the **Parameters** collection with **Append**, the return value/output parameter should be appended to the **Parameters** collection. The return value must first be appended to the **Parameters** collection. Use **Append** to add the other parameters into the **Parameters** collection in the order of definition. For example, the stored procedure SPWithParam has two parameters. The first parameter, *InParam*, is an input parameter defined as adVarChar (20), and the second parameter, *OutParam*, is an output parameter defined as adVarChar (20). You can retrieve the return value/output parameter with the following code.
4141

42-
```
42+
```vb
4343
' Open Connection Conn
4444
set ccmd = CreateObject("ADODB.Command")
4545
ccmd.Activeconnection= Conn
@@ -49,7 +49,7 @@ Contains all the [Parameter](../../../ado/reference/ado-api/parameter-object.md)
4949

5050
ccmd.parameters.Append ccmd.CreateParameter(, adInteger, adParamReturnValue, , NULL) ' return value
5151
ccmd.parameters.Append ccmd.CreateParameter("InParam", adVarChar, adParamInput, 20, "hello world") ' input parameter
52-
ccmd.parameters.Append ccmd.CreateParameter("OutParam", adVarChar, adParamOuput, 20, NULL) ' output parameter
52+
ccmd.parameters.Append ccmd.CreateParameter("OutParam", adVarChar, adParamOutput, 20, NULL) ' output parameter
5353

5454
ccmd.execute()
5555

@@ -60,7 +60,7 @@ Contains all the [Parameter](../../../ado/reference/ado-api/parameter-object.md)
6060

6161
3. When calling a stored procedure with parameters and configuring the parameters by calling the **Item** method on the **Parameters** collection, the return value/output parameter of the stored procedure can be retrieved from the **Parameters** collection. For example, the stored procedure SPWithParam has two parameters. The first parameter, *InParam*, is an input parameter defined as adVarChar (20), and the second parameter, *OutParam*, is an output parameter defined as adVarChar (20). You can retrieve the return value/output parameter with the following code.
6262

63-
```
63+
```vb
6464
' Open Connection Conn
6565
set ccmd = CreateObject("ADODB.Command")
6666
ccmd.Activeconnection= Conn

docs/odbc/reference/odbc-64-bit-information.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Beginning with Windows Server 2003, Microsoft operating systems have supported t
2828
## Function Declaration Changes
2929
The following function signatures have changed for 64-bit programming. The items in bold text are the specific parameters that are different.
3030

31-
```
31+
```c
3232
SQLBindCol (SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber,
3333
SQLSMALLINT TargetType, SQLPOINTER TargetValuePtr, SQLLEN BufferLength, SQLLEN * StrLen_or_Ind);
3434

@@ -109,7 +109,7 @@ SQLSetStmtOption (SQLHSTMT StatementHandle, SQLUSMALLINT Option,
109109
## Changes in SQL Data Types
110110
The following four SQL types are still supported on 32-bit only; they are not defined for 64-bit compilers. These types are no longer used for any parameters in MDAC 2.7; use of these types will cause compiler failures on 64-bit platforms.
111111
112-
```
112+
```cpp
113113
#ifdef WIN32
114114
typedef SQLULEN SQLROWCOUNT;
115115
typedef SQLULEN SQLROWSETSIZE;
@@ -120,7 +120,7 @@ typedef SQLLEN SQLROWOFFSET;
120120

121121
The definition of SQLSETPOSIROW has changed for both 32-bit and 64-bit compilers:
122122

123-
```
123+
```c
124124
#ifdef _WIN64
125125
typedef UINT64 SQLSETPOSIROW;
126126
#else
@@ -130,7 +130,7 @@ typedef UINT64 SQLSETPOSIROW;
130130

131131
The definitions of SQLLEN and SQLULEN have changed for 64-bit compilers:
132132

133-
```
133+
```c
134134
#ifdef _WIN64
135135
typedef INT64 SQLLEN;
136136
typedef UINT64 SQLULEN;
@@ -142,7 +142,7 @@ typedef UINT64 SQLULEN;
142142

143143
Although SQL_C_BOOKMARK is deprecated in ODBC 3.0, for 64-bit compilers on 2.0 clients, this value has changed:
144144

145-
```
145+
```c
146146
#ifdef _WIN64
147147
#define SQL_C_BOOKMARK SQL_C_UBIGINT
148148
#else
@@ -152,7 +152,7 @@ typedef UINT64 SQLULEN;
152152

153153
The BOOKMARK type is defined differently in the newer headers:
154154

155-
```
155+
```c
156156
typedef SQLULEN BOOKMARK;
157157
```
158158

@@ -283,7 +283,7 @@ typedef SQLULEN BOOKMARK;
283283

284284
SQL_DRIVER_HLIB
285285

286-
When *InfoType* has either of the following 2 values **InfoValuePtr* is 64-bits on both input and ouput:
286+
When *InfoType* has either of the following 2 values **InfoValuePtr* is 64-bits on both input and output:
287287

288288
SQL_DRIVER_HDESC
289289

docs/relational-databases/extended-events/convert-an-existing-sql-trace-script-to-an-extended-events-session.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
3737

3838
2. Obtain the ID of the trace. To do this, use the following query:
3939

40-
```
40+
```sql
4141
SELECT * FROM sys.traces;
4242
GO
4343
```
@@ -52,7 +52,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
5252
> [!NOTE]
5353
> In this example, the trace ID for the default trace (1) is used.
5454

55-
```
55+
```sql
5656
USE MASTER;
5757
GO
5858
DECLARE @trace_id int;
@@ -79,7 +79,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
7979

8080
3. Use the following query to identify the correct data fields to use for the events that you identified in the previous step. The query shows the Extended Events data fields in the "event_field" column. In the query, replace *<event_name>* with the name of an event that you specified in the previous step.
8181

82-
```
82+
```sql
8383
SELECT xp.name package_name, xe.name event_name
8484
,xc.name event_field, xc.description
8585
FROM sys.trace_xe_event_map AS em
@@ -98,9 +98,9 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
9898
## To create the Extended Events session
9999
Use Query Editor to create the Extended Events session, and to write the output to a file target. The following steps describe a single query, with explanations to show you how to build the query. For the full query example, see the "Example" section of this topic.
100100

101-
1. Add statements to create the event session, replacing s*ession_name* with the name that you want to use for the Extended Events session.
101+
1. Add statements to create the event session, replacing *session_name* with the name that you want to use for the Extended Events session.
102102

103-
```
103+
```sql
104104
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
105105
DROP EVENT SESSION [Session_Name] ON SERVER;
106106
CREATE EVENT SESSION [Session_Name]
@@ -127,7 +127,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
127127

128128
To convert this to the Extended Events equivalent, the sqlserver.sp_statement_starting and the sqlserver.sp_statement_completed events are added, with a list of actions. Predicate statements are included as WHERE clauses.
129129

130-
```
130+
```sql
131131
ADD EVENT sqlserver.sp_statement_starting
132132
(ACTION
133133
(
@@ -153,9 +153,9 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
153153
)
154154
```
155155

156-
3. Add the asynchronous file target, replacing the file paths with the location where you want to save the ouput. When specifying the file target, you must include a log file and metadata file path file.
156+
3. Add the asynchronous file target, replacing the file paths with the location where you want to save the output. When specifying the file target, you must include a log file and metadata file path file.
157157

158-
```
158+
```sql
159159
ADD TARGET package0.asynchronous_file_target(
160160
SET filename='c:\temp\ExtendedEventsStoredProcs.xel', metadatafile='c:\temp\ExtendedEventsStoredProcs.xem');
161161
```
@@ -164,7 +164,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
164164

165165
1. You can use the sys.fn_xe_file_target_read_file function to view the output. To do this, run the following query, replacing the file paths with the paths that you specified:
166166

167-
```
167+
```sql
168168
SELECT *, CAST(event_data as XML) AS 'event_data_XML'
169169
FROM sys.fn_xe_file_target_read_file('c:\temp\ExtendedEventsStoredProcs*.xel', 'c:\temp\ExtendedEventsStoredProcs*.xem', NULL, NULL);
170170
@@ -175,7 +175,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
175175

176176
For more information about the sys.fn_xe_file_target_read_file function, see [sys.fn_xe_file_target_read_file &#40;Transact-SQL&#41;](../../relational-databases/system-functions/sys-fn-xe-file-target-read-file-transact-sql.md).
177177

178-
```
178+
```sql
179179
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
180180
DROP EVENT SESSION [session_name] ON SERVER;
181181
CREATE EVENT SESSION [session_name]
@@ -211,7 +211,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||=sqlallproducts-allversio
211211

212212
## Example
213213

214-
```
214+
```sql
215215
IF EXISTS(SELECT * FROM sys.server_event_sessions WHERE name='session_name')
216216
DROP EVENT SESSION [session_name] ON SERVER;
217217
CREATE EVENT SESSION [session_name]

docs/relational-databases/performance/adaptive-query-processing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Interleaved execution changes the unidirectional boundary between the optimizati
269269

270270
MSTVFs have a fixed cardinality guess of 100 starting with [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)], and 1 for earlier [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] versions. Interleaved execution helps workload performance issues that are due to these fixed cardinality estimates associated with MSTVFs. For more information on MSTVFs, see [Create User-defined Functions (Database Engine)](../../relational-databases/user-defined-functions/create-user-defined-functions-database-engine.md#TVF).
271271

272-
The following image depicts a [Live Query Statistics](../../relational-databases/performance/live-query-statistics.md) ouput, a subset of an overall execution plan that shows the impact of fixed cardinality estimates from MSTVFs. You can see the actual row flow vs. estimated rows. There are three noteworthy areas of the plan (flow is from right to left):
272+
The following image depicts a [Live Query Statistics](../../relational-databases/performance/live-query-statistics.md) output, a subset of an overall execution plan that shows the impact of fixed cardinality estimates from MSTVFs. You can see the actual row flow vs. estimated rows. There are three noteworthy areas of the plan (flow is from right to left):
273273
1. The MSTVF Table Scan has a fixed estimate of 100 rows. For this example, however, there are 527,597 rows flowing through this MSTVF Table Scan, as seen in Live Query Statistics via the *527597 of 100* actual of estimated – so the fixed estimate is significantly skewed.
274274
1. For the Nested Loops operation, only 100 rows are assumed to be returned by the outer side of the join. Given the high number of rows actually being returned by the MSTVF, you are likely better off with a different join algorithm altogether.
275275
1. For the Hash Match operation, notice the small warning symbol, which in this case is indicating a spill to disk.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ sp_addextendedproperty
6666
Is the name of the level 0 object type specified. *level0_object_name* is **sysname** with a default of NULL.
6767

6868
[ @level1type= ] { '*level1_object_type*' }
69-
Is the type of level 1 object. *level1_object_type* is **varchar(128)**, with a default of NULL. Valid inputs are AGGREGATE, DEFAULT, FUNCTION, LOGICAL FILE NAME, PROCEDURE, QUEUE, RULE, SYNONYM, TABLE, TABLE_TYPE, TYPE, VIEW, XML SCHEMA COLLECTION, and NULL.
70-
69+
Is the type of level 1 object. *level1_object_type* is **varchar(128)**, with a default of NULL. Valid inputs are AGGREGATE, DEFAULT, FUNCTION, LOGICAL FILE NAME, PROCEDURE, QUEUE, RULE, SEQUENCE, SYNONYM, TABLE, TABLE_TYPE, TYPE, VIEW, XML SCHEMA COLLECTION, and NULL.
7170
[ @level1name= ] { '*level1_object_name*' }
7271
Is the name of the level 1 object type specified. *level1_object_name* is **sysname**, with a default of NULL.
7372

docs/t-sql/functions/pack-sent-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dev_langs:
1515
helpviewer_keywords:
1616
- "number of output packets written"
1717
- "@@PACK_SENT function"
18-
- "packets [SQL Server], ouput"
18+
- "packets [SQL Server], output"
1919
- "networking [SQL Server], output packets"
2020
- "connections [SQL Server], packets"
2121
- "output packets written to network [SQL Server]"
@@ -33,7 +33,7 @@ manager: craigg
3333

3434
## Syntax
3535

36-
```
36+
```sql
3737
@@PACK_SENT
3838
```
3939

@@ -46,7 +46,7 @@ manager: craigg
4646
## Examples
4747
The following example shows the usage of `@@PACK_SENT`.
4848

49-
```
49+
```sql
5050
SELECT @@PACK_SENT AS 'Pack Sent';
5151
```
5252

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,10 +1073,7 @@ The name of the database that is to be copied.
10731073
Databases in [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] have several default settings that are set when the database is created. For more information about these default settings, see the list of values in [DATABASEPROPERTYEX](../../t-sql/functions/databasepropertyex-transact-sql.md).
10741074

10751075
MAXSIZE provides the ability to limit the size of the database. If the size of the database reaches its MAXSIZE, you receive error code 40544. When this occurs, you cannot insert or update data, or create new objects (such as tables, stored procedures, views, and functions). However, you can still read and delete data, truncate tables, drop tables and indexes, and rebuild indexes. You can then update MAXSIZE to a value larger than your current database size or delete some data to free storage space. There may be as much as a fifteen-minute delay before you can insert new data.
1076-
1077-
> [!IMPORTANT]
1078-
> The `CREATE DATABASE` statement must be the only statement in a [!INCLUDE[tsql](../../includes/tsql-md.md)] batch.
1079-
1076+
10801077
To change the size, edition, or service objective values later, use [ALTER DATABASE &#40;Azure SQL Database&#41;](../../t-sql/statements/alter-database-transact-sql.md?&tabs=sqldbls).
10811078

10821079
The CATALOG_COLLATION argument is only available during database creation.

0 commit comments

Comments
 (0)