T-SQL Queries to find SQL Server Cluster Nodes and Shared Drives | SansSQL

Sunday, February 20, 2011

T-SQL Queries to find SQL Server Cluster Nodes and Shared Drives

In one of my earlier post's "Finding Cluster Nodes or Cluster Name" , I had told about the query which can be used to find the name of the node on which the SQL Server Instance is currently running.
Here are more such SQL Server cluster related T-SQL queries which helps in finding SQL Server Cluster Nodes and their shared drives.
  1. Find name of the Node on which SQL Server Instance is Currently running
    SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [CurrentNodeName] 
    If the server is not cluster, then the above query returns the Host Name of the Server.

  2. Find SQL Server Cluster Nodes
    a. Using Function
    SELECT * FROM fn_virtualservernodes() 

    b. Using DMV
    SELECT * FROM sys.dm_os_cluster_nodes 

  3. Find SQL Server Cluster Shared Drives
    a. Using Function
    SELECT * FROM fn_servershareddrives() 

    b. Using DMV
    SELECT * FROM sys.dm_io_cluster_shared_drives

20 comments:

Anonymous said...

thank you these comments are very useful.

Anonymous said...

Thanks. That was great!

Anonymous said...

Is there code to return the name of the cluster which the instance is hosted on? Not the name of the nodes, but the higher level cluster name which the groups/nodes sit under.

Sandesh Segu said...

Select @@ServerName will give you the virtual cluster name.

Anonymous said...

Good stuff bro!

Anonymous said...

Select @@ServerName will not give you cluster name, but cluster_node/instance_name.. I do not know how to pull cluster name using T-SQL though...

Ed

Anonymous said...

Very cool, very helpful, thanks so much!

Selva said...

Very Helpful

Unknown said...

Excellent!! Thank you very much!!

Unknown said...

a pride for me to be able to discuss on a quality website because I just learned to make an article on
cara menggugurkan kandungan

Raj Baraty said...

Cool.. helped me :)

Unknown said...

Really Awesome Blog Thanks for Sharing...
clipping path
clipping path service
remove white background
car photo editing

remuk said...

now present in your city cara menggugurkan hamil
1. manfaat kurma untuk persalinan
2. manfaat buah nanas
3. aktivitas penyebab keguguran
4. apakah usg berbahaya
5. penyebab telat haid

Charlotte W. said...

Microsoft SQL Server is the base of all of our in-house servers. We use it to access all of our internal and external data that comes from Verint and other places. It solves our need to store the data that we have in one location and to create a data warehouse on top of it. thank you~ Charlotte W. from big data analytics

the is said...

Great Article Artificial Intelligence Projects

Project Center in Chennai

JavaScript Training in Chennai

JavaScript Training in Chennai

kimay said...

cool, please guidance so that I can create a blog like yours cara menggugurkan kandungan
cara melancarkan haid
aktivitas penyebab keguguran
tanda tanda keguguran
manfaat dan bahaya buah nanas
tanda tanda kehamilan
cara membaca hasil usg
hamil muda
cara mengatasi keputihan
pengaruh kista saat hamil

Huongkv said...

Mua vé liên hệ đại lý Aivivu, tham khảo

Vé máy bay đi Mỹ

giá vé máy bay đi từ mỹ về việt nam

Giá vé máy bay Hàn Việt Vietjet

chuyến bay thương mại từ canada về việt nam

vé máy bay nhật bản về việt nam

İDRİS DELİ said...

rastgele görüntülü konuşma - kredi hesaplama - instagram video indir - instagram takipçi satın al - instagram takipçi satın al - tiktok takipçi satın al - instagram takipçi satın al - instagram beğeni satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - instagram takipçi satın al - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - binance güvenilir mi - instagram beğeni satın al - instagram beğeni satın al - polen filtresi - google haritalara yer ekleme - btcturk güvenilir mi - binance hesap açma - kuşadası kiralık villa - tiktok izlenme satın al - instagram takipçi satın al - sms onay - paribu sahibi - binance sahibi - btcturk sahibi - paribu ne zaman kuruldu - binance ne zaman kuruldu - btcturk ne zaman kuruldu - youtube izlenme satın al - torrent oyun - google haritalara yer ekleme - altyapısız internet - bedava internet - no deposit bonus forex - erkek spor ayakkabı - webturkey.net - karfiltre.com - tiktok jeton hilesi - tiktok beğeni satın al - microsoft word indir - misli indir

Unknown said...

aşk kitapları
youtube abone satın al
cami avizesi
cami avizeleri
avize cami
no deposit bonus forex 2021
takipçi satın al
takipçi satın al
takipçi satın al
takipcialdim.com/tiktok-takipci-satin-al/
instagram beğeni satın al
instagram beğeni satın al
btcturk
tiktok izlenme satın al
sms onay
youtube izlenme satın al
no deposit bonus forex 2021
tiktok jeton hilesi
tiktok beğeni satın al
binance
takipçi satın al
uc satın al
sms onay
sms onay
tiktok takipçi satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
instagram beğeni satın al
tiktok beğeni satın al
twitter takipçi satın al
trend topic satın al
youtube abone satın al
takipcialdim.com/instagram-begeni-satin-al/
perde modelleri
instagram takipçi satın al
instagram takipçi satın al
takipçi satın al
instagram takipçi satın al
betboo
marsbahis
sultanbet

Unknown said...

takipçi satın al
takipçi satın al
takipçi satın al

Post a Comment

Ads