Use case · SQL Server

Run SQL maintenance scripts without the 'oh no' moment.

Invoke-Sqlcmd and dbatools automation, with the SQL inside the query string read as carefully as the PowerShell around it.

No card required. Your script is never executed.

Three patterns we flag

  • Deletes every row

    Invoke-Sqlcmd -Query "DELETE FROM dbo.Events"
  • Drops a database on the wrong instance

    Remove-DbaDatabase -SqlInstance $server -Database $db -Confirm:$false
  • Grants sysadmin to a service login

    Invoke-Sqlcmd -Query "ALTER SERVER ROLE sysadmin ADD MEMBER [svc_app]"

Sample: purge-audit.ps1

Real pattern, synthetic script. SQL changes every row in a table.

Try this sample in the free checker

What we check

  • DELETE and UPDATE without WHERE
  • DROP and TRUNCATE statements
  • Login and server-role changes
  • Instance and database targeting from variables

What we can't know

  • · How many objects match in your environment when it runs
  • · The current state of your environment
  • · Which permissions the account running it actually holds

The script is never run and we never connect to your environment, so every report states what it could not determine.

Check the next script before it runs.