Hi Erland, hi Cathyji,
We've reinstalled Python services in SQL Server and that resolved the issue, SSMS now consistently returns results of Python scripts.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all,
I'm running the simplest Python script in SQL Server Management Studio:
exec sp_execute_external_script
@language = N'Python',
@script = N'print("hello")
'
but the results are outright inconsistent.
Sometimes I get:
"STDOUT message(s) from external script:
hello"
other times I get:
"Commands completed successfully."
It's totally random.
Why is this so? This compromises any hopes for running Python in SQL Server for us.
SQL Server 2017
SSMS v 18.2
Many thanks in advance.
Hi Erland, hi Cathyji,
We've reinstalled Python services in SQL Server and that resolved the issue, SSMS now consistently returns results of Python scripts.
Hi @piotr krudysz ,
I test this in my environment, it works well in my environment. Run this scripts many times, only get one result. I am using SSMS 18.11 and SQL server 2019.
Suggest you using the latest SSMS 18.11.1 as Erland mentioned. If it is still not work, please let us know.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".