Reputation
33,588
Next tag badge:
509/400 score
72/80 answers
Badges
8 87 147
Newest
 sql
Impact
~1.1m people reached

Jun
26
revised Datediff with many dates causes poor performance?
added 4785 characters in body
Jun
26
comment Is it better to use an ID (int) or a Name (varchar) as PK for a table?
@Enthusiast - You could still optionally enforce the uniqueness with a unique constraint if you wanted. My point is that it gives you more flexibility. Are you going to tell the business that they can't name a product "bread" because that was the name of a deactivated product 5 years ago?
Jun
26
answered Is it better to use an ID (int) or a Name (varchar) as PK for a table?
Jun
26
comment SQL Server Management Studio greyed out
Hmm, found this for 2005 social.msdn.microsoft.com/Forums/sqlserver/en-US/… the path to the Shell folder will be different for 2008 but could well be basically the same fix.
Jun
25
comment SQLCMD Mode in SSMS and @@variable expansion
You just substitute the string @@servername for $(dbNotServer) so the SQL sent to execute is SELECT @@servername AS worked. There is no assignment of the value of @@servername to the sqlcmd variable as asked for.
Jun
25
comment order of inserting record is mismatching
@TomV - can be read in that order but SQL Server can also read in allocation order under some circumstances,
Jun
25
comment order of inserting record is mismatching
Clustered indexes aren't necessarily stored ordered in key order on disc. There can be fragmentation where logical and physical order is different.
Jun
24
comment MS-SQL: unique constraint case-insensitive
What is the current column collation? I assume it must be CS? Why don't you want to change it to CI if you are not allowing any values to exist that differ only by case?
Jun
24
comment SQL Server 2008: DoMiniDump () encountered error (0x80004005) - Unspecified error
That is not the most up-to-date build. You could try installing SP4
Jun
23
comment What happens if a client connection is killed while holding a lock?
@usr that's covered in the link I posted above. Defaults look to be the same in 2014 technet.microsoft.com/en-us/library/ms190771(v=sql.120).aspx
Jun
23
comment What happens if a client connection is killed while holding a lock?
@KennethFisher - Found this for 2005 blogs.msdn.com/b/sql_protocols/archive/2006/03/09/546852.aspx
Jun
23
comment What happens if a client connection is killed while holding a lock?
@KennethFisher - But how does it tell? Does it send periodic packets to test? Scanning this article on code project indicates that it may have to codeproject.com/Articles/37490/…
Jun
23
comment What happens if a client connection is killed while holding a lock?
With the SSRS example that's because the report server application itself is making the connection to the database engine. Not the browser itself.
Jun
23
revised What happens if a client connection is killed while holding a lock?
added 860 characters in body
Jun
23
comment Can I simulate a sequence in pre-2012 SQL Server, with separate identity column, in function style?
Second solution here any good to you? stackoverflow.com/a/3462957/73226
Jun
23
revised Excessive amount of data received from server
added 11 characters in body
Jun
23
answered Predicate not resulting in expected scan
Jun
23
comment Predicate not resulting in expected scan
So if you use OPTION (QUERYTRACEON 4199) on the original query does the problem disappear?
Jun
23
comment Predicate not resulting in expected scan
In the first query what plan do you get if you try with the results of the expression? i.e. [ImageDate] BETWEEN '2015-04-25' AND '2015-05-30'? There is a cardinality estimation bug with DATEDIFF that may be playing a part?
Jun
22
awarded  Nice Question