Entrepreneurship – A must watch video for CEO’s / Leader’s.

Leadership is nothing but a strong vision, if you have that you can align people, materials, run an organization etc. For vision you need a strong knowledge. Rakesh Gupta (Ex-CEO of ACIS – Allianz Company) is a great Human being than a Leader. His views towards the business are quite different than what the current world is following. It is a great privilege in my life to meet this great corporate leader who has multidimensional thoughts about modern business strategies and also know how to plug in vedic principles in corporate culture. The outcome of his approach is Universal happiness and business growth. I worked under him and I know how he made Allianz (ACIS) – A Great place to work.

Few days back, while I was scrolling my YouTube videos, I came across a wonderful video “The Vedic Leadership – Need of our times by Rakesh Gupta”. It is an awesome video. I suggest this is a must watch video for CEO’s, start-up leaders and for all.

A small story:

Recently I came across a corporate award function and it was  funny. The presenter was saying one of the project managers got the award because he usually calls people at night 1:00 am and asks the status. This is the quality of current leadership in many industries and I strongly believe that we need to change the culture. The leaders who want to grow really from their heart, they can use this video.


SQL Server – How know AlwaysON Failover Time using TSQL

Do you want to know when AlwaysOn failover happened? This is a script which I got from internet and gives good information about the last failovers.


SELECT @FileName = target_data.value('(EventFileTarget/File/@name)[1]', 'nvarchar(4000)')
SELECT CAST(target_data AS XML) target_data
FROM sys.dm_xe_sessions s
JOIN sys.dm_xe_session_targets t
ON s.address = t.event_session_address
WHERE s.name = N'AlwaysOn_health'
) ft;
WITH base
AS (
SELECT XEData.value('(event/@timestamp)[1]', 'datetime2(3)') AS event_timestamp
,XEData.value('(event/data/text)[1]', 'VARCHAR(255)') AS previous_state
,XEData.value('(event/data/text)[2]', 'VARCHAR(255)') AS current_state
SELECT CAST(event_data AS XML) XEData
FROM sys.fn_xe_file_target_read_file(@FileName, NULL, NULL, NULL)
WHERE object_name = 'availability_replica_state_change'
) event_data
JOIN sys.availability_replicas ar
ON ar.replica_id = XEData.value('(event/data/value)[5]', 'VARCHAR(255)')
SELECT DATEADD(HOUR, DATEDIFF(HOUR, GETUTCDATE(), GETDATE()), event_timestamp) AS event_timestamp
FROM base
ORDER BY event_timestamp DESC;