Skip to content

Commit 618a5e2

Browse files
authored
Merge pull request #31640 from rwestMSFT/rw-0122-system-stored-procedures-0000
Latest bulk changes for system stored procedures
2 parents 123895f + 5d174df commit 618a5e2

99 files changed

Lines changed: 648 additions & 649 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/change-data-capture-stored-procedures-transact-sql.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Change Data Capture 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"
@@ -22,38 +22,38 @@ Change data capture makes available in a convenient relational format the histor
2222

2323
:::row:::
2424
:::column:::
25-
[sys.sp_cdc_add_job (Transact-SQL)](sys-sp-cdc-add-job-transact-sql.md)
25+
[sys.sp_cdc_add_job](sys-sp-cdc-add-job-transact-sql.md)
2626

27-
[sys.sp_cdc_change_job (Transact-SQL)](sys-sp-cdc-change-job-transact-sql.md)
27+
[sys.sp_cdc_change_job](sys-sp-cdc-change-job-transact-sql.md)
2828

29-
[sys.sp_cdc_cleanup_change_table (Transact-SQL)](sys-sp-cdc-cleanup-change-table-transact-sql.md)
29+
[sys.sp_cdc_cleanup_change_table](sys-sp-cdc-cleanup-change-table-transact-sql.md)
3030

31-
[sys.sp_cdc_disable_db (Transact-SQL)](sys-sp-cdc-disable-db-transact-sql.md)
31+
[sys.sp_cdc_disable_db](sys-sp-cdc-disable-db-transact-sql.md)
3232

33-
[sys.sp_cdc_disable_table (Transact-SQL)](sys-sp-cdc-disable-table-transact-sql.md)
33+
[sys.sp_cdc_disable_table](sys-sp-cdc-disable-table-transact-sql.md)
3434

35-
[sys.sp_cdc_drop_job (Transact-SQL)](sys-sp-cdc-drop-job-transact-sql.md)
35+
[sys.sp_cdc_drop_job](sys-sp-cdc-drop-job-transact-sql.md)
3636

37-
[sys.sp_cdc_enable_db (Transact-SQL)](sys-sp-cdc-enable-db-transact-sql.md)
37+
[sys.sp_cdc_enable_db](sys-sp-cdc-enable-db-transact-sql.md)
3838

39-
[sys.sp_cdc_enable_table (Transact-SQL)](sys-sp-cdc-enable-table-transact-sql.md)
39+
[sys.sp_cdc_enable_table](sys-sp-cdc-enable-table-transact-sql.md)
4040
:::column-end:::
4141
:::column:::
42-
[sys.sp_cdc_generate_wrapper_function (Transact-SQL)](sys-sp-cdc-generate-wrapper-function-transact-sql.md)
42+
[sys.sp_cdc_generate_wrapper_function](sys-sp-cdc-generate-wrapper-function-transact-sql.md)
4343

44-
[sys.sp_cdc_get_captured_columns (Transact-SQL)](sys-sp-cdc-get-captured-columns-transact-sql.md)
44+
[sys.sp_cdc_get_captured_columns](sys-sp-cdc-get-captured-columns-transact-sql.md)
4545

46-
[sys.sp_cdc_get_ddl_history (Transact-SQL)](sys-sp-cdc-get-ddl-history-transact-sql.md)
46+
[sys.sp_cdc_get_ddl_history](sys-sp-cdc-get-ddl-history-transact-sql.md)
4747

48-
[sys.sp_cdc_help_change_data_capture (Transact-SQL)](sys-sp-cdc-help-change-data-capture-transact-sql.md)
48+
[sys.sp_cdc_help_change_data_capture](sys-sp-cdc-help-change-data-capture-transact-sql.md)
4949

50-
[sys.sp_cdc_help_jobs (Transact-SQL)](sys-sp-cdc-help-jobs-transact-sql.md)
50+
[sys.sp_cdc_help_jobs](sys-sp-cdc-help-jobs-transact-sql.md)
5151

52-
[sys.sp_cdc_scan (Transact-SQL)](sys-sp-cdc-scan-transact-sql.md)
52+
[sys.sp_cdc_scan](sys-sp-cdc-scan-transact-sql.md)
5353

54-
[sys.sp_cdc_start_job (Transact-SQL)](sys-sp-cdc-start-job-transact-sql.md)
54+
[sys.sp_cdc_start_job](sys-sp-cdc-start-job-transact-sql.md)
5555

56-
[sys.sp_cdc_stop_job (Transact-SQL)](sys-sp-cdc-stop-job-transact-sql.md)
56+
[sys.sp_cdc_stop_job](sys-sp-cdc-stop-job-transact-sql.md)
5757
:::column-end:::
5858
:::row-end:::
5959

docs/relational-databases/system-stored-procedures/change-tracking-stored-procedures-transact-sql.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Change Tracking stored procedures (Transact-SQL)"
44
author: JetterMcTedder
55
ms.author: bspendolini
66
ms.reviewer: randolphwest
7-
ms.date: 05/24/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -18,7 +18,7 @@ dev_langs:
1818

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

21-
Change Tracking is a lightweight solution that provides an efficient data change tracking mechanism for applications, ETL processes, event capture, and auditing. This allows for quick and simple detection of changed data without the need for expensive and complex custom solutions traditionally involving a combination of triggers, timestamp columns, new tables to store tracking information, and cleanup processes.
21+
Change Tracking is a lightweight solution that provides an efficient data change tracking mechanism for applications, ETL processes, event capture, and auditing. This allows for quick and basic detection of changed data without the need for expensive and complex custom solutions traditionally involving a combination of triggers, timestamp columns, new tables to store tracking information, and cleanup processes.
2222

2323
## Stored procedures
2424

@@ -28,7 +28,7 @@ Change Tracking is a lightweight solution that provides an efficient data change
2828

2929
## Related content
3030

31-
- [About Change Tracking (Transact-SQL)](../track-changes/about-change-tracking-sql-server.md)
32-
- [Change Tracking Cleanup and Troubleshooting (Transact-SQL)](../track-changes/cleanup-and-troubleshoot-change-tracking-sql-server.md)
31+
- [About Change Tracking (SQL Server)](../track-changes/about-change-tracking-sql-server.md)
32+
- [Troubleshoot change tracking auto cleanup issues](../track-changes/cleanup-and-troubleshoot-change-tracking-sql-server.md)
3333
- [Change Tracking Functions (Transact-SQL)](../system-functions/change-tracking-functions-transact-sql.md)
34-
- [Change Tracking System Tables (Transact-SQL)](../system-tables/change-tracking-tables-transact-sql.md)
34+
- [Change Tracking tables (Transact-SQL)](../system-tables/change-tracking-tables-transact-sql.md)

docs/relational-databases/system-stored-procedures/core-sp-add-collector-type-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Adds a new entry to the core.supported_collector_types view in the
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -73,5 +73,5 @@ EXECUTE @RC = core.sp_add_collector_type @collector_type_uid;
7373
## Related content
7474

