5 ms·
Another nice aspect of this is the tooling (Dlls) can be programmed yourself with a .NET language. Ive used the same tooling to build a pre-deploy check for any
by windowsworkstoo 7y ago
Another nice aspect of this is the tooling (Dlls) can be programmed yourself with a .NET language. Ive used the same tooling to build a pre-deploy check for any suspicious DROPs and ALTERs that force manual intervention - it gives you the ability to parse T-SQL exactly how the engine will do it.
- Pxtl 7y agoWait, so instead of using SqlPackage.exe you're using the .NET objects to do the deployment, and are auditing the changes as you deploy them? That's cool! Anything posted public on this?
- windowsworkstoo 7y agoNothing public and the assembly is basically undocumented but it's basically start with this assembly and go down the rabbit hole :) https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.transactsql.scriptdom.tsql130parser.-ctor?view=sql-dacfx-140.3881.1 https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlser... Our use case is SqlPackage builds the diff SQL, then we sanity check it using our custom code built on that parse for any DROPs / ALTERs and log/notify for confirmation