Skip to content

Commit 10bb9de

Browse files
authored
Merge pull request #15262 from MightyPen/synsql-16c
Fix numerous Suggestion mesgs about metadata. (60 remain.)
2 parents cd529f2 + 977eacb commit 10bb9de

18 files changed

Lines changed: 111 additions & 108 deletions

docs/database-engine/availability-groups/windows/enhanced-database-failover.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
title: "Enhanced failover for an availability group"
33
description: "Steps to enable enhanced database failover, which triggers a failover if a database in an Always On availability group is no longer able to write transactions."
44
ms.custom: "seodec18"
5-
ms.date: "09/25/2017"
5+
ms.date: 06/03/2020
66
ms.prod: sql
7-
ms.reviewer: ""
87
ms.technology: high-availability
98
ms.topic: conceptual
109
helpviewer_keywords:

docs/relational-databases/data-collection/add-a-collection-item-to-a-collection-set-transact-sql.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Add Collection Item to Collection Set (T-SQL)"
3-
ms.custom: ""
4-
ms.date: "03/07/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -25,13 +24,15 @@ ms.custom: "seo-lt-2019"
2524
1. Stop the collection set that you want to add the item to by running the **sp_syscollector_stop_collection_set** stored procedure. For example, to stop a collection set that is named "Test Collection Set", run the following statements:
2625

2726
```sql
28-
USE msdb
29-
DECLARE @csid int
27+
USE msdb;
28+
DECLARE @csid int;
29+
3030
SELECT @csid = collection_set_id
31-
FROM syscollector_collection_sets
32-
WHERE name = 'Test Collection Set'
33-
SELECT @csid
34-
EXEC dbo.sp_syscollector_stop_collection_set @collection_set_id = @csid
31+
FROM syscollector_collection_sets
32+
WHERE name = 'Test Collection Set';
33+
34+
SELECT @csid;
35+
EXEC dbo.sp_syscollector_stop_collection_set @collection_set_id = @csid;
3536
```
3637

3738
> [!NOTE]
@@ -40,53 +41,60 @@ ms.custom: "seo-lt-2019"
4041
2. Declare the collection set that you want to add the collection item to. The following code provides an example of how to declare the collection set ID.
4142

4243
```sql
43-
DECLARE @collection_set_id_1 int
44-
SELECT @collection_set_id_1 = collection_set_id FROM [msdb].[dbo].[syscollector_collection_sets]
45-
WHERE name = N'Test Collection Set'; -- name of collection set
44+
DECLARE @collection_set_id_1 int;
45+
46+
SELECT @collection_set_id_1 = collection_set_id
47+
FROM [msdb].[dbo].[syscollector_collection_sets]
48+
WHERE name = N'Test Collection Set'; -- name of collection set
4649
```
4750

4851
3. Declare the collector type. The following code provides an example of how to declare the Generic T-SQL Query collector type.
4952

5053
```sql
51-
DECLARE @collector_type_uid_1 uniqueidentifier
52-
SELECT @collector_type_uid_1 = collector_type_uid FROM [msdb].[dbo].[syscollector_collector_types]
54+
DECLARE @collector_type_uid_1 uniqueidentifier;
55+
56+
SELECT @collector_type_uid_1 = collector_type_uid
57+
FROM [msdb].[dbo].[syscollector_collector_types]
5358
WHERE name = N'Generic T-SQL Query Collector Type';
5459
```
5560

5661
You can run the following code to obtain a list of the installed collector types:
5762

5863
```sql
59-
USE msdb
60-
SELECT * from syscollector_collector_types
64+
USE msdb;
65+
SELECT * from syscollector_collector_types;
6166
GO
6267
```
6368

6469
4. Run the **sp_syscollector_create_collection_item** stored procedure to create the collection item. You must declare the schema for the collection item so that it maps to the required schema for the desired collector type. The following example uses the Generic T-SQL Query input schema.
6570

6671
```sql
6772
DECLARE @collection_item_id int;
73+
6874
EXEC [msdb].[dbo].[sp_syscollector_create_collection_item]
69-
@name=N'OS Wait Stats', --name of collection item
70-
@parameters=N'
71-
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
72-
<Query>
73-
<Value>select * from sys.dm_os_wait_stats</Value>
74-
<OutputTable>os_wait_stats</OutputTable>
75-
</Query>
76-
</ns:TSQLQueryCollector>',
77-
@collection_item_id = @collection_item_id OUTPUT,
78-
@frequency = 60,
79-
@collection_set_id = @collection_set_id_1, --- Provides the collection set ID number
80-
@collector_type_uid = @collector_type_uid_1 -- Provides the collector type UID
81-
SELECT @collection_item_id
75+
@name=N'OS Wait Stats', --name of collection item
76+
@parameters=N'
77+
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
78+
<Query>
79+
<Value>select * from sys.dm_os_wait_stats</Value>
80+
<OutputTable>os_wait_stats</OutputTable>
81+
</Query>
82+
</ns:TSQLQueryCollector>',
83+
@collection_item_id = @collection_item_id OUTPUT,
84+
@frequency = 60,
85+
@collection_set_id = @collection_set_id_1, --- Provides the collection set ID number
86+
@collector_type_uid = @collector_type_uid_1; -- Provides the collector type UID
87+
88+
SELECT @collection_item_id;
8289
```
8390

8491
5. Before starting the updated collection set, run the following query to verify that the new collection item has been created:
8592

86-
```xaml
87-
USE msdb
88-
SELECT * from syscollector_collection_sets
89-
SELECT * from syscollector_collection_items
93+
```sql
94+
USE msdb;
95+
GO
96+
SELECT * from syscollector_collection_sets;
97+
SELECT * from syscollector_collection_items;
9098
GO
9199
```
92100

docs/relational-databases/data-collection/configure-data-collection-parameters-transact-sql.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Configure Data Collection Parameters (T-SQL)"
3-
ms.custom: ""
4-
ms.date: "03/04/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability

docs/relational-databases/data-collection/create-custom-collection-set-generic-t-sql-query-collector-type.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Create Custom Collection Set - Generic T-SQL Query Collector Type"
3-
ms.custom: ""
4-
ms.date: "03/07/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -33,10 +32,12 @@ ms.custom: "seo-lt-2019"
3332

3433
1. Define a new collection set using the sp_syscollector_create_collection_set stored procedure.
3534

36-
```
35+
```sql
3736
USE msdb;
37+
GO
3838
DECLARE @collection_set_id int;
3939
DECLARE @collection_set_uid uniqueidentifier;
40+
4041
EXEC sp_syscollector_create_collection_set
4142
@name=N'DMV Test 1',
4243
@collection_mode=0,
@@ -46,6 +47,7 @@ ms.custom: "seo-lt-2019"
4647
@schedule_name=N'CollectorSchedule_Every_15min',
4748
@collection_set_id=@collection_set_id OUTPUT,
4849
@collection_set_uid=@collection_set_uid OUTPUT;
50+
4951
SELECT @collection_set_id, @collection_set_uid;
5052
```
5153

@@ -75,8 +77,11 @@ ms.custom: "seo-lt-2019"
7577

7678
```sql
7779
DECLARE @collector_type_uid uniqueidentifier;
78-
SELECT @collector_type_uid = collector_type_uid FROM [msdb].[dbo].[syscollector_collector_types]
79-
WHERE name = N'Generic T-SQL Query Collector Type';
80+
81+
SELECT @collector_type_uid = collector_type_uid
82+
FROM [msdb].[dbo].[syscollector_collector_types]
83+
WHERE name = N'Generic T-SQL Query Collector Type';
84+
8085
DECLARE @collection_item_id int;
8186
```
8287

@@ -96,6 +101,7 @@ ms.custom: "seo-lt-2019"
96101
@frequency=5,
97102
@collection_set_id=@collection_set_id,
98103
@collector_type_uid=@collector_type_uid;
104+
99105
SELECT @collection_item_id;
100106
```
101107

@@ -105,6 +111,7 @@ ms.custom: "seo-lt-2019"
105111

106112
```sql
107113
USE msdb;
114+
GO
108115
SELECT * FROM syscollector_collection_sets;
109116
SELECT * FROM syscollector_collection_items;
110117
GO
@@ -130,28 +137,32 @@ EXEC dbo.sp_syscollector_create_collection_set
130137
@schedule_name=N'CollectorSchedule_Every_15min',
131138
@collection_set_id = @collection_set_id OUTPUT,
132139
@collection_set_uid = @collection_set_uid OUTPUT;
140+
133141
SELECT @collection_set_id,@collection_set_uid;
134142
135143
DECLARE @collector_type_uid uniqueidentifier;
136-
SELECT @collector_type_uid = collector_type_uid FROM syscollector_collector_types
137-
WHERE name = N'Generic T-SQL Query Collector Type';
144+
145+
SELECT @collector_type_uid = collector_type_uid
146+
FROM syscollector_collector_types
147+
WHERE name = N'Generic T-SQL Query Collector Type';
138148
139149
DECLARE @collection_item_id int;
150+
140151
EXEC sp_syscollector_create_collection_item
141-
@name= N'Query Stats - Test 1',
142-
@parameters=N'
143-
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
144-
<Query>
145-
<Value>select * from sys.dm_exec_query_stats</Value>
146-
<OutputTable>dm_exec_query_stats</OutputTable>
147-
</Query>
148-
</ns:TSQLQueryCollector>',
149-
@collection_item_id = @collection_item_id OUTPUT,
150-
@frequency = 5, -- This parameter is ignored in cached mode
151-
@collection_set_id = @collection_set_id,
152-
@collector_type_uid = @collector_type_uid;
152+
@name= N'Query Stats - Test 1',
153+
@parameters=N'
154+
<ns:TSQLQueryCollector xmlns:ns="DataCollectorType">
155+
<Query>
156+
<Value>select * from sys.dm_exec_query_stats</Value>
157+
<OutputTable>dm_exec_query_stats</OutputTable>
158+
</Query>
159+
</ns:TSQLQueryCollector>',
160+
@collection_item_id = @collection_item_id OUTPUT,
161+
@frequency = 5, -- This parameter is ignored in cached mode
162+
@collection_set_id = @collection_set_id,
163+
@collector_type_uid = @collector_type_uid;
164+
153165
SELECT @collection_item_id;
154-
155166
GO
156167
```
157168

docs/relational-databases/data-collection/use-sql-server-profiler-to-create-a-sql-trace-collection-set.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "Create SQL Trace collection set with Profiler"
3-
ms.custom: ""
4-
ms.date: "03/07/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -108,13 +107,13 @@ ms.custom: "seo-lt-2019"
108107
## Example
109108
The following code sample is the final script resulting from the steps documented in the preceding procedures.
110109

111-
```
110+
```sql
112111
/*************************************************************/
113112
-- SQL Trace collection set generated from SQL Server Profiler
114113
-- Date: 11/19/2007 12:55:31 AM
115114
/*************************************************************/
116115

117-
USE msdb
116+
USE msdb;
118117
GO
119118

120119
BEGIN TRANSACTION
@@ -160,7 +159,9 @@ N'<ns:SqlTraceCollector xmlns:ns"DataCollectorType" use_default="0">
160159

161160
-- Retrieve the collector type GUID for the trace collector type.
162161
DECLARE @collector_type_GUID uniqueidentifier;
163-
SELECT @collector_type_GUID = collector_type_uid FROM [dbo].[syscollector_collector_types] WHERE name = N'Generic SQL Trace Collector Type';
162+
SELECT @collector_type_GUID = collector_type_uid
163+
FROM [dbo].[syscollector_collector_types]
164+
WHERE name = N'Generic SQL Trace Collector Type';
164165

165166
-- Create the trace collection item.
166167
-- ***
@@ -194,7 +195,8 @@ SELECT @ErrorLine = ERROR_LINE(),
194195
@ErrorNumber = ERROR_NUMBER(),
195196
@ErrorMessage = ERROR_MESSAGE(),
196197
@ErrorProcedure = ISNULL(ERROR_PROCEDURE(), '-');
197-
RAISERROR (14684, @ErrorSeverity, 1 , @ErrorNumber, @ErrorSeverity, @ErrorState, @ErrorProcedure, @ErrorLine, @ErrorMessage);
198+
RAISERROR (14684, @ErrorSeverity, 1 , @ErrorNumber,
199+
@ErrorSeverity, @ErrorState, @ErrorProcedure, @ErrorLine, @ErrorMessage);
198200
END CATCH;
199201
GO
200202
```

