April 17, 2010 at 10:31 am
Tom.Thomson (4/17/2010)
CirquedeSQLeil (4/16/2010)
That proc is a real piece of work - compare it some day to sql 2008.There is very little difference - cosmetic bits (changes of captitalisation, "Exec" instead of "execute", deletion of a code fragment that was commented out in SQLS 2000, adding a rather useless comment), things required by system changes between 2000 and 2008 (using system view instead system table, using sysprocesses_ex instead of sysprocesses) and an interface change (adding the request_id column to the result set, which is pretty trivial in code terms). Why do you think it interesting to compare the two versions? (Or is my old version of sp_who2 different from the "real" 2008 version?)
The changes are trivial. The biggest piece of note is that there really is no notes as to the changes made (i.e. dates etc). It still uses soon to be deprecated stuff and the inconsistency of capitalization, exec and trivial things like that. It seems extremely sloppy.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 17, 2010 at 10:31 am
Steve Jones - Editor (4/17/2010)
Wayne,Hadn't seen that before, but it's great. I bookmarked it to use it for some question.
You're talking about the blood-n-gore one?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 17, 2010 at 10:34 am
One more note on sp-who2, note how little it has changed when SQL server has changed so much.
6.5 version used sysprocesses 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[/url]
Learn Extended Events
April 17, 2010 at 10:38 am
The "let me google that for you"
April 17, 2010 at 11:09 am
CirquedeSQLeil (4/17/2010)
The changes are trivial. The biggest piece of note is that there really is no notes as to the changes made (i.e. dates etc). It still uses soon to be deprecated stuff and the inconsistency of capitalization, exec and trivial things like that. It seems extremely sloppy.
You think it noteworthy that MS too has ancient sloppy and obsolescent code in its products? It would be remarkable if it were the only company in the world that didn't?
Actually I just realised that the fact that it's sloppy and obsolescent code may be important after all: I wrote some rather nasty code (looking for the culprits of logjams and killing them off, with reasonable auditing) for a previous employer that depends on sp_who2; I hope someone revises it before sp_who2 finally dies of old age or gets revised radically and given a new and different result set. Actually I'm not even sure it will work with sp_who2 returning that extra column (can't remember how I handled its result set) so maybe it had better be fixed before they upgrade from 2000 to 2008.
Tom
April 17, 2010 at 11:41 am
Tom.Thomson (4/17/2010)
CirquedeSQLeil (4/17/2010)
The changes are trivial. The biggest piece of note is that there really is no notes as to the changes made (i.e. dates etc). It still uses soon to be deprecated stuff and the inconsistency of capitalization, exec and trivial things like that. It seems extremely sloppy.You think it noteworthy that MS too has ancient sloppy and obsolescent code in its products? It would be remarkable if it were the only company in the world that didn't?
Actually I just realised that the fact that it's sloppy and obsolescent code may be important after all: I wrote some rather nasty code (looking for the culprits of logjams and killing them off, with reasonable auditing) for a previous employer that depends on sp_who2; I hope someone revises it before sp_who2 finally dies of old age or gets revised radically and given a new and different result set. Actually I'm not even sure it will work with sp_who2 returning that extra column (can't remember how I handled its result set) so maybe it had better be fixed before they upgrade from 2000 to 2008.
That would be a good idea.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 17, 2010 at 3:39 pm
Does anyone here support sybase? If I recall there was a sp_who there. Is sp_who2 a complete rewrite from sp_who? Is sp_who is sybase at all related to the sp_who in mssql? Does sp_who have the same sloppiness as sp_who2 and did is originate at sybase or was in completely rewritten when microsoft rewrote sql server between the 4.2 and the 6.0(5) release?
---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
April 17, 2010 at 9:05 pm
Jeff Moden (4/16/2010)
Heh.... famous last words would be... [font="Arial Black"]AHHHHH CRAP![/font]Just so you guys know... remember I said that I changed my cteTally code to use Gianluca's wonderful idea of using UNPIVOT instead of 10 SELECT 1 UNION ALL's??? Well, it turns out that it's quite machine dependent. I used it to do a million row split on a box at work and it came in at 4:18. Just to see how much faster it was, I also ran the old 10 SELECT code... the old code came in at 3:48!!!!!! The old code came in 30 seconds faster. I ran the test multiple times in disbelief.
I'm looking for the couple of posts I used the UNPIVOT code so I can post a correction. If you happen to run across the UNPIVOT code in your travels, send me the URL (please) so I can make a correction. Thanks, folks.
Jeff,
Did you ever see this thread? http://www.sqlservercentral.com/Forums/Topic809640-338-1.aspx
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
April 17, 2010 at 11:49 pm
The Dixie Flatline (4/17/2010)
Jeff,Did you ever see this thread? http://www.sqlservercentral.com/Forums/Topic809640-338-1.aspx
One of my favourite threads ever on here.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
April 18, 2010 at 2:45 am
April 18, 2010 at 2:50 am
April 18, 2010 at 4:04 am
Trey Staker (4/17/2010)
Does anyone here support sybase? If I recall there was a sp_who there. Is sp_who2 a complete rewrite from sp_who? Is sp_who is sybase at all related to the sp_who in mssql? Does sp_who have the same sloppiness as sp_who2 and did is originate at sybase or was in completely rewritten when microsoft rewrote sql server between the 4.2 and the 6.0(5) release?
I was a sybase dba back in the day. Version 10 was the last version I worked on I think, and yes sybase had an sp_who, and it used sysprocesses (what else?)
I don't remember the code but would expect sp_who in mssql was lifted straight from sybase, most all the sp_% were. If it was amended it would not have been until version 7.
I would say sp_who2 is just an evolution of sp_who.
---------------------------------------------------------------------
April 18, 2010 at 6:16 am
lmu92 (4/18/2010)
Is Google down?
I usually is... or maybe all those millions I pay for exclusive rights to use it is the thing?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 18, 2010 at 6:47 am
Grant Fritchey (4/18/2010)
lmu92 (4/18/2010)
Is Google down?I usually is... or maybe all those millions I pay for exclusive rights to use it is the thing?
I don't usually do this, but in that case....http://tinyurl.com/y4l5o44
April 18, 2010 at 10:11 am
Steve Jones - Editor (4/18/2010)
Grant Fritchey (4/18/2010)
lmu92 (4/18/2010)
Is Google down?I usually is... or maybe all those millions I pay for exclusive rights to use it is the thing?
I don't usually do this, but in that case....http://tinyurl.com/y4l5o44
Ouch! Just fell out of my chair on this one!
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 15 posts - 14,461 through 14,475 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply