I have some coworkers that haven’t worked a lot with sql subqueries. Subqueries are a great tool, but can be confusing for folks who have limited sql experience. It’s my opinion that, like any code, good naming, proper formatting and …Read More
Recently I had a need to assign a user DBO to all databases on a server.
I put this script together, it seems to do the trick.
declare @login varchar(255)='testuser' declare @databasename varchar(255), @sql varchar(max) declare xcn cursor fast_forward local… Read More
To create a CLR stored procedure in SQL Server….
I used this nice blog posting by Scott Sutherland as a starting point:
If you are using SQL Server 2017 it will be necessary to sign your CLR assembly.
If …Read More