SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Intersect


Intersect

Author
Message
bopeavy
bopeavy
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1273 Visits: 690
Comments posted to this topic are about the item Intersect

Cool


"There are no problems! Only solutions that have yet to be discovered!"


Henrico Bekker
Henrico Bekker
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4562 Visits: 4717
erm...just me or does this query in fact work?

name fileid
master 1

Ran it in Denali and seems fine... Cool
SQLRNNR
SQLRNNR
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40369 Visits: 18565
Query runs just fine in SQL 2008 R2 as well.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

vk-kirov
vk-kirov
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3890 Visits: 4408
Very interesting question, but 1) version-specific; 2) with wrong explanation.

I could reproduce the error only in SQL Server 2005. In SQL Server 2008 R2, the query works fine.

This situation must be a bug in SQL Server 2005. For some reason, SQL Server 2005 raises an error with severity level = 20 (which means a fatal severity level, the client connection is terminated after receiving that message), and writes the following message to Event Log:

A user request from the session with SPID 60 generated a fatal exception. SQL Server is terminating this session. Contact Product Support Services with the dump produced in the log directory.


These queries work fine in SQL Server 2005, although they are very similar to the QotD query:

select fileid, name from sysfiles
intersect
select cast(file_id as int), name from sys.master_files
where file_id in('1')
order by 2;

select file_id, name from sys.master_files
where file_id in('1')
intersect
select fileid, name from sysfiles
order by 2;

select fileid, name from sysfiles
intersect
select file_id + 0, name from sys.master_files
where file_id in('1')
order by 2;


Koen Verbeeck
Koen Verbeeck
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34283 Visits: 13270
SQLRNNR (11/7/2011)
Query runs just fine in SQL 2008 R2 as well.


I ran it in SQL Server 2008R2, and I got the severe error.

The plot thickens... :-)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Koen Verbeeck
Koen Verbeeck
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34283 Visits: 13270
Here's a screenshot (in attachment).


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Attachments
severe_error.JPG (82 views, 64.00 KB)
SQLRNNR
SQLRNNR
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: General Forum Members
Points: 40369 Visits: 18565
Koen Verbeeck (11/8/2011)
SQLRNNR (11/7/2011)
Query runs just fine in SQL 2008 R2 as well.


I ran it in SQL Server 2008R2, and I got the severe error.

The plot thickens... :-)


Maybe it was fixed with SP1?? I see you are running RTM and I have SP1 installed...Hehe



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Koen Verbeeck
Koen Verbeeck
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34283 Visits: 13270
SQLRNNR (11/8/2011)
Koen Verbeeck (11/8/2011)
SQLRNNR (11/7/2011)
Query runs just fine in SQL 2008 R2 as well.


I ran it in SQL Server 2008R2, and I got the severe error.

The plot thickens... :-)


Maybe it was fixed with SP1?? I see you are running RTM and I have SP1 installed...Hehe


Ah, keen observation :-)
Brand new development server, so SP1 isn't installed yet.
This reminds me that I should pick this up with the DBA's.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Steve Hall
Steve Hall
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3381 Visits: 11690
2008R2 SP1 - runs without error.
2008 SP2 - 'severe error'
2005 - 'severe error'

Steve Hall
Linkedin
Blog Site
philip.cullingworth
philip.cullingworth
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1554 Visits: 978
WORD OF WARNING,

Having guessed the right answer I then decided to run it on our SQL 2005 (production) server.

After restarting the service this line was found in the log.

11/08/2011 08:13:34,spid80,Unknown,SqlDumpExceptionHandler: Process 80 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
11/08/2011 08:13:34,spid80,Unknown,***Stack Dump being sent to E:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0007.txt
11/08/2011 08:13:34,spid80,Unknown,Using 'dbghelp.dll' version '4.0.5'

Guess that will teach me not to use the test server Whistling
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search