Windows 10 Pro, Python 3.9, SQL Server 2012.
I have written a bunch of Windows-based Python scripts over the years. One aspect, I use the pypyodbc library to insert data harvested via Python into SQL Server. This has been working well for years whether my Python script is run from the Python IDLE or if the Python script is run from the command line via a Windows batch (.bat) file for automation. 
I recently introduced calling a, fully operational, SQL Server stored procedure from my Windows-based Python script that is already doing SQL Server inserts successfully. When I run my Python script from the Python IDLE, the SQL Server inserts and the stored procedure runs successfully.
PROBLEM: when I run my Python script via a Windows batch (.bat) file, the SQL Server inserts are successful but the stored procedure does not run. I have also tried "Run as administrator" for the .bat file invoking my Python script. Still, the stored procedure will not run.
Given the SQL Server inserts are successful no matter what and the stored procedure WILL ONLY run when originating the Python script via the Python IDLE, perhaps this problem is a Windows configuration issue?
Thanks in advance for any guidance.
I located the problem. It was a permissions problem in SQL Server. This is now closed. Thanks.
Windows Python - invoking SQL Server stored procedure works only in Python IDLE