| SQL PASS Live Stream |
Aaron Bertrand on SQLBlog.com
Ryan Adams Blog
The Midnight DBA
Jen Stirrup
Grant Fritchey
/*
Have you ever needed advice that was easy to use and just made things work? This is SQL Works
| SQL PASS Live Stream |
CREATE TABLE dbo.Wait_Type_Description
(
Wait_type VARCHAR(50) NOT NULL,
Wait_Type_desc VARCHAR(8000) NOT NULL
) ... First of all, let me say that there are many times when getting FREE! items can make perfect sense. If you find a bin of FREE! athletic socks at a department store, for instance, there is no downside to grabbing all the socks you can. The critical issue arises when FREE! becomes a struggle between a free item and another item - a struggle in which the presence of FREE! leads us to make a bad decision. *I have never seen this concept more ably demonstrated than I have working in a large corporate IT department. There are other examples, for example this post on SQLServerCentral's forums is a great example of exactly the same thing happening but in a smaller company
Amazing what a little regulation does for requirements! After looking into PCI requirements, I also found that CSC (or other authentication methods) can never be stored. So when I brought this to the attention of the department head and suggested we look into our options with the lawyer, he quickly rescinded that particular requirement. Turns out, the CSC is not required by our CC processing software, that requirement was just put there "just in case we ever needed it." (full thread here)This is a great example, since there was no cost involved, an unnecessary and in this case legally precarious, requirement was thrown in 'just in case'. For those suffering under the pile of "nice to haves" and "just in case" requirements and constant revisions, what can be done? I have found that even implementing a nominal cost for IT services can have a big impact on the way your customers will view your services. When it comes to nominal cost, it does not have to be monetary, it can be additional regulatory overheard, legal or financial risk, or an unacceptable increase in time lines that brings the needed 'costs' into the equation. The example from the recent forum thread above did not involve any financial costs, the cost was in the potential legal exposure, and the cost was too great. So how does one go about implementing a cost structure in a corporate environment that realistically does not allow you to actually charge money for your interdepartmental services?
/* Created: October 2012
Author: SQLWorks Consulting blog
URL: http://www.SQLWorks.blogspot.com
*/CREATE TABLE [dbo].[EmployeePerf](
[EmployeeID] [int] NOT NULL,
[EmployeeName] [varchar](25) NOT NULL,
[Sales] [int] NULL,
[TimePeriod] [int] NULL
)-- test dataINSERT INTO dbo.EmployeePerf VALUES(1,'Tony',100,'1')INSERT INTO dbo.EmployeePerf VALUES(1,'Tony',300,'2')INSERT INTO dbo.EmployeePerf VALUES(1,'Tony',200,'3')INSERT INTO dbo.EmployeePerf VALUES(1,'Tony',150,'4') DECLARE @sql_handle TABLE(blockee_spid INT, blockee_cmd VARCHAR(MAX), blocker_spid INT, blocker_cmd VARCHAR(MAX))INSERT INTO @sql_handle
SELECT sp1.spid AS blockee_spid, blockee_cmd.TEXT AS blockee_cmd, sp1.blocked AS blocker_spid, blocker_cmd.TEXT AS blocker_cmd
FROM sys.sysprocesses sp1
JOIN sys.sysprocesses sp2
ON sp1.blocked = sp2.spid
CROSS APPLY sys.dm_exec_sql_text((sp1.sql_handle)) AS blockee_cmd --updated
CROSS APPLY sys.dm_exec_sql_text((sp2.sql_handle)) AS blocker_cmd --updated
WHERE sp1.blocked <> 0
SELECT *FROM @sql_handle