Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

SQL Script to check SQL Server cluster Nodes. Expand / Collapse
Author
Message
Posted Tuesday, March 15, 2011 1:08 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, March 3, 2014 12:21 AM
Points: 2,122, Visits: 306
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.
Post #1078158
Posted Tuesday, March 15, 2011 2:42 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 4:47 AM
Points: 3,352, Visits: 1,480
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.
Post #1078190
Posted Tuesday, March 15, 2011 2:59 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:08 AM
Points: 1,187, Visits: 1,525
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
Post #1078195
Posted Tuesday, March 15, 2011 3:04 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 12:55 AM
Points: 558, Visits: 1,458
Tested select * from ::fn_virtualservernodes() on both 2005 and 2008 clusters and it returned correct results for both.
Post #1078196
Posted Tuesday, March 15, 2011 3:29 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 4:31 AM
Points: 3,194, Visits: 1,233
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.
Post #1078200
Posted Tuesday, March 15, 2011 3:35 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Sunday, July 20, 2014 11:20 PM
Points: 13,252, Visits: 10,133
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!




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

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1078203
Posted Tuesday, March 15, 2011 3:39 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, July 9, 2013 11:12 PM
Points: 1,263, Visits: 1,081
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
Post #1078207
Posted Tuesday, March 15, 2011 3:54 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 4:47 AM
Points: 3,352, Visits: 1,480
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.
Post #1078211
Posted Tuesday, March 15, 2011 5:28 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, June 19, 2014 8:00 AM
Points: 592, Visits: 1,425
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
Post #1078237
Posted Tuesday, March 15, 2011 6:30 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 4:47 AM
Points: 3,352, Visits: 1,480
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.
Post #1078276
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse