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
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,21 @@ EXECUTE dbo.sp_Develop
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
28
|@IgnoreCheckIds|Comma-delimited list of check ids you want to skip|
29
29
|@IgnoreDatabases|Comma-delimited list of databases you want to skip|
30
-
|@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.|
30
+
|@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
31
|@OutputType|TABLE = table<br/>COUNT = row with number found<br/>MARKDOWN = bulleted list<br/>XML = table output as XML<br/>NONE = none|
32
32
|@OutputXMLasNVARCHAR|Set to 1 if you like your XML out as NVARCHAR.|
33
33
|@Debug|Default 0. When 1, we print out messages of what we're doing in the messages tab of SSMS. When 2, we print out the dynamic SQL query of the check.|
34
34
|@Version|Output variable to check the version number.|
35
35
|@VersionDate|Output variable to check the version date.|
36
36
|@VersionCheckMode|Will set the version output variables and return without running the stored procedure.|
37
37
38
+
# Test Database Install
39
+
40
+
The 'Test Database' folder contains the RedGate SQL Source Control. Use this test database for testing checks.
41
+
42
+
**RedGate SQL Source Control Documentation**
43
+
-[Getting Started ](https://documentation.red-gate.com/soc7/getting-started)
44
+
-[Link to Git](https://documentation.red-gate.com/soc7/linking-to-source-control/link-to-git)
38
45
39
46
40
47
# Current High Check Id
@@ -142,7 +149,7 @@ FROM
142
149
## Using Plural in Name
143
150
**Check Id:** 1
144
151
145
-
Table and view names should be singular, for example, "Customer" instead of "Customers". This rule is applicable because tables are patterns for storing an entity as a record – they are analogous to Classes serving up class instances. And if for no other reason than readability, you avoid errors due to the pluralization of English nouns in the process of database development. For instance, activity becomes activities, ox becomes oxen, person becomes people or persons, alumnus becomes alumni, while data remains data.
152
+
Table and view names should be singular, for example, "Customer" instead of "Customers". This rule is applicable because tables are patterns for storing an entity as a record – they are analogous to Classes serving up class instances. And if for no other reason than readability, you avoid errors due to the pluralization of English nouns in the process of database development. For instance, activity becomes activities, ox becomes oxen, person becomes people or persons, alumnus becomes alumni, while data remains data.
146
153
147
154
If writing code for an data integration and the source is plural keep the staging/integration tables the same as the source so there is no confusion.
148
155
@@ -305,9 +312,9 @@ Add a clustered index.
305
312
306
313
SQL Server storage is built around the clustered index as a fundamental part of the data storage and retrieval engine. The data itself is stored with the clustered key. All this makes having an appropriate clustered index a vital part of database design. The places where a table without a clustered index is preferable are rare; which is why a missing clustered index is a common code smell in database design.
307
314
308
-
A 'table' without a clustered index is actually a heap, which is a particularly bad idea when its data is usually returned in an aggregated form, or in a sorted order. Paradoxically, though, it can be rather good for implementing a log or a ‘staging’ table used for bulk inserts, since it is read very infrequently, and there is less overhead in writing to it.
315
+
A 'table' without a clustered index is actually a heap, which is a particularly bad idea when its data is usually returned in an aggregated form, or in a sorted order. Paradoxically, though, it can be rather good for implementing a log or a ‘staging’ table used for bulk inserts, since it is read very infrequently, and there is less overhead in writing to it.
309
316
310
-
A table with a non-clustered index, but without a clustered index can sometimes perform well even though the index has to reference individual rows via a Row Identifier rather than a more meaningful clustered index. The arrangement can be effective for a table that isn’t often updated if the table is always accessed by a non-clustered index and there is no good candidate for a clustered index.
317
+
A table with a non-clustered index, but without a clustered index can sometimes perform well even though the index has to reference individual rows via a Row Identifier rather than a more meaningful clustered index. The arrangement can be effective for a table that isn’t often updated if the table is always accessed by a non-clustered index and there is no good candidate for a clustered index.
311
318
312
319
Heaps have performance issues like table scans, forward fetches.
313
320
@@ -366,7 +373,7 @@ Although the MONEY data type generally takes less storage and takes less bandwid
366
373
## Using VARCHAR Instead of NVARCHAR for Unicode Data
367
374
**Check Id:**[NONE YET]
368
375
369
-
You can't require everyone to stop using national characters or accents any more. Names are likely to have accents in them if spelled properly, and international addresses and language strings will almost certainly have accents and national characters that can’t be represented by 8-bit ASCII!
376
+
You can't require everyone to stop using national characters or accents any more. Names are likely to have accents in them if spelled properly, and international addresses and language strings will almost certainly have accents and national characters that can’t be represented by 8-bit ASCII!
370
377
371
378
**Future columns to check:**
372
379
- FirstName
@@ -519,7 +526,7 @@ Only use NOLOCK when the application stakeholders understand the problems and ap
519
526
## Not Using Table Alias
520
527
**Check Id:**[NONE YET]
521
528
522
-
Use aliases for your table names in most T-SQL statements; a useful convention is to make the alias out of the first or first two letters of each capitalized table name, e.g. “Site” becomes "S" and "SiteType" becomes “ST”.
529
+
Use aliases for your table names in most T-SQL statements; a useful convention is to make the alias out of the first or first two letters of each capitalized table name, e.g. “Site” becomes "S" and "SiteType" becomes “ST”.
0 commit comments