<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Find user that ran a specific dbquery in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123617#M184218</link>
    <description>&lt;P&gt;This works for me to find queries on any database in the instance. I'm sysadmin on the instance (check your priviledges):&lt;/P&gt;

&lt;P&gt;SELECT deqs.last_execution_time AS [Time], dest.text AS [Query], dest.*&lt;BR /&gt;
FROM sys.dm_exec_query_stats AS deqs&lt;BR /&gt;
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest&lt;BR /&gt;
WHERE dest.dbid = DB_ID('msdb')&lt;BR /&gt;
ORDER BY deqs.last_execution_time DESC&lt;/P&gt;

&lt;P&gt;This is the same answer that Aaron Bertrand provided but it wasn't placed in an answer.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:57:15 GMT</pubDate>
    <dc:creator>MythiliIyer</dc:creator>
    <dc:date>2020-09-28T16:57:15Z</dc:date>
    <item>
      <title>Find user that ran a specific dbquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123615#M184216</link>
      <description>&lt;P&gt;I need to find which user ran a specific dbquery such as 'select * from table1'. Can someone tell me how to search splunk for this?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
   j&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jun 2014 04:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123615#M184216</guid>
      <dc:creator>jcrane</dc:creator>
      <dc:date>2014-06-28T04:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Find user that ran a specific dbquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123616#M184217</link>
      <description>&lt;P&gt;Splunk keeps all issued searches in its _audit index, so you can look there. Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action=search info=granted search="*select * from table1*"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Jun 2014 07:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123616#M184217</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-06-28T07:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Find user that ran a specific dbquery</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123617#M184218</link>
      <description>&lt;P&gt;This works for me to find queries on any database in the instance. I'm sysadmin on the instance (check your priviledges):&lt;/P&gt;

&lt;P&gt;SELECT deqs.last_execution_time AS [Time], dest.text AS [Query], dest.*&lt;BR /&gt;
FROM sys.dm_exec_query_stats AS deqs&lt;BR /&gt;
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest&lt;BR /&gt;
WHERE dest.dbid = DB_ID('msdb')&lt;BR /&gt;
ORDER BY deqs.last_execution_time DESC&lt;/P&gt;

&lt;P&gt;This is the same answer that Aaron Bertrand provided but it wasn't placed in an answer.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Find-user-that-ran-a-specific-dbquery/m-p/123617#M184218</guid>
      <dc:creator>MythiliIyer</dc:creator>
      <dc:date>2020-09-28T16:57:15Z</dc:date>
    </item>
  </channel>
</rss>

