Sample Header Ad - 728x90

How to resolve an access issue while running SQL Server Agent to execute a Python?

0 votes
1 answer
32 views
I am trying to use SQL Server Agent to execute a Python file. I am executing Python file using a Powershell script. When I ran the SQL Server Agent job, error message says: Message Executed as user: NT Service\SQLAgent$SQL2022. Start-Process : This command cannot be run due to the error: "Access is denied At F:\xx.ps1:5 char:1 + Start-Process C:\Users\jdoe\AppData\Local\Programs\Python\Python312\p ... + I am thinking this happens because I originally installed Python using my own local access (username: jdoe). Today, I asked our IT to install as Admin. Currently, python is installed in two locations: (When I installed myself originally): C:\Users\jdoe\AppData\Local\Programs\Python\Python312\python.exe (When IT just installed today): C:\Program Files\Python313\python.exe What do I need to do run Python code SQL Server Agent? Where do I have to configure?
Asked by Java (253 rep)
Jun 27, 2025, 09:05 PM
Last activity: Jun 28, 2025, 05:23 AM