docs/relational-databases/data-collection/view-collection-set-logs-sql-server-management-studio.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "View collection set logs (SSMS)"
3-
ms.custom: ""
4-
ms.date: "03/01/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability

docs/relational-databases/data-collection/view-or-change-collection-set-schedules-sql-server-management-studio.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "View or change collection set schedules"
3-
ms.custom: ""
4-
ms.date: "03/14/2017"
3+
ms.date: 06/03/2020
54
ms.prod: sql
65
ms.reviewer: ""
76
ms.technology: supportability
@@ -105,10 +104,11 @@ ms.custom: "seo-lt-2019"
105104
**Data collection and upload**
106105
Specifies how data is collected and uploaded to the management data warehouse. Pick one of the following options.
107106

108-
|||
109-
|-|-|
107+
| Option | Description |
108+
| :----- | :---------- |
110109
|**Non-cached. Collection and data upload on the same schedule.**|When selected, specify one of the following:<br /><br /> **Schedule**. Data is collected and uploaded according to a schedule. Click **Pick** to select from a predefined list of schedules, or click **New** to create a new schedule.<br /><br /> **On-demand**. Data is collected and uploaded on demand.|
111110
|**Cached. Collect and cache data at a set of collection frequencies. Upload cached data on a separate schedule.**|Collect and cache data for a specified collection frequency. Upload the collected data on a separate schedule.|
111+
|||
112112

113113
**Collection items**
114114
Displays the collection items in the collection set. The following information is provided for each collection item:
@@ -128,11 +128,12 @@ ms.custom: "seo-lt-2019"
128128
**Set how long collected data will be retained in the management data warehouse.**
129129
Specifies how long collected data is retained. Pick one of the following options.
130130

131-
|||
132-
|-|-|
131+
| Option | Description |
132+
| :----- | :---------- |
133133
|**Retain data for**|This option is selected by default, and the default retention period is 14 days.|
134134
|**Retain data indefinitely**|There is no time limit on the length of time that data is retained.|
135-
135+
|||
136+
136137
**Uploads Page**
137138

138139
Use this page to configure the upload schedule for data that is collected by this collection set.

docs/relational-databases/database-mail/database-mail-general-troubleshooting.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
22
title: "General database mail troubleshooting"
3-
ms.custom: ""
4-
ms.date: "04/22/2019"
3+
ms.date: 06/03/2020
54
ms.prod: sql
6-
ms.prod_service: "database-engine"
75
ms.reviewer: ""
86
ms.technology:
97
ms.topic: conceptual

docs/relational-databases/databases/manage-metadata-when-making-a-database-available-on-another-server.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
22
title: "Manage metadata when making a database available on another server"
3-
ms.custom: ""
4-
ms.date: "08/24/2016"
3+
ms.date: 06/03/2020
54
ms.prod: sql
6-
ms.prod_service: "database-engine"
75
ms.reviewer: ""
86
ms.technology:
97
ms.topic: conceptual
8+
ms.assetid: 5d98cf2a-9fc2-4610-be72-b422b8682681
9+
author: "stevestein"
10+
ms.author: "sstein"
11+
ms.custom: seo-dt-2019
1012
helpviewer_keywords:
1113
- "cross-database queries [SQL Server]"
1214
- "logins [SQL Server], recreating on another server instance"
@@ -31,10 +33,6 @@ helpviewer_keywords:
3133
- "extended stored procedures [SQL Server], metadata"
3234
- "credentials [SQL Server], metadata"
3335
- "copying databases"
34-
ms.assetid: 5d98cf2a-9fc2-4610-be72-b422b8682681
35-
author: "stevestein"
36-
ms.author: "sstein"
37-
ms.custom: seo-dt-2019
3836
---
3937
# Manage Metadata When Making a Database Available on Another Server
4038
[!INCLUDE[appliesto-ss-xxxx-xxxx-xxx-md](../../includes/appliesto-ss-xxxx-xxxx-xxx-md.md)]

0 commit comments

Comments
 (0)