Shared disks on SQL Server Cluster


Hello my followers today my post is very simple post but more helpful and more important to know by the easiest way what is the shared disks on SQL Server cluster you manage it .

USE master
GO
SELECT *
FROM sys.dm_io_cluster_shared_drives
—-OR
SELECT *
FROM fn_servershareddrives()

this script will return the Shared drive names on your SQL Server cluster

Untitled

Follow the author:

View all my tips , LinkedIn Website Slideshare  , ABOUT ME

How many nodes exist in a SQL Server cluster


Bild_go-cluster+(S.+34)+-+NICHT+IN+SOCIAL+MEDIA+VERWENDEN

Any DBA going for new environment he should know how many nodes Exist in SQL Server Cluster he will mange it so today i will share with small DMV can tell us this information easily without doing more effort

“” SELECT * FROM ::FN_VIRTUALSERVERNODES() “”

DMV Return :

Node Name : the name of the Windows Server (Computer Name)

Status : Sever Status (Ruining / DOWN )

Is Current owner : it will tell you which node your SQL sever up and running on it now

Follow the author:

View all my tips , LinkedIn Website Slideshare  , ABOUT ME

Rolling up multiple rows into a single row


Problem :

I have one table have 30,000 phone Number and i need to path it to SMS services as one row to can send massage for this numbers in one time so i need to return all this rows in one row ,

Solution :

we have two solution either you can return it as XML by using XML Path or using STUFF FUNCTION to return all this rows in one row , Stuff function can be used in more things and this case one of this usage.

STUFF FUNCTION:

The STUFF string function inserts a string into another string.  It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.  The syntax of the STUFF string function is as follows: for more information about STUFF function check this LINK

STUFF ( < character_expression >, < start >, < length >,

< character_expression > )

 DEMO PART

  • Create table name PhoneNumber
  • Insert one record.
  • Filling table by 30.000 Record using Filling Table Stored procedure GO FOR Download (SP after the execute it will print T-SQL Script Execute it to filling the table)
  • Return All record in one row as XML
  • Return all record in one row using stuff function.

Continue reading “Rolling up multiple rows into a single row”

My first technical Video in SQL Server Technology


Hello Guys “a journey of a thousand miles begins with a single step.” based on that i started my journey to MVP award i am now have more than 200 Post in SQL server Technology i am founder of Community SQL Database administration from 2012 and i started today New step to Promote my work I published today my first Technical Video in SQL Server 2014 “How we can crate Clustered Columns Store index on all tables by Single Click” this the Description of the video

Download Scripts : http://sqlserver-performance-tuning.n…

SQL Server Cumulative update package #6 is available now for SQL Server 2014


downloadHello Guys SQL Server 2014 is the latest version from Microsoft SQL Server and it is coming with awoosem enhancement and features and we are still waiting SP 1 but until now still not released only we are updated our enviroment by the latest comulative update package to fix some issues in SQL Server 2014

Now Microsoft announced about SQL Server Cumulative update package 6 for more information about the Hotfixes that are included in this cumulative update package check this link.including nearly 400 fixes and enhancements

and for more information about the Latest Builds of SQL Server 2014 check this post for sqlsentry Community

  • KB Article: KB #3031047
  • 64 fixes total (55 fixes listed publicly at time of publication)
  • Build number is 12.0.2480
  • Relevant for @@VERSION 12.0.2000 through 12.0.2479

Follow the author:

View all my tips , LinkedIn Website Slideshare