Skip to content

Commit 123895f

Browse files
authored
Merge pull request #31639 from rwestMSFT/rw-0822-system-stored-procedures-0003
Latest bulk changes for system stored procedures
2 parents 0445129 + cead56d commit 123895f

53 files changed

Lines changed: 219 additions & 217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/relational-databases/system-stored-procedures/sp-wait-for-database-copy-sync-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "sp_wait_for_database_copy_sync is scoped to an active geo-replicat
55
author: markingmyname
66
ms.author: maghan
77
ms.reviewer: randolphwest
8-
ms.date: 04/27/2023
8+
ms.date: 08/21/2024
99
ms.service: azure-sql-database
1010
ms.topic: "reference"
1111
f1_keywords:
@@ -74,5 +74,5 @@ GO
7474
## Related content
7575

7676
- [sys.dm_continuous_copy_status (Azure SQL Database)](../system-dynamic-management-views/sys-dm-continuous-copy-status-azure-sql-database.md)
77-
- [Geo-Replication Dynamic Management Views (DMVs) and Functions (Azure SQL Database)](../system-dynamic-management-views/geo-replication-dynamic-management-views-and-functions-azure-sql-database.md)
77+
- [Geo-Replication Dynamic Management Views and Functions (Azure SQL Database)](../system-dynamic-management-views/geo-replication-dynamic-management-views-and-functions-azure-sql-database.md)
7878
- [sys.dm_geo_replication_link_status](../system-dynamic-management-views/sys-dm-geo-replication-link-status-azure-sql-database.md)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Provides information about current users, sessions, and processes i
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 07/06/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -69,9 +69,9 @@ With parallel processing, subthreads are created for the specific session ID. Th
6969

7070
## Remarks
7171

72-
A blocking process, which may have an exclusive lock, is one that is holding resources that another process needs.
72+
A blocking process, which might have an exclusive lock, is one that is holding resources that another process needs.
7373

74-
All orphaned distributed transactions are assigned the session ID value of `-2`. Orphaned distributed transactions are distributed transactions that aren't associated with any session ID. For more information, see [Use Marked Transactions to Recover Related Databases Consistently (Full Recovery Model)](../backup-restore/use-marked-transactions-to-recover-related-databases-consistently.md).
74+
All orphaned distributed transactions are assigned the session ID value of `-2`. Orphaned distributed transactions are distributed transactions that aren't associated with any session ID. For more information, see [Use Marked Transactions to Recover Related Databases Consistently](../backup-restore/use-marked-transactions-to-recover-related-databases-consistently.md).
7575

7676
Query the `is_user_process` column of `sys.dm_exec_sessions` to separate system processes from user processes.
7777

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Reads the XML text provided as input, parses the text by using the
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -31,7 +31,7 @@ For backward compatibility, `sp_xml_preparedocument` collapses the CR (`char(13)
3131
> [!NOTE]
3232
> The XML parser invoked by `sp_xml_preparedocument` can parse internal DTDs and entity declarations. Because maliciously constructed DTDs and entity declarations can be used to perform a denial of service attack, we strongly recommend that users not directly pass XML documents from untrusted sources to `sp_xml_preparedocument`.
3333
>
34-
> To mitigate recursive entity expansion attacks, `sp_xml_preparedocument` limits to 10,000 the number of entities that can be expanded underneath a single entity at the top level of a document. The limit does not apply to character or numeric entities. This limit allows documents with many entity references to be stored, but prevents any one entity from being recursively expanded in a chain longer than 10,000 expansions.
34+
> To mitigate recursive entity expansion attacks, `sp_xml_preparedocument` limits to 10,000 the number of entities that can be expanded underneath a single entity at the top level of a document. The limit doesn't apply to character or numeric entities. This limit allows documents with many entity references to be stored, but prevents any one entity from being recursively expanded in a chain longer than 10,000 expansions.
3535
3636
`sp_xml_preparedocument` limits the number of elements that can be open at one time to 256.
3737

@@ -54,10 +54,10 @@ The handle to the newly created document. *hdoc* is an integer.
5454

5555
#### [ *xmltext* ]
5656

57-
The original XML document. The MSXML parser parses this XML document. *xmltext* is a text parameter: **char**, **nchar**, **varchar**, **nvarchar**, **text**, **ntext** or **xml**. The default value is NULL, in which case an internal representation of an empty XML document is created.
57+
The original XML document. The MSXML parser parses this XML document. *xmltext* is a text parameter: **char**, **nchar**, **varchar**, **nvarchar**, **text**, **ntext** or **xml**. The default value is `NULL`, in which case an internal representation of an empty XML document is created.
5858

5959
> [!NOTE]
60-
> `sp_xml_preparedocument` can only process text or untyped XML. If an instance value to be used as input is already typed XML, first cast it to a new untyped XML instance or as a string and then pass that value as input. For more information, see [Compare Typed XML to Untyped XML](../xml/compare-typed-xml-to-untyped-xml.md).
60+
> `sp_xml_preparedocument` can only process text or untyped XML. If an instance value to be used as input is already typed XML, first cast it to a new untyped XML instance or as a string and then pass that value as input. For more information, see [Compare typed XML to untyped XML](../xml/compare-typed-xml-to-untyped-xml.md).
6161
6262
#### [ *xpath_namespaces* ]
6363

@@ -154,9 +154,9 @@ EXEC sp_xml_preparedocument @hdoc OUTPUT, @doc, '<ROOT xmlns:xyz="urn:MyNamespac
154154

155155
## Related content
156156

157-
- [XML Stored Procedures(Transact-SQL)](xml-stored-procedures-transact-sql.md)
158-
- [System Stored Procedures(Transact-SQL)](system-stored-procedures-transact-sql.md)
159-
- [OPENXML(Transact-SQL)](../../t-sql/functions/openxml-transact-sql.md)
157+
- [XML stored procedures (Transact-SQL)](xml-stored-procedures-transact-sql.md)
158+
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
159+
- [OPENXML (Transact-SQL)](../../t-sql/functions/openxml-transact-sql.md)
160160
- [sys.dm_exec_xml_handles (Transact-SQL)](../system-dynamic-management-views/sys-dm-exec-xml-handles-transact-sql.md)
161161
- [sp_xml_removedocument (Transact-SQL)](sp-xml-removedocument-transact-sql.md)
162162
- [nodes() Method (xml Data Type)](../../t-sql/xml/nodes-method-xml-data-type.md)

docs/relational-databases/system-stored-procedures/sp-xp-cmdshell-proxy-account-transact-sql.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Creates a proxy credential for xp_cmdshell.
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 07/06/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -38,31 +38,31 @@ sp_xp_cmdshell_proxy_account [ NULL | { 'account_name' , 'password' } ]
3838

3939
## Arguments
4040

41-
- **NULL**
41+
#### NULL
4242

43-
Specifies that the proxy credential should be deleted.
43+
Specifies that the proxy credential should be deleted.
4444

45-
- **'*account_name*'**
45+
#### '*account_name*'
4646

47-
Specifies the Windows account to be the proxy.
47+
Specifies the Windows account to be the proxy.
4848

49-
- **'*password*'**
49+
#### '*password*'
5050

51-
Specifies the password of the Windows account.
51+
Specifies the password of the Windows account.
5252

5353
## Return code values
5454

5555
`0` (success) or `1` (failure).
5656

5757
## Remarks
5858

59-
The proxy credential is called **##xp_cmdshell_proxy_account##**.
59+
The proxy credential is called `##xp_cmdshell_proxy_account##`.
6060

61-
When it is executed using the NULL option, `sp_xp_cmdshell_proxy_account` deletes the proxy credential.
61+
When it's executed using the `NULL` option, `sp_xp_cmdshell_proxy_account` deletes the proxy credential.
6262

6363
## Permissions
6464

65-
Requires CONTROL SERVER permission.
65+
Requires `CONTROL SERVER` permission.
6666

6767
## Examples
6868

docs/relational-databases/system-stored-procedures/sql-data-warehouse-stored-procedures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Azure Synapse Analytics stored procedures"
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: randolphwest
7-
ms.date: 05/24/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.topic: "reference"
1010
dev_langs:
@@ -31,7 +31,7 @@ monikerRange: "=azure-sqldw-latest || =fabric"
3131
- [sp_special_columns_100 (Azure Synapse Analytics)](sp-special-columns-100-sql-data-warehouse.md)
3232

3333
> [!NOTE]
34-
> Some additional system stored procedures are used only within an instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] or through client APIs and aren't intended for general customer use. These procedures are listed at [System stored procedures (Transact-SQL)](./system-stored-procedures-transact-sql.md). These procedures are subject to change and compatibility isn't guaranteed. All procedures on the list aren't available in [!INCLUDE [ssazuresynapse-md](../../includes/ssazuresynapse-md.md)].
34+
> Some additional system stored procedures are used only within an instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] or through client APIs and aren't intended for general customer use. These procedures are listed at [System stored procedures](system-stored-procedures-transact-sql.md). These procedures are subject to change and compatibility isn't guaranteed. All procedures on the list aren't available in [!INCLUDE [ssazuresynapse-md](../../includes/ssazuresynapse-md.md)].
3535
3636
## Related content
3737

