<?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: How to prevent users from scheduling SQL queries? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/3812#M26</link>
    <description>&lt;P&gt;@Paulo Rijnberg​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Databricks, you can use the following approaches to prevent users from scheduling SQL queries and to receive notifications when such queries are scheduled:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Cluster-level permissions&lt;/LI&gt;&lt;LI&gt;Jobs API&lt;/LI&gt;&lt;LI&gt;Notification hooks&lt;/LI&gt;&lt;LI&gt;Audit logs and monitoring&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2023 12:21:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-06-20T12:21:32Z</dc:date>
    <item>
      <title>How to prevent users from scheduling SQL queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/3811#M25</link>
      <description>&lt;P&gt;We have noticed that users can schedule SQL queries, but currently we haven't found a way to find these scheduled queries (this does not show up in the jobs workplane). Therefore, we don't know that people scheduled this. The only way is to look at the warehouse query histories, which is not the solution since it requires manual work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, we would like to prevent these from happening. Therefore, we are looking for a solution to disable this or to get a notification once people start scheduling queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone got any ideas how to realise this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 12:49:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/3811#M25</guid>
      <dc:creator>pauloquantile</dc:creator>
      <dc:date>2025-03-21T12:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent users from scheduling SQL queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/3812#M26</link>
      <description>&lt;P&gt;@Paulo Rijnberg​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Databricks, you can use the following approaches to prevent users from scheduling SQL queries and to receive notifications when such queries are scheduled:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Cluster-level permissions&lt;/LI&gt;&lt;LI&gt;Jobs API&lt;/LI&gt;&lt;LI&gt;Notification hooks&lt;/LI&gt;&lt;LI&gt;Audit logs and monitoring&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:21:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/3812#M26</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-06-20T12:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent users from scheduling SQL queries?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/165040#M2669</link>
      <description>&lt;P&gt;We ran into a similar governance concern and looked at it from both a prevention and a monitoring perspective.&lt;/P&gt;&lt;P&gt;From what we've seen, scheduled SQL queries are different from the traditional Jobs that users create in the Jobs UI, which makes them harder to discover through normal operational monitoring. Relying on SQL Warehouse query history is possible, but it's manual and doesn't scale.&lt;/P&gt;&lt;P&gt;A few approaches that may help:&lt;/P&gt;&lt;P&gt;1. Restrict who can create scheduled queries (preferred)&lt;BR /&gt;If your organization doesn't want users creating their own scheduled SQL queries, the simplest solution is to limit scheduling capabilities to a specific group while allowing others to run queries interactively.&lt;/P&gt;&lt;P&gt;2. Monitor scheduled queries programmatically&lt;BR /&gt;Instead of checking query history, periodically query the Databricks Jobs metadata (or use the Jobs REST API) to identify jobs that contain SQL tasks. Run this on a schedule (for example, hourly or daily), compare it with the previous snapshot, and alert when new scheduled queries are created or existing ones are modified.&lt;/P&gt;&lt;P&gt;3. Use audit logs&lt;BR /&gt;If audit logging is enabled in your workspace, this is a good place to monitor schedule creation and other administrative events. It provides a much better governance trail than manually inspecting query history.&lt;/P&gt;&lt;P&gt;4. Governance by policy&lt;BR /&gt;In some organizations, scheduled queries are only created through an approved deployment process (for example, Infrastructure as Code or an internal request workflow), rather than allowing ad hoc scheduling by individual users.&lt;/P&gt;&lt;P&gt;If your primary goal is governance, I'd recommend combining permission restrictions with automated monitoring. That gives you both prevention and visibility without requiring someone to manually inspect warehouse query history.&lt;/P&gt;&lt;P&gt;I'd also be interested to hear if anyone has found a built-in way to enumerate scheduled SQL queries directly, as that would certainly simplify this use case.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2026 14:59:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-to-prevent-users-from-scheduling-sql-queries/m-p/165040#M2669</guid>
      <dc:creator>TheDataMaverick</dc:creator>
      <dc:date>2026-08-06T14:59:30Z</dc:date>
    </item>
  </channel>
</rss>

