Skip to content

or-tools called from SQL Server 2022 not working #3688

Discussion options

You must be logged in to vote

Ok, I managed to get the SQL Server 2022 solve working using a .mps file in the following way:

  1. Put a custom .py file that does the SCIP solve in in the library of the SQL Python runtime environment.
  2. Export an .mps file to the same directory
  3. Call the custom .py from SQL using the sp_execute_external_script procedure to populate a pandas df

Herewith the T-SQL:

------------Solve MPS via wrapper py file---

-- To allow advanced options to be changed.  
EXECUTE sp_configure 'show advanced options', 1;  
GO  
-- To update the currently configured value for advanced options.  
RECONFIGURE;  
GO  
-- To enable the feature.  
EXECUTE sp_configure 'xp_cmdshell', 1;  
GO  
-- To update the current…

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dawiepoolman
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dawiepoolman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3687 on February 25, 2023 11:19.