Today we have a guest editorial from Tim Mitchell as Steve is on vacation.
Along with risk comes the inevitability of failure. With few exceptions, every organization and every person will, in time, experience some form of failure. We all hope to prevent and avoid the kind of colossal failure that presents a do-or-die moment for a business (or career), but when those moments do come, it's important to fail properly. Even when the unthinkable - a hack, a dropped production database, a loss of data - happens, it's critical to respond properly to minimize the damage and clearly communicate with those affected by the disaster.
When I first read the news about the massive Buffer hack recently, I was nervous. I have been a Buffer user (albeit a relatively inactive one) for a few months, and since I have several social media networks connected through Buffer, I was concerned that those accounts may have also been compromised. I quickly learned that my account was not impacted, but immediately I was impressed with the way Buffer handled the whole mess. It was bad - some 30,000 users were affected (out of a total user base of over 1 million) by the hack that allowed spammers to post message to the Facebook accounts of the affected users.
Regardless of how the issue was handled, it was going to be ugly at the end of the day. However, Buffer did a fantastic job of minimizing the damage in the way they responded to the breach. Within a couple of hours of discovery of the hack, Joel Gascoigne, CEO of Buffer, owned the failure by notifying Buffer users via email as well as through his blog and other social media. In a message entitled "Buffer has been hacked - here is what's going on," Gascoigne admitted that there had been a breach, described the symptoms of affected accounts, and listed for users what they should do in the meantime to prevent any further spam postings. Even though they didn't (at that time) know exactly what had led to the hack, he repeatedly apologized on behalf of Buffer without trying to make excuses or shift blame.
In the hours and days to come, Gascoigne repeatedly updated Buffer users, via email and through his blog, on what they had learned about the breach, how it happened, and what users needed to do to resume normal operations with their Buffer accounts. The information he shared was both detailed and transparent - he didn't try to hide behind vague explanations or invoke confidentiality.
Did he handle this failure properly? A quick perusal through the comments on his blog post show an overwhelming collective message of support and thanks. There is no doubt that this breach cost Buffer some users, very likely some of which were paying users. However, the public response in support of Buffer shows that rapid response, clarity and honesty in communication, and taking responsibility for failures goes a long way when the worst happens.
Failures will come. How we address those failures is often as much of the story as the failure itself. Fail the right way.
SQL Saturday is coming to Nashville on January 18th 2014. This is a free full day of SQL Server training and networking. There are also paid-for Pre-con sessions available to sign up for presented by Denny Cherry and David Klee. More »
Rob Sheldon continues on his quest to explain all those command-line tools such as SQLCMD, Logparser, SQLIO and tablediff that are part of SQL Server. TableDiff can be used for comparing tables, as when you run automated tests that check a result against a table of expected values. The best way to learn TableDiff is to see it in action and Rob talks you through several examples. More »
Teach yourself SQL Server Code Name Denali—one step at a time. Get the practical guidance you need to build database solutions that solve real-world business problems. Learn to integrate SQL Server data in your applications, write queries, and develop reports. Get your copy from Amazon today.
Yesterday's Question of the Day
(by Steve Jacobs):
Considering the query below, what are the 13th "terms" for the arithmetic sequence and geometric sequence?
1. Developed and tested using SQL Server 2008 R2 SP2
2. "term" = series sequence value
3. The process does not consider negative values.
declare @start as float
declare @commonDiff as float
declare @counter as float
set @start = 1
set @commonDiff = 3
set @counter = 0
WHILE @counter < 200
set @counter = @counter + 1
declare @currVal as float
set @currVal = 0
--Perform conversion here for base sequence "series" value
--for arithmetic sequence
set @currVal = Case When Abs((@start + (@commonDiff * (@counter -1)))
- Round((@start + (@commonDiff * (@counter -1))), 1, 1)) * Power(10, 1) = 5
Then Ceiling((@start + (@commonDiff * (@counter -1))) * Power(10,1))/Power(10, 1)
Else Round((@start + (@commonDiff * (@counter -1))), 1)
Print 'Current counter: ' + convert(char,@counter)
Print 'Arithemtic Sequence: ' +
Print 'Geometric Sequence: ' +
convert(char,convert(bigint,(@start * (POWER(@commonDiff,@counter-1)))))
Print CHAR(13) + Char(10)
Answer: 37, 531441
Answers: 37, 531441
Converting mathematical formulas (or proving theorems) to\from code can be daunting; however, I have always enjoyed doing so. Of course, you are bound by the complexity of the formula, the programming's language data type max value, etc. For example even though I’m using BIGINT (whole number), there is always a limit. You will receive an arithmetic error once you go over its max value (-2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)) such as the example above will show when trying to compute the geometric sequence above the current counter of 40 (or arithmetic sequence of 121). Additionally, since BIGINT returns whole numbers, to perform accurate division, modulus, etc., you must convert to float (or decimal\real\numeric).
You can verify the results using any online arithmetic and geometric sequence\series calculators. For example:
I submit this suggested solution for review. I created this because we cannot have downtime on this site(24/7), or scripts that slow the system down that run during peak business hours. Because I cannot do ReIndexing due to uptime, I went for second best namely Index defrag that will give a bit of a performance boost. The 2000 database was still very slow running on SQL Server2005. After this there was a huge improvement. Please take note that the IndexDefag syntax is still 2000. Convert this at your own discretion to 2005 format with alter index syntax. I further suggest that you implement this for all your databases and specify different times to spread the processor load. I trust this might solve someone's problem.
This Stored Procedure can only run at a specific time, between 2 and 4 in the morning. Keep in mind I am in South Africa so the US date format might be deferent. First create the table to contain the log data. Then the SP, but first run a couple of tries and debugging...good luck...
select house_no order
- i have table coloum like below
3-4-53 . HYDERABAD
select house no order
i want output like below format
display order by houseno
- i have table house no like this below coloum.........
i want table like this....
pl write the quarie..................
ssis for each loop into files help
I have the following table
CREATE TABLE [dbo].[Orders](
[orderNo] [varchar](10) NOT NULL,
[orderLineNo] [int] NOT NULL,
[product] [varchar](10) NULL,
[orderQty] [int] NULL,
[receivedQty] [int] NULL,
Looking for a Sr. SQL DBA out of SF
- Contact: Amber.Richard@staffmark.com
Phone: (925) 969-4433
Searching for a Senior level SQL DBA. This is a F/T or contract-to-hire position. SQL...
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.