|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 3:27 AM
Points: 1,864,
Visits: 297
|
|
| According to http://msdn.microsoft.com/en-us/library/ms176098.aspx this function is deprecated. And since the question did not mention Sql Server 2000 I would say, the correct answer is the last one which is also mentioned on above page.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 5:04 AM
Points: 3,046,
Visits: 1,309
|
|
Koen Verbeeck (3/15/2011) When I run "select * from ::fn_virtualservernodes()", this returns no error but an empty resultset (I don't run any failover cluster, so that is to be expected). What is the difference between this statement and the "correct" answer?
Yes, I'm confused by that as well. It's SQL 2000 syntax (see this link) but works fine in later versions too.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 7:57 AM
Points: 1,111,
Visits: 1,394
|
|
I took the question to be more about do I know the difference between a function having double colon in front of it or not, and not truly about what syntax I would use to return the information, purely based on the answer options. Not the point of the question I'm sure, but it certainly swayed me to go with option 3 as the answer, but in reality I would use the dmv.
hor_netuk
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Yesterday @ 2:03 AM
Points: 557,
Visits: 1,357
|
|
| Tested select * from ::fn_virtualservernodes() on both 2005 and 2008 clusters and it returned correct results for both.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 8:33 AM
Points: 2,723,
Visits: 987
|
|
I would like to know why option 2 is not correct. Apparently more options are correct, and looking at the future, this should even be the preferred option.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 2:11 AM
Points: 9,378,
Visits: 6,473
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, February 06, 2013 11:51 PM
Points: 1,263,
Visits: 1,079
|
|
bitbucket-25253 (3/14/2011)
Here we go again -- the specified as correct answer is an item to be depreciated in a future release of SQL Server and one possible answer, and the one I was unfortunate to select is currently available in all the SQL Server editions specified by the question and does work. So this question which should be teaching us something does exactly the opposite, it encourages us to use an item to be depreciated and declares the another selection as incorrect, but which is available and does work in the specified editions...From the cited reference to justify the answer Important This Microsoft SQL Server 2000 system function is included for backward compatibility. We recommend that you use sys.dm_os_cluster_nodes (Transact-SQL instead.
Alas and alack woe is me ...... And now I have a suggested QOD which is: Who is currently responsible for checking the accuracy of submitted QODs and when will they be replaced. End of rant
Totally agree! Only want to add the link to the page again: http://msdn.microsoft.com/en-us/library/ms176098.aspx Despite the versions listed (from 2005 through 2011), the correct answer is based on an older version (SQL Server 2000). Don't really get the logic--but that's life, I guess.
Regards, Michael
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 5:04 AM
Points: 3,046,
Visits: 1,309
|
|
Koen Verbeeck (3/15/2011)
Chris Houghton (3/15/2011) Tested select * from ::fn_virtualservernodes() on both 2005 and 2008 clusters and it returned correct results for both.So apparently all the three answers are correct? Everybody wins! 
It does appear that's the case, yes.
The explanation makes no attempt to explain why the "wrong" answers are wrong, either.
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 6:14 AM
Points: 592,
Visits: 1,423
|
|
CirquedeSQLeil (3/14/2011)
bitbucket-25253 (3/14/2011)
Here we go again -- the specified as correct answer is an item to be depreciated in a future release of SQL Server and one possible answer, and the one I was unfortunate to select is currently available in all the SQL Server editions specified by the question and does work. So this question which should be teaching us something does exactly the opposite, it encourages us to use an item to be depreciated and declares the another selection as incorrect, but which is available and does work in the specified editions...From the cited reference to justify the answer Important This Microsoft SQL Server 2000 system function is included for backward compatibility. We recommend that you use sys.dm_os_cluster_nodes (Transact-SQL instead.
Alas and alack woe is me ...... And now I have a suggested QOD which is: I was bit by the same bug. I chose the more current command that is still available and got it wrong. I tested the query of sys.dm_os_cluster_nodes and verified that it does work.
Same here. I picked the current command, not the one being deprecated. Ah, well.
-Ki
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 5:04 AM
Points: 3,046,
Visits: 1,309
|
|
michael.kaufmann (3/15/2011)
[quote] Totally agree! Only want to add the link to the page again: http://msdn.microsoft.com/en-us/library/ms176098.aspxDespite the versions listed (from 2005 through 2011), the correct answer is based on an older version (SQL Server 2000). Don't really get the logic--but that's life, I guess. Regards, Michael
Actually, if you run the "correct" answer in SQL 2000, you get:
Server: Msg 208, Level 16, State 1, Line 1 Invalid object name 'fn_virtualservernodes'.
You need to run it with the 2 colons for it to work - although not in SQL 2005 or later. See the link in my post above.
Not sure where that leaves us, but hey.
|
|
|
|