diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0ee0665..c3169df 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,10 +10,17 @@ assignees: '' **Version of the script** Look in the stored procedure, and it'll have a version date & number near the top. Put that in here. If it's not the current version (dated in the last month), then upgrade to the current version and test that before reporting a bug - we fix a lot of stuff in each new build. We'll flat out close bug reports for older builds. + +**What is the Check Id?** + + **What is the current behavior?** + **If the current behavior is a bug, please provide the steps to reproduce.** + **What is the expected behavior?** + **Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 3645a11..893ad7f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -10,11 +10,14 @@ assignees: '' **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + **Describe the solution you'd like** A clear and concise description of what you want to happen. + **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. + **Are you ready to build the code for the feature?** As much as we'd love to build everything that everyone wants for free, we need your help. Open source is built with your help and code. Are you ready to commit time to this project? Have you got existing code you can help contribute to solve the problem? diff --git a/Images/repository-open-graph.png b/Images/sp_Develop - Emergent Software - SQL Server Assess - GitHub Open Graph.png similarity index 100% rename from Images/repository-open-graph.png rename to Images/sp_Develop - Emergent Software - SQL Server Assess - GitHub Open Graph.png diff --git a/Images/sp_Develop - Emergent Software - SQL Server Assess - LinkedIn Profile Background.png b/Images/sp_Develop - Emergent Software - SQL Server Assess - LinkedIn Profile Background.png new file mode 100644 index 0000000..14eecdb Binary files /dev/null and b/Images/sp_Develop - Emergent Software - SQL Server Assess - LinkedIn Profile Background.png differ diff --git a/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Profile Banner.png b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Profile Banner.png new file mode 100644 index 0000000..033440a Binary files /dev/null and b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Profile Banner.png differ diff --git a/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Video Player Banner Offline.png b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Video Player Banner Offline.png new file mode 100644 index 0000000..e4ada59 Binary files /dev/null and b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitch Video Player Banner Offline.png differ diff --git a/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitter Header.png b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitter Header.png new file mode 100644 index 0000000..ef6b07e Binary files /dev/null and b/Images/sp_Develop - Emergent Software - SQL Server Assess - Twitter Header.png differ diff --git a/README.md b/README.md index 2e21ced..3fc96f7 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ # SQL Server Assess Overview -The SQL Server Assess project contains the sp_Develop stored procedure. It can be used by database developers, software developers and for performing database code (smell) reviews. +The SQL Server Assess project contains the [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) stored procedure. It can be used by database developers, software developers and for performing database code (smell) reviews. This lists the database development best practice checks and naming conventions checks for the stored procedure named sp_Develop. ## Install Instructions -It is recommend installing this stored procedures in the master database for full SQL Servers, but if you want to use another one, that's totally fine. +It is recommend installing the [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) stored procedures in the master database for full SQL Servers, but if you want to use another one, that's totally fine. -On Azure SQL Server you will need to install this stored procedure in the user database. +On Azure SQL Server you will need to install the sp_Develop stored procedure in the user database. ## Usage Instructions -After installing the stored procedure open SSMS and run in the database you wish to check for database development best practices. +After installing the [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) stored procedure open SSMS and run in the database you wish to check for database development best practices. ```sql EXECUTE dbo.sp_Develop @@ -390,7 +390,7 @@ Although the MONEY data type generally takes less storage and takes less bandwid 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! -**Future columns to check:** +**Column names to check:** - FirstName - MiddleName - LastName @@ -651,7 +651,7 @@ It is common to need a database to operate under different names. ## Using @@IDENTITY Instead of SCOPE_IDENTITY **Check Id:** [NONE YET] -The generation of an IDENTITY value is not transactional, so in some circumstances, @@IDENTITY returns the wrong value and not the value from the row you just inserted. This is especially true when using triggers that insert data, depending on when the triggers fire. The SCOPE_IDENTITY function is safer because it always relates to the current batch (within the same scope). Also consider using the IDENT_CURRENT function, which returns the last IDENTITY value regardless of session or scope. The OUTPUT clause is a better and safer way of capturing identity values. +The generation of an identity value is not transactional, so in some circumstances, ```@@IDENTITY``` returns the wrong value and not the value from the row you just inserted. This is especially true when using triggers that insert data, depending on when the triggers fire. The ```SCOPE_IDENTITY``` function is safer because it always relates to the current batch (within the same scope). Also consider using the ```IDENT_CURRENT``` function, which returns the last identity value regardless of session or scope. The OUTPUT clause is a better and safer way of capturing identity values. ## Using BETWEEN for DATETIME Ranges @@ -723,13 +723,13 @@ Try running EXEC sp_refreshsqlmodule or sp_refreshview. # Running Issues -These are some issues you might run into when running sp_Develop. +These are some issues you might run into when running [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql). ## Some Checks Skipped **Check Id:** 26 -We skipped some checks that are not currently possible, relevant, or practical for the SQL Server sp_Develop is running against. This could be due to the SQL Server version/edition or the database compatibility level. +We skipped some checks that are not currently possible, relevant, or practical for the SQL Server [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) is running against. This could be due to the SQL Server version/edition or the database compatibility level. @@ -748,13 +748,13 @@ There most likely been some new checks and fixes performed within the last 6 mon ## Ran on a Non-Readable Availability Group Secondary Databases **Check Id:** 17 -You are running this on an AG secondary, and some of your databases are configured as non-readable when this is a secondary node. To analyze those databases, run sp_Develop on the primary, or on a readable secondary. +You are running this on an AG secondary, and some of your databases are configured as non-readable when this is a secondary node. To analyze those databases, run [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) on the primary, or on a readable secondary. ## Ran Against 50+ Databases Without @BringThePain = 1 **Check Id:** 18 -Running sp_Develop on a server with 50+ databases may cause temporary insanity for the server and/or user. If you're sure you want to do this, run again with the parameter @BringThePain = 1. +Running [sp_Develop](https://github.com/EmergentSoftware/SQL-Server-Assess/blob/master/sp_Develop.sql) on a server with 50+ databases may cause temporary insanity for the server and/or user. If you're sure you want to do this, run again with the parameter @BringThePain = 1. diff --git a/Test Database/Security/Schemas/Schema_Including_$pecial_Characters_in_Name.sql b/Test Database/Security/Schemas/Schema_Including_$pecial_Characters_in_Name.sql new file mode 100644 index 0000000..e56ec9e --- /dev/null +++ b/Test Database/Security/Schemas/Schema_Including_$pecial_Characters_in_Name.sql @@ -0,0 +1,3 @@ +CREATE SCHEMA [Schema_Including_$pecial_Characters_in_Name] +AUTHORIZATION [dbo] +GO