05/14/2020
Carl Neal - Senior Cloud Solution Architect at Microsoft
-
Create the SQL MI Instance
a. I enabled Public endpoint so I can work on this locally for my computerb. Go to the NSG and create an Inbound firewall rule to allow your Personal IP Address to Access on port 3342 (This allows remote connections from SSMS)
-
Connect to the SQL MI Instance from SSMS v18.5
a. Connection should look like > "sqlmi-samplename.public.f2a1e029dfs8251.database.windows.net,3342" > (make sure to add the ,3342 ) -
Enable clr and strict security
EXEC sp_configure 'show advanced options', 1; RECONFIGURE;sp_configure 'clr enabled', 1 RECONFIGURE
sp_configure 'clr strict security', 0 RECONFIGURE
-
Confirm the SQL MI .Net Framework Runtime Version
a. SELECT olm.[name], olm.[file_version]
> FROM sys.dm_os_loaded_modules olm
> WHERE olm.[name] LIKE N'%mscoreei.dll%';
-
Create the database in SQL MI that you plan on deploying the CLR too
-
Create a Visual Studio SQL Server Database Project
-
Add a new SQL CLR C# item by Right Clicking VS Project -> Add -> New Item -> SQL CLR C# (or you can go to Project -> Add New -> Item from task bar)

-
Ensure that the target server SQL Server version matches the > database created above (Right Click Project -> Properties -> Project Settings)

-
Confirm that the .NET Framework Version matches that of the SQL MI > Instance

-
Publish the CLR to the SQL MI Instance (Right click -> Publish)
a. Add the credentials to the Target Database connection and test > connection to confirm access (add the ,3342 to the connection > string) -
Confirm that the CLR Assembly was appropriately added to the SQL MI Instance

###To Deploy a CLR Assembly with External_Access###


