Skip to content

Instantly share code, notes, and snippets.

@billinkc
Created December 17, 2013 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billinkc/8010571 to your computer and use it in GitHub Desktop.
Save billinkc/8010571 to your computer and use it in GitHub Desktop.
2008 R2 crash - run at your own risk
USE tempdb
-- Map of sql server builds
-- http://sqlserverbuilds.blogspot.com/
SELECT
SERVERPROPERTY('productversion') AS ProductVersion
, SERVERPROPERTY ('productlevel') AS ProductLevel
, SERVERPROPERTY ('edition') AS Edition
, DOWI.windows_release
, DOWI.windows_service_pack_level
, DOWI.windows_sku
, DOWI.os_language_version
FROM sys.dm_os_windows_info AS DOWI;
-- My values
--ProductVersion ProductLevel Edition windows_release windows_service_pack_level windows_sku os_language_version
--10.50.4276.0 SP2 Enterprise Edition (64-bit) 6.2 4 1033
-- http://dba.stackexchange.com/questions/55194/weird-sql-server-instance-crash-on-casting-to-numeric
IF NOT EXISTS (SELECT * FROM sys.tables AS T WHERE T.name = 'TestTable' AND T.schema_id = SCHEMA_ID('dbo'))
BEGIN
CREATE TABLE dbo.[TestTable]([MPNR] [numeric](9, 0) NOT NULL);
END;
-- This is what may or may not cause the failure
SELECT *
FROM dbo.[TestTable]
where mpnr in (1099059904,
1038139906,
1048119902,
1045119902,
1002109903,
1117109910,
1111149902,
1063149902,
1117159902,
1116109904,
1105079905,
1012079906,
1129129904,
1103059905,
1065059905,
1091059906,
1110149904,
1129149903,
1083029905,
1080139904,
1076109903,
1010019902,
1058019902,
1060019903,
1053019902,
1030089902,
1018149902,
1077149902,
1010109901,
1011109901,
1000119902,
1023049903,
1107119909,
1108119909,
1106119909)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment