Update November 2, 2011: Klaus Aschenbrenner (www.sqlpassion.at) retracted his statements about SQL Workshops: Correction of my unfair and incorrect words against SQLWorkshops.
This blog is a response to Klaus Aschenbrenner’s tweets on Oct 18, 2011, where Klaus Aschenbrenner, author of “Pro SQL Server 2008 Service Broker” (Apress, 2008), claimed having received “hard threatening emails” from SQL Workshops. To show that SQL Workshops did not threaten Klaus Aschenbrenner the original email along with Klaus Aschenbrenner’s tweets are published here.
Klaus Aschenbrenner
@datachick They wrote me and @AdamMachanic *hard thretening* emails, because we were presenting on memory spills at #sqlpass
Klaus Aschenbrenner
@MladenPrajdic At least I and @AdamMachanic got a #sqlsue email, because we have presented on memory spills at #sqlpass
Klaus Aschenbrenner
Blog post by @MidnightDBA on #sqlsue: http://bit.ly/qOsuDr
Klaus Aschenbrenner
@MidnightDBA Am I allowed to publish that link on my Facebook site? Would be interesting for some of my friends in the community….
On Sep 30, 2011 Carmen wrote:
Subject: Your demo script
Hello Klaus,
Someone pointed out that your demo script “InsufficientMemoryGrants.sql“ has very similar content to the material we presented in our webcast (www.sqlworkshops.com/webcasts) . I took a look at it now and noticed that you even copyrighted the script.
One can only copyright one’s own material. Furthermore it is usual business practice to give credit to the source (in this case to our copyrighted webcast that you viewed).
Hope we can work together in a future project.
Regards,
Carmen Pentek
www.sqlworkshops.com
(Klaus Aschenbrenner did not reply to Carmen’s email as of Oct 18, 2011).
The copyright message (see text in red below) Carmen was referring to in the above email belongs to Klaus Aschenbrenner’s InsufficientMemoryGrants.sql demo script:
/*============================================================================
Summary: Demonstrates Sort Warnings because of insufficient memory grants
——————————————————————————
Written by Klaus Aschenbrenner, SQLpassion.at
(c) 2011, SQLpassion.at. All rights reserved.
For more scripts and sample code, check out
http://www.SQLpassion.at
You may alter this code for your own *non-commercial* purposes. You may
republish altered code as long as you include this copyright and give due
credit, but you must obtain prior permission before blogging this code.
THIS CODE AND INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
============================================================================*/
Since Klaus Aschenbrenner’s (red color) code from InsufficientMemoryGrants.sql demo script published in 2011 looks similar to SQL Workshops’ (blue color) code from the Webcast 1 published in 2009, his restrictive copyright message on alteration seems strange to us. We know that Klaus Aschenbrenner watched SQL Workshops’ freely downloadable webcasts because Klaus Aschenbrenner tweeted about it – see tweets at the end.
In our opinion, if one alters somebody’s code and publishes it without giving credit to the original author one should at least allow others to freely alter as well. Otherwise, if someone alters SQL Workshops’ original code, Klaus Aschenbrenner could suspect it was altered from his code and claim “due credit” and “prior permission before blogging”. That would not make much sense, would it?
Klaus Aschenbrenner’s downloadable demo script with the above quoted copyright message was presented at the following conferences:
SolidQ Summit, www.sqlu.com, September 21-23, 2011
SQL Days Conference, www.sqldays.net, September 28-29, 2011
SQLBits Conference, www.sqlbits.com, September 29-October 01, 2011
SQL PASS Summit, www.sqlpass.org/summit/2011, October 12-14, 2011
Klaus Aschenbrenner’s InsufficientMemoryGrants.sql demo script published in 2011:
CREATE TABLE Table1
(
Column1 INT IDENTITY PRIMARY KEY,
Column2 INT,
Column3 CHAR(2000)
)
GO
SQL Workshops’ Webcast 1 published in 2009:
create table tab7 (c1 int primary key clustered, c2 int,
c3 char(2000))
go
Both have exactly 3 columns, int, int and char(2000).
Klaus Aschenbrenner’s InsufficientMemoryGrants.sql demo script published in 2011:
SELECT @x = column2 FROM Table1
WHERE Column2 = 2
ORDER BY Column3
GO
SQL Workshops’ Webcast 1 published in 2009:
select @c1 = c1, @c2 = c2, @c3 = c3
from tab7
where c1 < 3000
order by c2
go
Both use local variable in the select, which is a very unusual practice.
Klaus Aschenbrenner’s InsufficientMemoryGrants.sql demo script published in 2011:
sys.dm_exec_query_memory_grants
WHILE (1 = 1)
BEGIN
DECLARE @x INT
SELECT @x = column2 FROM Table1
WHERE Column2 = 2
ORDER BY Column3
END
GO
SQL Workshops’ Webcast 1 published in 2009:
select granted_memory_kb, used_memory_kb, max_used_memory_kb
from sys.dm_exec_query_memory_grants
where session_id = 52
go
while 1=1
begin
declare @c1 int, @c2 int, @c3 char(2000)
select @c1 = c1, @c2 = c2, @c3 = c3
from tab7
where c1 < 3057
order by c2
end
go
Both use while 1=1 to demonstrate memory estimation using sys.dm_exec_query_memory_grants.
Klaus Aschenbrenner’s InsufficientMemoryGrants.sql demo script published in 2011:
CREATE TABLE Table2
(
Column1 INT IDENTITY PRIMARY KEY,
Column2 INT,
Column3 VARCHAR(2000)
)
GO
SELECT TOP 3000 IDENTITY(INT, 1, 1) AS n INTO #Nums
FROM
master.dbo.syscolumns sc1
DECLARE @x INT
SELECT @x = Column1 FROM Table2
ORDER BY Column3
GO
SQL Workshops’ Webcast 1 published in 2009:
declare @i int
set @i = 1
while @i <= 3000
begin
insert into tab7char values (@i, @i, replicate(‘aaa … aaa’))
set @i = @i + 1
end
go
declare @c1 int, @c2 int, @c3 char(2000)
select @c1 = c1, @c2 = c2, @c3 = c3
from tab7varchar
order by c2
go
create table tab7varchar (c1 int primary key, c2 int,
c3 varchar(2000))
go
Both use 3000 rows and exactly 3 columns, int, int and varchar(2000) to demonstrate 50% memory estimation for varchar data type.
Klaus Aschenbrenner’s questions about SQL Workshops’ webcast (www.sqlworkshops.com/webcasts) on April 17, 2011:
Klaus Aschenbrenner
@SQLSoldier Just seen an example of this here: http://bit.ly/53Uk0c (1st part of 1st webcast) #sqlhelp
Carmen Pentek
@Aschenbrenner Was about to answer you, am happy you found it by yourself. Servus nach Wien- #sqlhelp
Klaus Aschenbrenner
@TopSQL No, the why was currently not answered and explained #sqlhelp
Carmen Pentek
@Aschenbrenner I see. You don’t just want to tackle the problem you want to understand the very root of it… #sqlhelp
Klaus Aschenbrenner
@TopSQL Yes, it doesn’t help anything, when the WHY is not explained. You can’t learn from it… #sqlhelp
Carmen Pentek
@Aschenbrenner That’s the way SQL works. It is a bug / limitation. #sqlhelp
Klaus Aschenbrenner
@TopSQL And is it possible to calculate/predict at which point #sqlserver spills the sort over to tempdb? #sqlhelp
Carmen Pentek
@Aschenbrenner No general point, in some scenario it does not spill. Each case is different. Even 32/64 bit is different #sqlhelp #sqlserver