| A community of more than 1,600,000 database professionals and growing |
| | Where's the Unit Testing? I've been a proponent of Unit Testing, especially for databases. I've given presentations on the topic and advocate the use of techniques to verify your code works, especially over time when the complexity grows, new developers change code, and potentially introduce regressions. I'm not the only one as I saw a question recently from Ben Taylor asking where has unit testing gone? I was disappointed that few people have responded to the piece, and I think this is the same response that unit testing in front end application software received a decade or two ago. Few people saw value in testing, preferring to assume developers will code well. Over time, and with some investment, quite a few people have seen the value of unit testing, though I'm not sure it's the majority yet. In building database software, we're still woefully behind, preferring to use ad hoc tests that are subject to human frailty (forgetfulness, making mistakes in running tests or not examining results closely). I do know a few people that are customers of Redgate and use unit testing extensively in their database code. They definitely spend a lot of effort building unit tests, often having more test code than feature code, but they also have very low rates of complaints and bugs from users. I hope that more people having success will publish details on their unit testing successes and failures, and I'd welcome more pieces at SQLServerCentral on either side of the issue. For many people writing in-house applications, especially those installed in one location, perhaps a few bugs aren't a problem. Maybe the impact is low enough that training developers to write tests and making the investment isn't valuable enough. However, for those that have disparate external clients, or maybe install software in many locations, I bet that moving to a more thorough set of repeatable, reliable, non-trivial tests will improve your software quality. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
| The Voice of the DBA Podcast Listen to the MP3 Audio ( 3.2MB) podcast or subscribe to the feed at iTunes and Mevio . The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com. | |
|
|
| ADVERTISEMENT | | Free whitepaper: Solving the database deployment problem with Database Lifecycle Management Learn how to use your source control, CI, and release management tools to make your database development process efficient, safe, and Agile. Start today with this free whitepaper. |
| | How to fix SQL Server disk I/O bottlenecks (without a hammer) In this new article, Simple-Talk editor Tony Davis explains step-by-step how to find and fix the root causes of disk I/O bottlenecks, including gathering data, avoiding knee-jerk fixes, and how monitoring tools can help. Read now. |
| | Have you got SQL Fingers? Watch these free SQL Prompt tips videos for SQL writing hints from top SQL Server MVPs. SQL Prompt is the SQL code productivity add-in for SQL Server Management Studio and Visual Studio. Find out how easily you can write SQL. |
|
|
|
| | | David Fundakowski from SQLServerCentral.com Additional files can be added to to a database to increase the storage. When more data is added to the files, Extended Events shows how SQL Server spreads data across multiple files. More » |
| Additional Articles from SimpleTalk Information Technology is fast-changing, but the people who work in IT need to have a good chance of a long-term career. That means keeping up to date, not only in their current speciality, but in the wider sphere of the technology they work with. IT managers must make sure that keeping up to date with technology is part of the day to day activity of their people. How should they make sure it happens? More » |
| Jason Brimhall from SQLServerCentral Blogs Quick Flashback Back in late December of 2015, a challenge of sorts was issued by Tim Ford (twitter) to write a... More » |
|
|
| | Today's Question (by Shiva N): What is the output of this T-SQL? SELECT COUNT(*) , COUNT(10) , COUNT(1); |
Think you know the answer? Click here, and find out if you are right. We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: T-SQL. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| Yesterday's Question of the Day |
| |
| | Gianmarco Angiolini from SQLServerCentral.com Hi, simply create the proc and run this one: EXEC monitor.dbo.CTRL_IdentityAvailability @SendMail = 'TRUE' , @EMailAddress = '[email protected]' , @EMailCC = '' , @EMailBCC = '' , @Debug = 0 , @MailFormat = 'TEXT' The proc show for each table, for each db, the identity fields near to the higher limit The proc has internally set the alert thresholds like this: INSERT INTO #MaxValues(TypeIdentity, MaxValue, PercAlert) VALUES ('bigint', 9223372036854775807, 1) , ('int', 2147483647, 5) , ('smallint', 32767, 10) , ('tinyint', 255, 10) You can change the values 1, 5, 10 to what you need. These are the higher limits after which the mail (or the alert) starts. The parameter @Sendmail enable the creation (with @mailformat TEXT or HTML) and send the alert message to @EmailAddress, @EMailCC and @EMailBCC. @Debug = 1 shows the intermediate results without sending any mail. You can also create a schedule to monitor periodically the amount of id available Happy coding Gianmarco More » |
|
|
| Database Pros Who Need Your Help |
| Here's a few of the new posts today on the forums. To see more, visit the forums. I nedd code to purge or clear sql server logs (current) not database logs - I nedd code to purge or clear sql server logs (current) not database logs Reporting Services 2016 503 error on attempting to fix authentication - I have just installed a clean SSRS 2016 Express (and SQL 2016 Express) on a new laptop running Windows 10. The... STDistance with SPATIAL INDEX QUERY TO SLOW :) - hi all, i have to following query : DECLARE @latitude float=31.24326 DECLARE @longitude float=34.79418 DECLARE @g geometry= geometry::Point(@longitude, @latitude, 4326); DECLARE @h... HeartBeat Failure - Hi Experts, We are observing frequent heartbeat failure in cluster logs and the RCA is found to be network issue. 1.When this... Numerous men resort to different sorts of wellbeing things - Yet, keep in musings don't utilize overdose that can be destructive to build prosperity. Keep this far from kids and... Removes erectile dysfunction - This is an established detail around here. Alpha Tren is an easy design to increase the amount of Alpha Tren.... Removes erectile dysfunction - This is an established detail around here. Alpha Tren is an easy design to increase the amount of Alpha Tren.... Data storage options. - Hello all. New to this forum so I thought I'd start by asking a question that'll likely have many opinions... Manual Failover in Log Shipping configuration - [font="Tahoma"]Hello guys, I'm in the process of creating a powershell function which will call .sql scripts to perform Log Shipping, FailOver... Things that should be considered when setting up a new sql database/instance/server - Hello Folks, What are the things that should be considered when provisioning a DB/Instance/Server. We are looking to follow the best... Well I have been Moved to the DBA Team and I am a Noob - Hi, I have been moved from desktop support to the dba team as a junior dba and I have zero experience. If... Failed to install MS SQL 2012 silently - I am trying to install MSSQL 2012 using power shell. I have an ISO of MS SQL 2012 in CD rom... Cannot Execute SQL Configuration Manager - I have several SQL instances running on my development computer. One for SQL2008R@ (64), two for SQL2012 (64), and one... male enhancement – 100% Risk Free Trial - male enhancement – 100% Risk Free Trial Pack For Great Muscle Power!! Celexas male enhancement bottleCelexas male enhancement:- There is one... unexpected 16,000 turned up on the day - [url=https://www.cascade.org/node/28289]Hungarian Grand Prix 2016 Live Streaming[/url] Transaction Rollback on tables with referential integrity - Hi guys, Just looking for some advice on the best way to go about this. Here's my example. So, I'm inserting some... Need Help! ETL Stored Procedure Used to Work but Now Very Slow - There is something bogging down our computer/server and causing job schedules to hang or fail and I cannot find it.... Page break in matrix - I've have a matrix that must, if it has more than 3 columns, add a pagebreak after every 3 columns.... SSAS Deployment Error - I am trying to deploy an SSAS project running in tabular mode and am getting the following error: Error returned: 'The... SQL Server job to delete old backups - Hi, I need to create a job that cleans backups and log backups that are older than a month. I do... |
|
| This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. | This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here. | This transmission is ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: [email protected] |
|
|