<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQLRDS Monitor</title>
	<atom:link href="https://sqlrds.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://sqlrds.com/</link>
	<description>Australia by DBInsight</description>
	<lastBuildDate>Tue, 26 Nov 2019 08:07:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.5</generator>

<image>
	<url>https://sqlrds.com/wp-content/uploads/2019/07/index.png</url>
	<title>SQLRDS Monitor</title>
	<link>https://sqlrds.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SQL Server Database Space Monitoring and Forecasting</title>
		<link>https://sqlrds.com/sql-server-database-space-monitoring-and-forecasting/</link>
					<comments>https://sqlrds.com/sql-server-database-space-monitoring-and-forecasting/#respond</comments>
		
		<dc:creator><![CDATA[Rob Risetto]]></dc:creator>
		<pubDate>Tue, 26 Nov 2019 07:58:35 +0000</pubDate>
				<category><![CDATA[Database Monitoring]]></category>
		<category><![CDATA[Database Space Forecasting]]></category>
		<category><![CDATA[Monitoring]]></category>
		<guid isPermaLink="false">https://sqlrds.com/?p=174</guid>

					<description><![CDATA[<p>You know your database is growing&#160; but you are not sure over the last 6 – 12 months how fast? Will you run out disk space capacity for your databases or/and backups in the near future? These questions are easy to answer if you have a SQL monitoring system in place or if you use [&#8230;]</p>
<p>The post <a href="https://sqlrds.com/sql-server-database-space-monitoring-and-forecasting/">SQL Server Database Space Monitoring and Forecasting</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>You know your database is growing&nbsp; but you are not sure over the last 6 – 12
months how fast?</p>



<p>Will you run out disk space capacity for your databases
or/and backups in the near future?</p>



<p>These questions are easy to answer if you have a SQL monitoring
system in place or if you use <strong>DBInsight’s SQL monitoring service (SQLRDS)</strong>.
</p>



<p>But what if you don’t have the monitoring tools in place or
utilise a service like <strong>DBInsight’s monitoring service (SQLRDS)</strong>?</p>



<p>Well, all is not lost if you have the SQL Server Error Log
files that cover at least a few weeks to a few months. Here’s how to measure
your database growth using your SQL Server Error logs.</p>



<p>Note that every time a full database backup is created a
message is written to the SQL Server like below.</p>



<p>Database backed up. Database: XXXXX,
creation date(time): 2019/10/10(13:29:22), <br>
<strong>pages dumped: 2159831</strong></p>



<p>The relevant component of the message is the <strong>pages dumped</strong>
value. So, if we can harvest the <strong>pages dump</strong> value over a number weeks or
months then we have a ready made indicator of database growth. </p>



<p>The pages dumped can be converted to a MB or GB value – note
1 page = 8KB. The calculation for above is </p>



<p><strong>2159831 pages x 8KB = 17278648 KB or 16873 MB or 16.4 GB</strong></p>



<p>You can use a Powershell script to harvest all pages dumped
values for each database in all of your SQL Server Error log files</p>



<p>Typically, I would copy the SQL Server error logs into a
temporary folder and then point the Powershell script to that folder. It will
produce a CSV file like below, showing the database name, date of full backup
and pages dump.</p>



<p>Here’s a script that I use. </p>



<p><strong>#Database backed up. Database: XXXXXXXX, creation date(time): 2019/08/14(17:11:47), pages dumped: 409252</strong></p>



<p>$ErrorlogDir
= &#8220;C:\temp \errorlogs&#8221;</p>



<p><strong># Get Errorlog files in $ErrorlogDir</strong><br>$ErrorLogs =&nbsp; Get-ChildItem $ErrorlogDir | Where-Object {$_.name -like &#8220;*errorlog*&#8221; }&nbsp; </p>



<p>foreach
($File in $ErrorLogs)</p>



<p>{</p>



<p>&nbsp; $ErrFile = $File.fullname</p>



<p>&nbsp; Write-Host &#8220;&#8211;&gt; Processing
$ErrFile&#8221;</p>



<p>&nbsp; <strong># Parse the error log file</strong></p>



<p>&nbsp; get-content $ErrFile | foreach-object {if ($_
-like &#8220;*Database backed up. Database: *&#8221;) `</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{$_.substring($_.indexof(&#8220;Database backed up. Database: &#8220;)+30,
$_.indexof(&#8220;creation date(time): &#8220;)-$_.indexof(&#8220;Database backed
up. Database: &#8220;)-32) + &#8220;,&#8221; `</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +
$_.substring(0,10) + &#8220;,&#8221; `</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +
$_.substring($_.indexof(&#8220;pages dumped: &#8220;)+14, $_.indexof(&#8220;first
LSN:&#8221;)-$_.indexof(&#8220;pages dumped: &#8220;)-16) } } | add-content
&#8220;C:\temp\backupinfo.csv&#8221;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>



<p>}</p>



<p>You then open the CSV file in Excel and perform the Pages to MB or GB calculation, from there you can use Excel to predict the future database data file size over the desired period.</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="241" height="602" src="https://sqlrds.com/wp-content/uploads/2019/11/DBspaceusage.png" alt="" class="wp-image-175" srcset="https://sqlrds.com/wp-content/uploads/2019/11/DBspaceusage.png 241w, https://sqlrds.com/wp-content/uploads/2019/11/DBspaceusage-120x300.png 120w" sizes="(max-width: 241px) 100vw, 241px" /></figure>
<p>The post <a href="https://sqlrds.com/sql-server-database-space-monitoring-and-forecasting/">SQL Server Database Space Monitoring and Forecasting</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlrds.com/sql-server-database-space-monitoring-and-forecasting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Availability Group Heath Monitoring</title>
		<link>https://sqlrds.com/availability-group-health-monitoring/</link>
					<comments>https://sqlrds.com/availability-group-health-monitoring/#respond</comments>
		
		<dc:creator><![CDATA[Rob Risetto]]></dc:creator>
		<pubDate>Thu, 11 Jul 2019 01:51:51 +0000</pubDate>
				<category><![CDATA[Availability Group]]></category>
		<category><![CDATA[Monitoring]]></category>
		<guid isPermaLink="false">http://166.62.27.150/~jg05syc23s7n/?p=37</guid>

					<description><![CDATA[<p>Like most monitoring systems these days the SQLRDS monitor has a number of availability group (AG) health checks and alerts built in. However, what if you don’t have a monitoring system in place but you have deployed an availability group or BAG (if running Standard Edition). Checking the health of the AG on a continuous [&#8230;]</p>
<p>The post <a href="https://sqlrds.com/availability-group-health-monitoring/">Availability Group Heath Monitoring</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading"></h1>



<p>Like most monitoring systems these days the <strong>SQLRDS
monitor</strong> has a number of availability group (AG) health checks and alerts
built in. However, what if you don’t have a monitoring system in place but you
have deployed an availability group or BAG (if running Standard Edition).</p>



<p>Checking the health of the AG on a continuous basis is very important, otherwise, you may find your environment is not in a state to failover at that crucial moment. </p>



<p>You can still get alerts about your AG health and status, even if you are not using a full feature monitoring system like <strong>SQLRDS Monitor</strong>. This simple solution is based on the Database Mail component to send out alerts that are generated by :-</p>



<ul><li>An SQL Agent job that runs an AG health check script every 15 minutes. The script will alert if the AG is <strong>not healthy</strong> or if the <strong>Log Send Queue</strong> is greater than a threshold (20000 KB).</li><li>SQL Server Alerts that checks for the <strong>change of AG roles</strong> i.e. a failover has occurred.</li></ul>



<h2 class="wp-block-heading">AG Health Script</h2>



<p>Create a SQL Agent job on each server of the Availability Group configuration and run the job every 15 minutes. Configure the AG Health Check script below as a TSQL Job Step.</p>



<p>&#8212; Configure values</p>



<p>Declare @ToMail varchar(max) = &#8216;<strong>&lt;Your Email Address&gt;</strong>&#8216;</p>



<p>Declare @DBMailprofile varchar(128) = &#8216;<strong>&lt;Your Database Mail Profile Name&gt;</strong>&#8216;</p>



<p>&#8212; Standard Declares</p>



<p>Declare @ErrorMsg varchar(8000) = &#8221;</p>



<p>Declare @QueryStr nvarchar(max) = &#8221;</p>



<p>Declare @ag_replica_server varchar(128) = &#8221;</p>



<p>Declare @database_name varchar(128) = &#8221;</p>



<p>set nocount on</p>



<p>&#8212; Get Health Data</p>



<p>SELECT ag.name AS ag_name, ar.replica_server_name AS ag_replica_server, </p>



<p>ag_replica_role = CASE</p>



<p>WHEN ar_state.role_desc IS NULL THEN N&#8217;DISCONNECTED&#8217;</p>



<p>ELSE ar_state.role_desc </p>



<p>END, db_name(dr_state.database_id) as database_name,</p>



<p>dr_state.synchronization_state_desc,
dr_state.is_suspended, dr_state.synchronization_health_desc, </p>



<p>dr_state.suspend_reason_desc, isnull(dr_state.secondary_lag_seconds,0) secondary_lag_seconds, </p>



<p>isnull(dr_state.log_send_queue_size,0) log_send_queue_size, isnull(dr_state.redo_queue_size,0) redo_queue_size</p>



<p>into #AGStatus</p>



<p>FROM (( sys.availability_groups AS ag JOIN sys.availability_replicas AS ar ON ag.group_id = ar.group_id )</p>



<p>JOIN sys.dm_hadr_availability_replica_states
AS ar_state&nbsp; ON
ar.replica_id = ar_state.replica_id)</p>



<p>JOIN sys.dm_hadr_database_replica_states
dr_state on</p>



<p>ag.group_id
= dr_state.group_id and dr_state.replica_id = ar_state.replica_id</p>



<p>where ar_state.is_local = 1 &#8212; check local server only</p>



<p>&#8212; used to put output in DBMail alert</p>



<p>Set @QueryStr= &#8216;SELECT ag.name AS ag_name,
ar.replica_server_name AS ag_replica_server, </p>



<p>ag_replica_role = CASE WHEN ar_state.role_desc IS
NULL THEN N&#8221;DISCONNECTED&#8221; ELSE ar_state.role_desc END, </p>



<p>db_name(dr_state.database_id) as database_name,
dr_state.synchronization_state_desc, dr_state.is_suspended, </p>



<p>dr_state.synchronization_health_desc,
dr_state.suspend_reason_desc, isnull(dr_state.secondary_lag_seconds,0)
secondary_lag_seconds, </p>



<p>isnull(dr_state.log_send_queue_size,0)
log_send_queue_size, isnull(dr_state.redo_queue_size,0) redo_queue_size </p>



<p>FROM (( sys.availability_groups AS ag JOIN
sys.availability_replicas AS ar ON ag.group_id = ar.group_id ) </p>



<p>JOIN sys.dm_hadr_availability_replica_states AS
ar_state&nbsp; ON ar.replica_id =
ar_state.replica_id) </p>



<p>JOIN sys.dm_hadr_database_replica_states dr_state on
ag.group_id = dr_state.group_id and dr_state.replica_id = ar_state.replica_id
where ar_state.is_local = 1&#8242;</p>



<p>If exists (select * from #AGStatus where synchronization_health_desc &lt;&gt; &#8216;HEALTHY&#8217; or synchronization_state_desc &lt;&gt; &#8216;SYNCHRONIZED&#8217; or is_suspended = 1)</p>



<p>begin</p>



<p>&nbsp;&nbsp; select top 1 @database_name = [database_name],&nbsp; @ag_replica_server =&nbsp; ag_replica_server </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from
#AGStatus</p>



<p>&nbsp;&nbsp; Set @ErrorMsg = &#8216;AG Issue Found &#8211; Databases on
&#8216; + @ag_replica_server + &#8216; are NOT Healthy&#8217; </p>



<p>&nbsp;&nbsp; EXEC msdb.dbo.sp_send_dbmail @profile_name = @DBMailprofile, @recipients = @ToMail, @subject = @ErrorMsg, @Query = @QueryStr, @attach_query_result_as_file
= 0, @query_result_width = 1024</p>



<p>end</p>



<p>&#8212; Check log send queue size &#8211; if bigger
than 20MB then alert</p>



<p>If exists (select * from #AGStatus where log_send_queue_size &gt;= 20000&nbsp; )</p>



<p>begin</p>



<p>&nbsp;&nbsp; select top 1 @database_name = [database_name],&nbsp; @ag_replica_server =&nbsp; ag_replica_server </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from
#AGStatus</p>



<p>&nbsp;&nbsp; Set @ErrorMsg = &#8216;AG Issue Found &#8211; Databases on
&#8216; + @ag_replica_server + &#8216; have a LOG SEND QUEUE &gt;=
20000&#8217; </p>



<p>&nbsp;&nbsp; EXEC msdb.dbo.sp_send_dbmail @profile_name = @DBMailprofile, @recipients = @ToMail, @subject = @ErrorMsg, @Query = @QueryStr , @attach_query_result_as_file
= 0, @query_result_width = 1024</p>



<p>end</p>



<p>&#8212; End AG Health Check</p>



<h2 class="wp-block-heading">SQL Server Alert Definitions</h2>



<p>The following script will define 3 x SQL Server Alerts to determine if an AG role change has occurred or if data movement was suspended or resumed. The script also adds the Alerts to the specified SQL Operator for email notifications. </p>



<p>Note Database Mail, the Alerts and SQL Operator need to be configured on each server of the AG configuration.</p>



<p>&#8212; 1480 &#8211; AG Role Change (failover)</p>



<p>EXEC msdb.dbo.sp_add_alert</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @name = N&#8217;AG Role Change&#8217;,</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@message_id = 1480,</p>



<p>&nbsp;&nbsp;&nbsp;
@severity = 0,</p>



<p>&nbsp;&nbsp;&nbsp;
@enabled = 1,</p>



<p>&nbsp;&nbsp;&nbsp;
@delay_between_responses = 60,</p>



<p>&nbsp;&nbsp;&nbsp;
@include_event_description_in =
1;</p>



<p>GO</p>



<p>EXEC msdb.dbo.sp_add_notification </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @alert_name = N&#8217;AG Role Change&#8217;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @operator_name = N&#8217;<strong>&lt;YourSQLOperator&gt;</strong>&#8216;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@notification_method = 1; </p>



<p>GO</p>



<p>&#8212; 35264 &#8211; AG Data Movement &#8211; Suspended</p>



<p>EXEC msdb.dbo.sp_add_alert</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @name = N&#8217;AG Data Movement &#8211; Suspended&#8217;,</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@message_id = 35264,</p>



<p>&nbsp;&nbsp;&nbsp;
@severity = 0,</p>



<p>&nbsp;&nbsp;&nbsp;
@enabled = 1,</p>



<p>&nbsp;&nbsp;
@delay_between_responses = 60,</p>



<p>&nbsp;&nbsp;&nbsp;
@include_event_description_in =
1;</p>



<p>GO</p>



<p>EXEC msdb.dbo.sp_add_notification </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @alert_name = N&#8217;AG Data Movement &#8211; Suspended&#8217;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @operator_name = N&#8217;<strong>&lt;YourSQLOperator&gt;</strong>&#8216;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@notification_method = 1; </p>



<p>GO</p>



<p>&#8212; 35265 &#8211; AG Data Movement &#8211; Resumed</p>



<p>EXEC msdb.dbo.sp_add_alert</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @name = N&#8217;AG Data Movement &#8211; Resumed&#8217;,</p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@message_id = 35265,</p>



<p>&nbsp;&nbsp;&nbsp;
@severity = 0,</p>



<p>&nbsp;&nbsp;&nbsp;
@enabled = 1,</p>



<p>&nbsp;&nbsp;&nbsp;
@delay_between_responses = 60,</p>



<p>&nbsp;&nbsp;&nbsp;
@include_event_description_in =
1;</p>



<p>GO</p>



<p>EXEC msdb.dbo.sp_add_notification </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @alert_name = N&#8217;AG Data Movement &#8211; Resumed&#8217;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @operator_name = N&#8217;<strong>&lt;YourSQLOperator&gt;</strong>&#8216;, </p>



<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@notification_method = 1; </p>



<p>GO</p>
<p>The post <a href="https://sqlrds.com/availability-group-health-monitoring/">Availability Group Heath Monitoring</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlrds.com/availability-group-health-monitoring/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Analysis Services Diagnostics</title>
		<link>https://sqlrds.com/analysis-services-diagnostics/</link>
					<comments>https://sqlrds.com/analysis-services-diagnostics/#respond</comments>
		
		<dc:creator><![CDATA[Rob Risetto]]></dc:creator>
		<pubDate>Tue, 09 Jul 2019 18:06:55 +0000</pubDate>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[Monitoring]]></category>
		<guid isPermaLink="false">http://166.62.27.150/~jg05syc23s7n/?p=1</guid>

					<description><![CDATA[<p>Analysis Services diagnostics can be a real pain at times, trying to understand why processing is not advancing or why a cube query is not coming back in a timely manner. Here&#8217;s some of the get out of jail diagnostics queries for SSAS that I gleamed from respected SSAS gurus. Ever encountered a GB+ sized [&#8230;]</p>
<p>The post <a href="https://sqlrds.com/analysis-services-diagnostics/">Analysis Services Diagnostics</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Analysis Services diagnostics can be a real pain at times, trying to understand why processing is not advancing or why a cube query is not coming back in a timely manner. Here&#8217;s some of the get out of jail diagnostics queries for SSAS that I gleamed from respected SSAS gurus.</p>



<p>Ever encountered a GB+ sized SSAS log file, well this Powershell command provides a quick way to check the tail of the log.</p>



<p> I’m showing the last 500 lines</p>



<p>Enter Powershell prompt, then run<br><code>get-content &lt;yourpath&gt;\OLAP\Log\msmdsrv.log -tail 500</code> </p>



<p>Got some locking going on?  Connect to SSAS via SSMS and run the following query.</p>



<p><code>select * from $system.discover_locks</code></p>



<p>You may need to know the commands and sessions also</p>



<p><code>select * from $system.discover_sessions</code></p>



<p><code>select * from $system.discover_connections</code></p>



<p><code>select * from $system.discover_commands</code></p>



<p>The below query combines some of the internal views for a more convenient check and allows you to run from a standard Query Window connected to a SQL Server Engine.</p>



<p>Create a linked server on a SQL Server, replace the linked server name in the definition and then run the below query to create the linked server.<br><code>EXEC master.dbo.sp_addlinkedserver @server = N'SSASCheck', @srvproduct='MSOLAP', @provider=N'MSOLAP', <br>@datasrc=N'&lt;</code><strong><code>Your SSAS server name</code></strong><code>&gt;'</code></p>



<p>Then run the Openquery statement below to combine data from some of the relevant SSAS internal views.</p>



<p>SELECT ssasSessions.SESSION_SPID AS [SPID],</p>



<p>ssasSessions.SESSION_USER_NAME AS [User ID],</p>



<p>ssasSessions.SESSION_CURRENT_DATABASE AS [Database],</p>



<p>ssasConnections.connection_host_name AS &#8216;Client IP address&#8217;,</p>



<p>ROUND(CAST(ssasCommands.COMMAND_CPU_TIME_MS AS int)/1000, 2) AS [Command Time(in sec)],</p>



<p>ssasCommands.COMMAND_START_TIME AS [Command Start Time],</p>



<p>ssasCommands.COMMAND_END_TIME AS [Command End Time],</p>



<p>ssasCommands.COMMAND_TEXT AS [MDX Command],</p>



<p>connection_host_application AS &#8216;Application&#8217;,</p>



<p>CHARINDEX(&#8221;,ssasCommands.COMMAND_TEXT) AS ProcessRunning</p>



<p>FROM OPENQUERY( SSASCheck ,&#8217;select * from $system.discover_sessions&#8217;) AS ssasSessions</p>



<p>LEFT JOIN OPENQUERY(SSASCheck,&#8217;select * from $system.discover_commands&#8217;) AS ssasCommands ON ssasSessions.SESSION_SPID = ssasCommands.SESSION_SPID</p>



<p>LEFT JOIN OPENQUERY( SSASCheck ,&#8217;select * from $system.discover_connections&#8217;) AS ssasConnections ON ssasSessions.SESSION_connection_id = ssasConnections.connection_id</p>



<p>ORDER BY [Command Start Time] DESC</p>
<p>The post <a href="https://sqlrds.com/analysis-services-diagnostics/">Analysis Services Diagnostics</a> appeared first on <a href="https://sqlrds.com">SQLRDS Monitor</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlrds.com/analysis-services-diagnostics/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
