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


SQL Script to check SQL Server cluster Nodes.


SQL Script to check SQL Server cluster Nodes.

Author
Message
ma-516002
ma-516002
SSCrazy
SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)SSCrazy (2.5K reputation)

Group: General Forum Members
Points: 2511 Visits: 321
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.
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3604 Visits: 1552
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.
Bex
Bex
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: 1303 Visits: 1710
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
Chris Houghton
Chris Houghton
Say Hey Kid
Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)Say Hey Kid (704 reputation)

Group: General Forum Members
Points: 704 Visits: 1697
Tested select * from ::fn_virtualservernodes() on both 2005 and 2008 clusters and it returned correct results for both.
Mighty
Mighty
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4444 Visits: 1705
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.
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28033 Visits: 13268
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! Cool


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
michael.kaufmann
michael.kaufmann
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: 1343 Visits: 1082
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
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3604 Visits: 1552
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! Cool


It does appear that's the case, yes.

The explanation makes no attempt to explain why the "wrong" answers are wrong, either.
Kiara
Kiara
SSC-Addicted
SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)SSC-Addicted (477 reputation)

Group: General Forum Members
Points: 477 Visits: 1426
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
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3604 Visits: 1552
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.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


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.
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