7575
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
76-
- [Data Collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
77-
- [Management Data Warehouse](../data-collection/management-data-warehouse.md)
76+
- [Data collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
77+
- [Management data warehouse](../data-collection/management-data-warehouse.md)

docs/relational-databases/system-stored-procedures/core-sp-create-snapshot-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Inserts a row in the management data warehouse core.snapshots view
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -104,5 +104,5 @@ EXEC core.sp_create_snapshot
104104
## Related content
105105

106106
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
107-
- [Data Collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
108-
- [Management Data Warehouse](../data-collection/management-data-warehouse.md)
107+
- [Data collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
108+
- [Management data warehouse](../data-collection/management-data-warehouse.md)

docs/relational-databases/system-stored-procedures/core-sp-purge-data-transact-sql.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Removes data from the management data warehouse based on a retenti
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -23,7 +23,7 @@ dev_langs:
2323

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

26-
Removes data from the management data warehouse based on a retention policy. This procedure is executed daily by the mdw_purge_data [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Agent job against the management data warehouse associated with the specified instance. You can use this stored procedure to perform an on-demand removal of data from the management data warehouse.
26+
Removes data from the management data warehouse based on a retention policy. This procedure is executed daily by the `mdw_purge_data` [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] Agent job against the management data warehouse associated with the specified instance. You can use this stored procedure to perform an on-demand removal of data from the management data warehouse.
2727

2828
:::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)
2929

@@ -42,21 +42,21 @@ core.sp_purge_data
4242

4343
#### [ @retention_days = ] *retention_days*
4444

45-
The number of days to retain data in the management data warehouse tables. Data with a time stamp older than *@retention_days* is removed. *@retention_days* is **smallint**, with a default of `NULL`. If specified, the value must be positive. When NULL, the value in the valid_through column in the `core.snapshots` view determines the rows that are eligible for removal.
45+
The number of days to retain data in the management data warehouse tables. Data with a time stamp older than *@retention_days* is removed. *@retention_days* is **smallint**, with a default of `NULL`. If specified, the value must be positive. When `NULL`, the value in the valid_through column in the `core.snapshots` view determines the rows that are eligible for removal.
4646

4747
#### [ @instance_name = ] '*instance_name*'
4848

4949
The name of the instance for the collection set. *@instance_name* is **sysname**, with a default of `NULL`.
5050

51-
*instance_name* must be the fully qualified instance name, which consists of the computer name and the instance name in the form *computername*\\*instancename*. When NULL, the default instance on the local server is used.
51+
*instance_name* must be the fully qualified instance name, which consists of the computer name and the instance name in the form `<computername>\<instancename>`. When `NULL`, the default instance on the local server is used.
5252

5353
#### [ @collection_set_uid = ] '*collection_set_uid*'
5454

55-
The GUID for the collection set. *@collection_set_uid* is **uniqueidentifier**, with a default of `NULL`. When NULL, qualifying rows from all collection sets are removed. To obtain this value, query the `syscollector_collection_sets` catalog view.
55+
The GUID for the collection set. *@collection_set_uid* is **uniqueidentifier**, with a default of `NULL`. When `NULL`, qualifying rows from all collection sets are removed. To obtain this value, query the `syscollector_collection_sets` catalog view.
5656

5757
#### [ @duration = ] *duration*
5858

59-
The maximum number of minutes the purge operation should run. *@duration* is **smallint**, with a default of `NULL`. If specified, the value must be zero or a positive integer. When NULL, the operation runs until all qualified rows are removed or the operation is manually stopped.
59+
The maximum number of minutes the purge operation should run. *@duration* is **smallint**, with a default of `NULL`. If specified, the value must be zero or a positive integer. When `NULL`, the operation runs until all qualified rows are removed or the operation is manually stopped.
6060

6161
## Return code values
6262

@@ -78,7 +78,7 @@ Requires membership in the **mdw_admin** (with EXECUTE permission) fixed databas
7878

7979
### A. Run sp_purge_data with no parameters
8080

81-
The following example executes `core.sp_purge_data` without specifying any parameters. Therefore, the default value of NULL is used for all parameters, with the associated behavior.
81+
The following example executes `core.sp_purge_data` without specifying any parameters. Therefore, the default value of `NULL` is used for all parameters, with the associated behavior.
8282

8383
```sql
8484
USE <management_data_warehouse>;
@@ -98,7 +98,7 @@ GO
9898

9999
### C. Specify an instance name and collection set
100100

101-
The following example removes data from the management data warehouse for a given collection set on the specified instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)]. Because @retention_days is not specified, the value in the valid_through column in the `core.snapshots` view is used to determine the rows for the collection set that are eligible for removal.
101+
The following example removes data from the management data warehouse for a given collection set on the specified instance of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)]. Because *@retention_days* isn't specified, the value in the `valid_through` column in the `core.snapshots` view is used to determine the rows for the collection set that are eligible for removal.
102102

103103
```sql
104104
USE <management_data_warehouse>;
@@ -114,4 +114,4 @@ GO
114114
## Related content
115115

116116
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
117-
- [Data Collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
117+
- [Data collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)

docs/relational-databases/system-stored-procedures/core-sp-remove-collector-type-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Removes an entry from the core.supported_collector_types view in t
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -73,5 +73,5 @@ EXECUTE @RC = core.sp_remove_collector_type @collector_type_uid;
7373
## Related content
7474

7575
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
76-
- [Data Collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
77-
- [Management Data Warehouse](../data-collection/management-data-warehouse.md)
76+
- [Data collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
77+
- [Management data warehouse](../data-collection/management-data-warehouse.md)

docs/relational-databases/system-stored-procedures/core-sp-update-data-source-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Updates an existing row or inserts a new row in the management dat
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/31/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -97,5 +97,5 @@ EXEC core.sp_update_data_source @collection_set_uid = '7B191952-8ECF-4E12-AEB2-E
9797
## Related content
9898

9999
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
100-
- [Data Collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
101-
- [Management Data Warehouse](../data-collection/management-data-warehouse.md)
100+
- [Data collector stored procedures (Transact-SQL)](data-collector-stored-procedures-transact-sql.md)
101+
- [Management data warehouse](../data-collection/management-data-warehouse.md)

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Data collector 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/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -22,7 +22,7 @@ dev_langs:
2222
SQL Server supports the following system stored procedures that are used to work with the data collector and the following components: collection sets, collection items, and collection types.
2323

2424
> [!IMPORTANT]
25-
> Unlike regular stored procedures, the parameters for data collector stored procedures 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.
25+
> Unlike regular stored procedures, the parameters for data collector stored procedures are strictly typed and don't support automatic data type conversion. If these parameters aren't called with the correct input parameter data types, as specified in the argument description, the stored procedure returns an error.
2626
2727
:::row:::
2828
:::column:::
@@ -71,16 +71,16 @@ SQL Server supports the following system stored procedures that are used to work
7171

7272
The following stored procedures are for internal use only:
7373

74-
- sp_syscollector_get_warehouse_connection_string
75-
- sp_syscollector_set_warehouse_connection_password
76-
- sp_syscollector_set_warehouse_connection_user
77-
- sp_syscollector_event_oncollectionbegin
78-
- sp_syscollector_event_oncollectionend
79-
- sp_syscollector_event_onpackagebegin
80-
- sp_syscollector_event_onpackageend
81-
- sp_syscollector_event_onpackageupdate
82-
- sp_syscollector_event_onerror
83-
- sp_syscollector_event_onstatsupdate
74+
- `sp_syscollector_get_warehouse_connection_string`
75+
- `sp_syscollector_set_warehouse_connection_password`
76+
- `sp_syscollector_set_warehouse_connection_user`
77+
- `sp_syscollector_event_oncollectionbegin`
78+
- `sp_syscollector_event_oncollectionend`
79+
- `sp_syscollector_event_onpackagebegin`
80+
- `sp_syscollector_event_onpackageend`
81+
- `sp_syscollector_event_onpackageupdate`
82+
- `sp_syscollector_event_onerror`
83+
- `sp_syscollector_event_onstatsupdate`
8484

8585
## Related content
8686

docs/relational-databases/system-stored-procedures/database-maintenance-plan-stored-procedures-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Database Maintenance Plan stored procedures (Transact-SQL)"
44
author: MashaMSFT
55
ms.author: mathoma
66
ms.reviewer: randolphwest
7-
ms.date: 05/24/2023
7+
ms.date: 08/21/2024
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -19,7 +19,7 @@ dev_langs:
1919

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

22-
[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] supports the following system stored procedures that are used to set up maintenance tasks. These stored procedures are used with database maintenance plans. This feature has been replaced with maintenance plans which do not use these stored procedures. Use these procedures to maintain database maintenance plans on installations that were upgraded from a previous version of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)].
22+
[!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)] supports the following system stored procedures that are used to set up maintenance tasks. These stored procedures are used with database maintenance plans. This feature has been replaced with maintenance plans which don't use these stored procedures. Use these procedures to maintain database maintenance plans on installations that were upgraded from a previous version of [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)].
2323

2424
[!INCLUDE [ssNoteDepFutureAvoid](../../includes/ssnotedepfutureavoid-md.md)]
2525

@@ -35,4 +35,4 @@ dev_langs:
3535
## Related content
3636

3737
- [System stored procedures (Transact-SQL)](system-stored-procedures-transact-sql.md)
38-
- [Maintenance Plans](../maintenance-plans/maintenance-plans.md)
38+
- [Maintenance plans](../maintenance-plans/maintenance-plans.md)

docs/relational-databases/system-stored-procedures/distributed-queries-stored-procedures-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Distributed Queries 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"
@@ -34,7 +34,7 @@ dev_langs:
3434

3535
[sp_droplinkedsrvlogin](sp-droplinkedsrvlogin-transact-sql.md)
3636

37-
[sp_dropserver (Transact-SQL)](sp-dropserver-transact-sql.md)
37+
[sp_dropserver](sp-dropserver-transact-sql.md)
3838

3939
[sp_foreignkeys](sp-foreignkeys-transact-sql.md)
4040
:::column-end:::
@@ -51,7 +51,7 @@ dev_langs:
5151

5252
[sp_tables_ex](sp-tables-ex-transact-sql.md)
5353

54-
[sp_testlinkedserver (Transact-SQL)](sp-testlinkedserver-transact-sql.md)
54+
[sp_testlinkedserver](sp-testlinkedserver-transact-sql.md)
5555
:::column-end:::
5656
:::row-end:::
5757

0 commit comments

Comments
 (0)