I have to register a DLL in a SQL Server from a legacy project, the bad thing is that I don't have the DLL nor the source code, just what I have is the binary string obtained from the Create Scripts option on my database. I'm trying to use the following code:
USE [master]
DECLARE @CurrentUserName varchar(MAX)
SET @CurrentUserName = SUSER_SNAME()
SELECT @CurrentUserName
GRANT UNSAFE ASSEMBLY TO @CurrentUserName
The last line is giving me an error:
Incorrect syntax near @CurrentUserName. Expecting ID, NULL, PUBLIC or QUOTED_ID
I'm creating this script for giving my new team members a script to setup their DEV environments the first day without giving them a large manual with instructions because we learned that as our process of setup is huge many mistakes happen.
Thanks for your help!