• But you do have access to read the SQL that is run. You can setup an Extended Events session or a Server-side Trace to capture all SQL statements issued against the server when you run the process in non-prod. You could do this while the process runs as a sysadmin to see all commands, or run it as only a db_owner where the last (or close to the last) statement to start will be the one that causes the permissions error 😉

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato