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

Commit 62efb80

Browse files
authored
Merge pull request #18224 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to master to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents 6d1ff90 + b5189c4 commit 62efb80

8 files changed

Lines changed: 21 additions & 16 deletions

File tree

docs/azure-data-studio/download-azure-data-studio.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Azure Data Studio runs on Windows, macOS, and Linux and is supported on the foll
145145
- macOS 10.14 Mojave
146146
- macOS 10.13 High Sierra
147147
- macOS 10.12 Sierra
148+
- macOS 11.1 Big Sur
148149

149150
### Linux
150151

docs/odbc/reference/syntax/sqlcolattribute-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ SQLRETURN SQLColAttribute (
7171
7272
- If *CharacterAttributePtr* is a pointer to a binary buffer, the application places the result of the SQL_LEN_BINARY_ATTR(*length*) macro in *BufferLength*. This places a negative value in *BufferLength*.
7373
74-
- If *CharacterAttributePtr* is a pointer to a fixed-length data type, *BufferLength* must be one of the following: SQL_IS_INTEGER, SQL_IS_UNINTEGER, SQL_SMALLINT, or SQLUSMALLINT.
74+
- If *CharacterAttributePtr* is a pointer to a fixed-length data type, *BufferLength* must be one of the following: SQL_IS_INTEGER, SQL_IS_UINTEGER, SQL_IS_SMALLINT, or SQL_IS_USMALLINT.
7575
7676
*StringLengthPtr*
7777
[Output] Pointer to a buffer in which to return the total number of bytes (excluding the null-termination byte for character data) available to return in **CharacterAttributePtr*.

docs/relational-databases/system-catalog-views/sys-server-file-audits-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ms.author: wiassaf
3434
|create_date|**datetime**|UTC date when the file audit was created.|
3535
|modify_date|**datatime**|UTC date when the file audit was last modified.|
3636
|principal_id|**int**|ID of the owner of the audit as registered on the server.|
37-
|type|**char(2)**|Audit type:<br /><br /> 0 = NT Security event log<br /><br /> 1 = NT Application event log<br /><br /> 2 = File on file system|
37+
|type|**char(2)**|Audit type:<br /><br /> SL = NT Security event log<br /><br /> AL = NT Application event log<br /><br /> FL = File on file system|
3838
|type_desc|**nvarchar(60)**|Audit type description.|
3939
|on_failure|**tinyint**|On Failure condition:<br /><br /> 0 = Continue<br /><br /> 1 = Shut down server instance<br /><br /> 2 = Fail operation|
4040
|on_failure_desc|**nvarchar(60)**|On Failure to write an action entry:<br /><br /> CONTINUE<br /><br /> SHUTDOWN SERVER INSTANCE<br /><br /> FAIL OPERATION|

docs/relational-databases/system-dynamic-management-views/sys-dm-io-virtual-file-stats-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ monikerRange: "=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sq
2525
# sys.dm_io_virtual_file_stats (Transact-SQL)
2626
[!INCLUDE [sql-asdb-asdbmi-asa-pdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa.md)]
2727

28-
Returns I/O statistics for data and log files. This dynamic management view replaces the [fn_virtualfilestats](../../relational-databases/system-functions/sys-fn-virtualfilestats-transact-sql.md) function.
28+
Returns I/O statistics for data and log files. This dynamic management function replaces the [fn_virtualfilestats](../../relational-databases/system-functions/sys-fn-virtualfilestats-transact-sql.md) function.
2929

3030
> [!NOTE]
3131
> To call this from [!INCLUDE[ssSDWfull](../../includes/sssdwfull-md.md)], use the name **sys.dm_pdw_nodes_io_virtual_file_stats**.

docs/t-sql/database-console-commands/dbcc-shrinkfile-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The file to be shrunk's logical name.
6161
The file to be shrunk's identification (ID) number. To get a file ID, use the [FILE_IDEX](../../t-sql/functions/file-idex-transact-sql.md) system function or query the [sys.database_files](../../relational-databases/system-catalog-views/sys-database-files-transact-sql.md) catalog view in the current database.
6262

6363
*target_size*
64-
An integer - the file's new megabyte size. If not specified, DBCC SHRINKFILE reduces to the file creation size.
64+
An integer - the file's new megabyte size. If not specified or 0, DBCC SHRINKFILE reduces to the file creation size.
6565

6666
> [!NOTE]
6767
> You can reduce an empty file's default size using DBCC SHRINKFILE *target_size*. For example, if you create a 5-MB file and then shrink the file to 3 MB while the file is still empty, the default file size is set to 3 MB. This applies only to empty files that have never contained data.

docs/t-sql/functions/logical-functions-iif-transact-sql.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ms.author: chadam
2929
## Syntax
3030

3131
```syntaxsql
32-
IIF ( boolean_expression, true_value, false_value )
32+
IIF( boolean_expression, true_value, false_value )
3333
```
3434

3535
[!INCLUDE[sql-server-tsql-previous-offline-documentation](../../includes/sql-server-tsql-previous-offline-documentation.md)]
@@ -38,7 +38,7 @@ IIF ( boolean_expression, true_value, false_value )
3838
*boolean_expression*
3939
A valid Boolean expression.
4040

41-
If this argument is not a Boolean expression, then a syntax error is raised.
41+
If this argument is not a Boolean expression then a syntax error is raised.
4242

4343
*true_value*
4444
Value to return if *boolean_expression* evaluates to true.
@@ -59,8 +59,8 @@ IIF ( boolean_expression, true_value, false_value )
5959
### A. Simple IIF example
6060

6161
```sql
62-
DECLARE @a INT = 45, @b INT = 40;
63-
SELECT IIF ( @a > @b, 'TRUE', 'FALSE' ) AS Result;
62+
DECLARE @a INT = 45, @b INT = 40;
63+
SELECT [Result] = IIF( @a > @b, 'TRUE', 'FALSE' );
6464
```
6565

6666
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
@@ -69,14 +69,12 @@ SELECT IIF ( @a > @b, 'TRUE', 'FALSE' ) AS Result;
6969
Result
7070
--------
7171
TRUE
72-
73-
(1 row(s) affected)
7472
```
7573

7674
### B. IIF with NULL constants
7775

7876
```sql
79-
SELECT IIF ( 45 > 30, NULL, NULL ) AS Result;
77+
SELECT [Result] = IIF( 45 > 30, NULL, NULL );
8078
```
8179

8280
The result of this statement is an error.
@@ -85,7 +83,7 @@ SELECT IIF ( 45 > 30, NULL, NULL ) AS Result;
8583

8684
```sql
8785
DECLARE @P INT = NULL, @S INT = NULL;
88-
SELECT IIF ( 45 > 30, @p, @s ) AS Result;
86+
SELECT [Result] = IIF( 45 > 30, @P, @S );
8987
```
9088

9189
[!INCLUDE[ssResult](../../includes/ssresult-md.md)]
@@ -94,8 +92,6 @@ SELECT IIF ( 45 > 30, @p, @s ) AS Result;
9492
Result
9593
--------
9694
NULL
97-
98-
(1 row(s) affected)
9995
```
10096

10197
## See Also

docs/t-sql/statements/set-textsize-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
2929
# SET TEXTSIZE (Transact-SQL)
3030
[!INCLUDE [sql-asdb-asdbmi-asa-pdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)]
3131

32-
Specifies the size of **varchar(max)**, **nvarchar(max)**, **varbinary(max)**, **text**, **ntext**, and **image** data returned by a SELECT statement.
32+
Specifies the size, in bytes, of **varchar(max)**, **nvarchar(max)**, **varbinary(max)**, **text**, **ntext**, and **image** data returned to the client by a SELECT statement.
3333

3434
> [!IMPORTANT]
3535
> **ntext**, **text**, and **image** data types will be removed in a future version of [!INCLUDE[msCoName](../../includes/msconame-md.md)][!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use **nvarchar(max)**, **varchar(max)**, and **varbinary(max)** instead.

docs/tools/sqlcmd-utility.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,14 +914,22 @@ Use the following practices to help maximize security and efficiency.
914914

915915
- Use integrated security.
916916

917-
- Use **-X** in automated environments.
917+
- Use **-X[1]** in automated environments.
918918

919919
- Secure input and output files by using appropriate NTFS file system permissions.
920920

921921
- To increase performance, do as much in one **sqlcmd** session as you can, instead of in a series of sessions.
922922

923923
- Set time-out values for batch or query execution higher than you expect it will take to execute the batch or query.
924924

925+
Use the following practices to help maximize correctness:
926+
927+
- Use **-V16** to log any [severity 16 level messages](../relational-databases/errors-events/database-engine-error-severities.md#levels-of-severity). Severity 16 messages indicates general errors that can be corrected by the user.
928+
929+
- Check the exit code and DOS ERRORLEVEL variable after the process has exited. **sqlcmd** will return 0 normally, otherwise it will set the ERRORLEVEL as configured by **-V**. In other words, ERRORLEVEL shouldn't be expected to be the same value as the Error Number reported from SQL Server. The Error Number is a SQL Server-specific value corresponding to the system function [**@@ERROR**](../t-sql/functions/error-transact-sql.md). ERRORLEVEL is a SQLCMD-specific value to indicate why it (i.e. SQLCMD) terminated, and it's value is influenced by specifying **-b** command line argument.
930+
931+
Using **-V16** in combination with checking the exit code and DOS ERRORLEVEL can help catch errors in automated environments, particularly quality gates before a production release.
932+
925933
## Next steps
926934

927935
- [Start the sqlcmd Utility](~/relational-databases/scripting/sqlcmd-start-the-utility.md)

0 commit comments

Comments
 (0)