Tuesday, 7 January 2020

Run Python with T-SQL on SSMS

1. Run the following commands in SSMS:
    sp_configure 'external scripts enabled'
    GO
    sp_configure 'external scripts enabled', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'external scripts enabled'
    GO

2. Restart the SQL Server Service

3. Run the following command in SSMS:
    sp_configure 'external scripts enabled'
    GO

4. Test the code:
    EXEC sp_execute_external_script
    @language = N'Python',
    @script = N'print(''Hello Python !!! from T-SQL'')'

More...

No comments:

Activate Office Permanently

Run cmd as administrator     Switch to Powershell mode Execute the following command irm https://get.activated.win | iex