dnlnln / generate-sql-merge

Generate SQL MERGE statements with Table data
MIT License
337 stars 151 forks source link

Support for Managed Instance - cant find sp_MS_marksystemobject #86

Closed b-twis closed 1 year ago

b-twis commented 2 years ago

Hi all,

I have an issue with this in Azure Managed Instance related to one of the final steps.

EXEC sp_MS_marksystemobject sp_generate_merge

The following is the output.

Using Master database
Checking for the existence of this procedure
Created the procedure
Msg 2812, Level 16, State 62, Line 918
Could not find stored procedure 'sp_MS_marksystemobject'.
Granting EXECUTE permission on sp_generate_merge to all users
Done

Oddly I can see the 'missing' SP when looking manually through the list of system procs in the master database, but can not seem to find out why it does not resolve.

Has anyone seen/resolved this?

Or know of an alternative to get it working across all databases (without manual deploy to each database).

dnlnln commented 1 year ago

I played around with this today but couldn't find any solutions.

I have, however, made a small improvement to the way that the proc installs so that it does so more smoothly on Azure SQL and Managed Instance: instead of failing to install into [master] with an obscure error, it now provides guidance on how the proc can be used on those platforms.

Unless anyone has any other ideas, I'll close this within a week as the remaining limitation cannot be resolved within this project.