You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-4Lines changed: 62 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,10 @@ EXECUTE dbo.sp_Develop
25
25
|--|--|
26
26
|@DatabaseName|Defaults to current DB if not specified|
27
27
|@GetAllDatabases|Runs checks across all of the databases on the server instead of just your current database context. Does not work on Azure SQL Server.|
28
-
|@IgnoreCheckIds|Comma-delimited list of check ids you want to skip|
29
-
|@IgnoreDatabases|Comma-delimited list of databases you want to skip|
28
+
|@SkipChecksServer|The linked server name that stores the skip checks|
29
+
|@SkipChecksDatabase|The database that stores the skip checks|
30
+
|@SkipChecksSchema|The schema for the skip check table|
31
+
|@SkipChecksTable|The table that stores the skip checks|
30
32
|@BringThePain|If you’ve got more than 50 databases on the server, this only works if you also pass in @BringThePain = 1, because it’s gonna be slow.|
31
33
|@OutputType|TABLE = table<br/>COUNT = row with number found<br/>MARKDOWN = bulleted list<br/>XML = table output as XML<br/>NONE = none|
32
34
|@OutputXMLasNVARCHAR|Set to 1 if you like your XML out as NVARCHAR.|
@@ -37,9 +39,65 @@ EXECUTE dbo.sp_Develop
37
39
38
40
## How to Skip Checks Across Your Estate
39
41
40
-
Sometimes there are checks, databases or servers that you want to skip. For example, say a database is from a vendor and you are not responsible for the database development. Another use case for skipping checks is indicate that you have acknowledged a potential issue and you are OK with it. You can skip that check for that specific object.
42
+
Sometimes there are checks, databases or servers that you want to skip. For example, say a database is from a vendor and you are not responsible for the database development.
41
43
42
-
To do that, create a table to hold the list of checks you want to skip, and put rows into it:
44
+
Another use case for skipping checks is to indicate that you have acknowledged a potential issue and you are OK with it. You can skip that check for that specific object. Using sp_Develop with this pattern allows you to perform your database development and iteratively check for issues.
45
+
46
+
#### Create a table to hold the list of checks you want to skip
The CheckId column refers to the list below. You can also scroll to the right in the sp_Develop 'Results' tab and look at the 'CheckId' column to see the number of the one you want to skip.
64
+
65
+
You can also copy the TSQL script in the 'SkipCheckTSQL' column found in the 'Results' tab to insert that record into your skip checks table.
66
+
67
+
Refer to the example checks below and each comment for its use.
(N'SQL2008', NULL, NULL, NULL, NULL) /* Skips all checks, for every database, on the SQL2008 SQL Server */
74
+
,(N'SQL2012', N'AdventureWorks2012', NULL, NULL, NULL) /* Skips all checks, in the AdventureWorks2012 database, on the SQL2012 SQL Server */
75
+
,(N'SQL2017', N'AdventureWorks2017', N'dbo', N'fn_TPSTotal', NULL)/* Skips all checks, for the object named dbo.fn_TPSTotal, in the AdventureWorks2017 database, on the SQL2017 SQL Server */
76
+
,(N'SQL2019', N'Northwind', N'dbo', N'Order Details', 5) /* Skips CheckId 5 (Including Special Characters in Name), for the object named dbo.[Order Details], in the Northwind database, on the SQL2019 SQL Server*/
77
+
,(NULL, N'AdventureWorks2017', NULL, NULL, NULL) /* Skips all checks, in the AdventureWorks2017 database, on every SQL Server */
78
+
,(NULL, NULL, N'dbo', N'vPhone', NULL) /* Skips all checks, for the object named dbo.vPhone, in every database, on every SQL Server */
79
+
,(NULL, NULL, N'dbo', N'CustOrderHist', 19); /* Skips CheckId 19 (Not Using SET NOCOUNT ON in Stored Procedure or Trigger), for the object named dbo.CustOrderHist, in every database, on every SQL Server */
80
+
GO
81
+
```
82
+
83
+
#### How to Execute the Skip Checks
84
+
85
+
```sql
86
+
EXEC dbo.sp_Develop
87
+
,@SkipCheckDatabase = N'pubs'
88
+
,@SkipCheckSchema = N'dbo'
89
+
,@SkipCheckTable = N'DevelopCheckToSkip';
90
+
```
91
+
92
+
You can also centralize this skip checks table by putting it in a central location, setting up a linked server pointing to your central location, and then using the @SkipChecksServer parameter:
0 commit comments