docs/relational-databases/system-stored-procedures/sql-server-profiler-stored-procedures-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "SQL Server Profiler stored procedures (Transact-SQL)"
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/24/2023
7+
ms.date: 08/22/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -38,7 +38,7 @@ dev_langs:
3838
:::column-end:::
3939
:::row-end:::
4040

41-
For an example of using trace stored procedures, see [Create a Trace (Transact-SQL)](../sql-trace/create-a-trace-transact-sql.md).
41+
For an example of using trace stored procedures, see [Create a Trace](../sql-trace/create-a-trace-transact-sql.md).
4242

4343
## Related content
4444

docs/relational-databases/system-stored-procedures/sys-sp-add-trusted-assembly-transact-sql.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Adds an assembly to the list of trusted assemblies for the server.
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 07/06/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -44,7 +44,7 @@ This procedure adds an assembly to [sys.trusted_assemblies](../system-catalog-vi
4444

4545
#### [ @hash = ] '*value*'
4646

47-
The SHA2_512 hash value of the assembly to add to the list of trusted assemblies for the server. Trusted assemblies may load when [CLR strict security](../../database-engine/configure-windows/clr-strict-security.md) is enabled, even if the assembly is unsigned or the database isn't marked as trustworthy.
47+
The SHA2_512 hash value of the assembly to add to the list of trusted assemblies for the server. Trusted assemblies might load when [Server configuration: clr strict security](../../database-engine/configure-windows/clr-strict-security.md) is enabled, even if the assembly is unsigned or the database isn't marked as trustworthy.
4848

4949
#### [ @description = ] '*description*'
5050

@@ -66,9 +66,9 @@ EXEC sp_add_trusted_assembly
6666

6767
## Related content
6868

69-
- [sys.sp_drop_trusted_assembly](sys-sp-drop-trusted-assembly-transact-sql.md)
70-
- [sys.trusted_assemblies](../system-catalog-views/sys-trusted-assemblies-transact-sql.md)
69+
- [sys.sp_drop_trusted_assembly (Transact-SQL)](sys-sp-drop-trusted-assembly-transact-sql.md)
70+
- [sys.trusted_assemblies (Transact-SQL)](../system-catalog-views/sys-trusted-assemblies-transact-sql.md)
7171
- [CREATE ASSEMBLY (Transact-SQL)](../../t-sql/statements/create-assembly-transact-sql.md)
72-
- [CLR strict security](../../database-engine/configure-windows/clr-strict-security.md)
73-
- [sys.assemblies](../system-catalog-views/sys-assemblies-transact-sql.md)
74-
- [sys.dm_clr_loaded_assemblies](../system-dynamic-management-views/sys-dm-clr-loaded-assemblies-transact-sql.md)
72+
- [Server configuration: clr strict security](../../database-engine/configure-windows/clr-strict-security.md)
73+
- [sys.assemblies (Transact-SQL)](../system-catalog-views/sys-assemblies-transact-sql.md)
74+
- [sys.dm_clr_loaded_assemblies (Transact-SQL)](../system-dynamic-management-views/sys-dm-clr-loaded-assemblies-transact-sql.md)

docs/relational-databases/system-stored-procedures/sys-sp-cdc-add-job-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Creates a change data capture cleanup or capture job in the curren
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/13/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -44,7 +44,7 @@ sys.sp_cdc_add_job [ @job_type = ] N'job_type'
4444

4545
#### [ @job_type = ] N'*job_type*'
4646

47-
Type of job to add. *@job_type* is **nvarchar(20)** and can't be NULL. Valid inputs are `capture` and `cleanup`.
47+
Type of job to add. *@job_type* is **nvarchar(20)** and can't be `NULL`. Valid inputs are `capture` and `cleanup`.
4848

4949
#### [ @start_job = ] *start_job*
5050

@@ -66,7 +66,7 @@ Maximum number of scan cycles to execute in order to extract all rows from the l
6666

6767
Indicates whether the capture job is to run continuously (`1`), or run only once (`0`). *@continuous* is **bit** with a default of `1`.
6868

69-
- When *@continuous* is `1`, the [sp_cdc_scan](sys-sp-cdc-scan-transact-sql.md) job scans the log and processes up to (`@maxtrans * @maxscans`) transactions. It then waits the number of seconds specified in *@pollinginterval* before beginning the next log scan.
69+
- When *@continuous* is `1`, the [sys.sp_cdc_scan](sys-sp-cdc-scan-transact-sql.md) job scans the log and processes up to (`@maxtrans * @maxscans`) transactions. It then waits the number of seconds specified in *@pollinginterval* before beginning the next log scan.
7070

7171
- When *@continuous* is `0`, the `sp_cdc_scan` job executes up to *@maxscans* scans of the log, processing up to *@maxtrans* transaction during each scan, and then exits.
7272

@@ -104,7 +104,7 @@ Because the cleanup and capture jobs are created by default, this stored procedu
104104

105105
The name of the job is `cdc.<database_name>_cleanup` or `cdc.<database_name>_capture`, where `<database_name>` is the name of the current database. If a job with the same name already exists, the name is appended with a period (`.`) followed by a unique identifier, for example: `cdc.AdventureWorks_capture.A1ACBDED-13FC-428C-8302-10100EF74F52`.
106106

107-
To view the current configuration of a cleanup or capture job, use [sp_cdc_help_jobs](sys-sp-cdc-help-jobs-transact-sql.md). To change the configuration of a job, use [sp_cdc_change_job](sys-sp-cdc-change-job-transact-sql.md).
107+
To view the current configuration of a cleanup or capture job, use [sys.sp_cdc_help_jobs](sys-sp-cdc-help-jobs-transact-sql.md). To change the configuration of a job, use [sys.sp_cdc_change_job](sys-sp-cdc-change-job-transact-sql.md).
108108

109109
## Permissions
110110

docs/relational-databases/system-stored-procedures/sys-sp-cdc-change-job-transact-sql.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Modifies the configuration of a change data capture cleanup or cap
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/13/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -22,7 +22,7 @@ dev_langs:
2222

2323
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
2424

25-
Modifies the configuration of a change data capture cleanup or capture job in the current database. To view the current configuration of a job, query the [dbo.cdc_jobs](../system-tables/dbo-cdc-jobs-transact-sql.md) table, or use [sp_cdc_help_jobs](sys-sp-cdc-help-jobs-transact-sql.md).
25+
Modifies the configuration of a change data capture cleanup or capture job in the current database. To view the current configuration of a job, query the [dbo.cdc_jobs](../system-tables/dbo-cdc-jobs-transact-sql.md) table, or use [sys.sp_cdc_help_jobs](sys-sp-cdc-help-jobs-transact-sql.md).
2626

2727
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
2828

@@ -61,13 +61,13 @@ Maximum number of scan cycles to execute in order to extract all rows from the l
6161

6262
Indicates whether the capture job is to run continuously (`1`), or run only once (`0`). *@continuous* is **bit**, with a default of `NULL`, which indicates no change for this parameter.
6363

64-
- When *@continuous* is `1`, the [sp_cdc_scan](sys-sp-cdc-scan-transact-sql.md) job scans the log and processes up to (`@maxtrans * @maxscans`) transactions. It then waits the number of seconds specified in *@pollinginterval* before beginning the next log scan.
64+
- When *@continuous* is `1`, the [sys.sp_cdc_scan](sys-sp-cdc-scan-transact-sql.md) job scans the log and processes up to (`@maxtrans * @maxscans`) transactions. It then waits the number of seconds specified in *@pollinginterval* before beginning the next log scan.
6565

6666
- When *@continuous* is `0`, the `sp_cdc_scan` job executes up to *@maxscans* scans of the log, processing up to *@maxtrans* transactions during each scan, and then exits.
6767

6868
- If *@continuous* is changed from `1` to `0`, *@pollinginterval* is automatically set to `0`. A value specified for *@pollinginterval* other than `0` is ignored.
6969

70-
- If *@continuous* is omitted or explicitly set to NULL and *@pollinginterval* is explicitly set to a value greater than `0`, *@continuous* is automatically set to `1`.
70+
- If *@continuous* is omitted or explicitly set to `NULL` and *@pollinginterval* is explicitly set to a value greater than `0`, *@continuous* is automatically set to `1`.
7171

7272
*@continuous* is valid only for capture jobs.
7373

@@ -97,11 +97,11 @@ None.
9797

9898
## Remarks
9999

100-
If a parameter is omitted, the associated value in the [dbo.cdc_jobs](../system-tables/dbo-cdc-jobs-transact-sql.md) table isn't updated. A parameter set explicitly to NULL is treated as though the parameter is omitted.
100+
If a parameter is omitted, the associated value in the [dbo.cdc_jobs](../system-tables/dbo-cdc-jobs-transact-sql.md) table isn't updated. A parameter set explicitly to `NULL` is treated as though the parameter is omitted.
101101

102102
Specifying a parameter that is invalid for the job type causes the statement to fail.
103103

104-
Changes to a job don't take effect until the job is stopped by using [sp_cdc_stop_job](sys-sp-cdc-stop-job-transact-sql.md) and restarted by using [sp_cdc_start_job](sys-sp-cdc-start-job-transact-sql.md).
104+
Changes to a job don't take effect until the job is stopped by using [sys.sp_cdc_stop_job](sys-sp-cdc-stop-job-transact-sql.md) and restarted by using [sys.sp_cdc_start_job](sys-sp-cdc-start-job-transact-sql.md).
105105

106106
## Permissions
107107

docs/relational-databases/system-stored-procedures/sys-sp-cdc-drop-job-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Removes a change data capture cleanup or capture job for the curre
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 06/13/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -37,7 +37,7 @@ sys.sp_cdc_drop_job [ [ @job_type = ] N'job_type' ]
3737

3838
#### [ @job_type = ] N'*job_type*'
3939

40-
Type of job to remove. *job_type* is **nvarchar(20)** and can't be NULL. Valid inputs are `capture` and `cleanup`.
40+
Type of job to remove. *job_type* is **nvarchar(20)** and can't be `NULL`. Valid inputs are `capture` and `cleanup`.
4141

4242
## Return code values
4343

0 commit comments

Comments
 (0)