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

Commit 4d273e2

Browse files
authored
Merge pull request #11731 from XiaoyuMSFT/rcsibranch
Rcsibranch
2 parents 84102c6 + 01e123c commit 4d273e2

3 files changed

Lines changed: 37 additions & 7 deletions

File tree

docs/relational-databases/stored-procedures/specify-parameters.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ GO
7777

7878
> [!NOTE]
7979
> If the default value is a character string that contains embedded blanks or punctuation, or if it starts with a number (for example, 6xxx), it must be enclosed in single, straight quotation marks.
80+
81+
> [!NOTE]
82+
> Default parameters are not supported in Azure SQL Data Warehouse or Parallel Data Warehouse.
8083
8184
If no value can be specified appropriately as a default for the parameter, specify NULL as the default. It is a good idea to have the procedure return a customized message if the procedure is executed without a value for the parameter.
8285

docs/t-sql/statements/alter-database-transact-sql-set-options.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,6 +2907,7 @@ SET
29072907
<option_spec>::=
29082908
{
29092909
<RESULT_SET_CACHING>
2910+
|<snapshot_option>
29102911
}
29112912
;
29122913
@@ -2915,6 +2916,12 @@ SET
29152916
RESULT_SET_CACHING {ON | OFF}
29162917
}
29172918
2919+
<snapshot_option>::=
2920+
{
2921+
READ_COMMITTED_SNAPSHOT {ON | OFF }
2922+
}
2923+
2924+
29182925
```
29192926

29202927
## Arguments
@@ -2924,7 +2931,7 @@ RESULT_SET_CACHING {ON | OFF}
29242931
Is the name of the database to be modified.
29252932

29262933
<a name="result_set_caching"></a> RESULT_SET_CACHING { ON | OFF }
2927-
Applies to Azure SQL Data Warehouse (preview)
2934+
**Applies to** Azure SQL Data Warehouse (preview)
29282935

29292936
This command must be run while connected to the `master` database. Change to this database setting takes effect immediately. Storage costs are incurred by caching query result sets. After disabling result caching for a database, previously persisted result cache will immediately be deleted from Azure SQL Data Warehouse storage. A new column, is_result_set_caching_on, is introduced in `sys.databases` to show the result cache setting for a database.
29302937

@@ -2942,6 +2949,23 @@ Specifies that query result sets returned from this database will not be cached
29422949
command|Like|%DWResultCacheDb%|
29432950
| | |
29442951

2952+
2953+
<a name="snapshot_option"></a> READ_COMMITTED_SNAPSHOT { ON | OFF }
2954+
**Applies to** Azure SQL Data Warehouse (preview)
2955+
2956+
ON
2957+
Enables the READ_COMMITTED_SNAPSHOT option at the database level.
2958+
2959+
OFF
2960+
Turn off READ_COMMITTED_SNAPSHOT option at the database level.
2961+
2962+
Turning READ_COMMITTED_SNAPSHOT ON or OFF for a database will kill all open connections to this database. You may want to make this change during database maintenance window or wait until there is no active connection to the database except for the connection executing the ALTER DATABSE command. The database does not have to be in single-user mode. Changing READ_COMMITTED_SNAPSHOT setting at session level is not supported. To verify this setting for a database, check is_read_committed_snapshot_on column in sys.databases.
2963+
2964+
In a database with READ_COMMITTED_SNAPSHOT enabled, queries may experience slower performance due to the scan of versions if multiple data versions are present. Long open transactions can also cause increase in the size of the database if there are data changes by these transactions which blocks the cleanup of versions.
2965+
2966+
2967+
2968+
29452969
## Remarks
29462970

29472971
Cached result set is reused for a query if all of the following requirements are all met:
@@ -2954,12 +2978,9 @@ Once result set caching is turned ON for a database, results are cached for all
29542978

29552979
## Permissions
29562980

2957-
Requires these permissions:
2981+
To set RESULT_SET_CACHING option, a user needs server-level principal login (the one created by the provisioning process) or be a member of the `dbmanager` database role.
29582982

2959-
- Server-level principal login (the one created by the provisioning process), or
2960-
- Member of the `dbmanager` database role.
2961-
2962-
The owner of the database cannot alter the database unless the owner is a member of the dbmanager role.
2983+
To set READ_COMMITTED_SNAPSHOT option, a user needs ALTER permission on the database.
29632984

29642985
## Examples
29652986

@@ -3024,6 +3045,12 @@ FROM sys.dm_pdw_request_steps
30243045
WHERE command like '%DWResultCacheDb%' and step_index = 0;
30253046
```
30263047

3048+
### Enable Read_Committed_Snapshot option for a database
3049+
```sql
3050+
ALTER DATABASE MyDatabase
3051+
SET READ_COMMITTED_SNAPSHOT ON
3052+
```
3053+
30273054
## See also
30283055

30293056
- [DATABASEPROPERTYEX](../../t-sql/functions/databasepropertyex-transact-sql.md)

docs/t-sql/statements/create-materialized-view-as-select-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ When MIN/MAX aggregates are used in the SELECT list of materialized view definit
9090

9191
- FOR_APPEND is required. For example:
9292
```sql
93-
CREATE MATRIALIZED VIEW mv_test2
93+
CREATE MATERIALIZED VIEW mv_test2
9494
WITH (distribution = hash(i_category_id), FOR_APPEND)
9595
AS
9696
SELECT MAX(i.i_rec_start_date) as max_i_rec_start_date, MIN(i.i_rec_end_date) as min_i_rec_end_date, i.i_item_sk, i.i_item_id, i.i_category_id

0 commit comments

Comments
 (0)