Questions tagged [sql-clr]
SQL CLR is Microsoft's Common-Language-Runtime implementation for SQL Server. Use this tag for questions about how to implement and troubleshoot SQLCLR on Microsoft SQL Server.
137 questions
9
votes
3
answers
1k
views
Azure SQL Database CLR functions are working
I'm in the middle of migrating a database to Azure SQL Database. I was reading about the differences between Azure SQL Database and Azure Managed Instance and noticed that CLR functions are NOT ...
3
votes
2
answers
479
views
How can I access SQLCLR assembly functions in MySQL
We have an SQLCLR assembly (DLL-file) built in C# that contains about 100 functions
that we call from store procedures in SQL Server databases.
Is is possible to call these functions in MySQL store ...
2
votes
2
answers
2k
views
Security Considerations/Risks/Best Practices for Enabling CLR Integration (Assemblies) for SSIS Catalog
The major pre-requisite in utilizing SSIS Catalog is enabling CLR Integration. The instance in question is running SQL Server 2014. I'm looking for feedback and resources I can mine which specifically ...
5
votes
1
answer
16k
views
How to register CLR assembly as trusted in SSDT deployment
I have CLR assembly in SSDT and to deploy that it has to be trusted. What I understand there are 4 options how to do that
First option, use TRUSTWORTHY
EXEC sp_configure 'clr enabled', 1;
...
1
vote
1
answer
8k
views
Sql Server 2019, migrating clr assemblies, clr strict security
We have some old code running in Sql Server 2008 servers, and we're looking to upgrade to Sql Server 2019. The old clr code is really old (like .net framework 2.0 old), so I knew I'd have to rebuild ...
1
vote
0
answers
148
views
Service Broker's SEND statement causes security context switch
We have triggers in multiple tables that will send messages to a Service Broker service upon INSERT, UPDATE and DELETE operations. These operations may be nested as parts of bigger, transactional ...
3
votes
2
answers
720
views
Is using CLR for regular expressions safer than using external scripts?
Problem
The main problem we need to use regular expression on MS SQL Server 2019, with the capability
of at least the level on the POSIX Regular expression.
Possible solutions
This Q/A from ...
2
votes
1
answer
344
views
SQL Server Assembly on Failover cluster after Framework update
We have database that relies on a CLR assembly. The assembly references other assemblies. After a Windows Framework update we need to drop and reinstall the assembly to have it work.
Now the issue is ...
0
votes
1
answer
275
views
MS SQL - CLR Stored Procedure runs as deleted user
I have a SQL Server 2017 database which contains some CLR stored procedures. When trying to call those CLR SP's, I get a "login failed" error back from the CLR SP.
My user is connected and works ...
5
votes
1
answer
1k
views
System.Web in SQL Server CLR Function
I have done some light research into this topic and I would like to know what are all the pro's and con's or enabling/registering this particular .dll within SQL Server?
Back information - we are ...
2
votes
2
answers
445
views
How to make Indexed Views work for SQLCLR?
In SQL Server, the indexed view is a hellscape of limitations. But I need one. I have a formatter SQLCLR function that creates a prettified version of a domain key - users want to be able to search ...
8
votes
3
answers
17k
views
Access to the path 'c:\some\path' is denied for MSSQL CLR
I think this is a permissions problem, but I'm having trouble locating it.
I have a group of CLRs on one server (SQL Server 2016) and they work as they should. All are marked UNSAFE and they do ...
9
votes
1
answer
692
views
Apparently, my CLR assembly function is causing deadlocks?
Our application needs to work equally well with an Oracle database or a Microsoft SQL Server database. To facilitate this, we created a handful of UDFs to homogenize our query syntax. For example, SQL ...
6
votes
1
answer
5k
views
Added .Net assembly to SQL CLR without turning TRUSTWORTHY ON
I'm trying to add "System.Messaging.dll" using the guidance provided by Solomon Rutzky in his post Assembly deployment with permission UNSAFE or EXTERNAL_ACCESS using asymmetric key but I'm failing at ...
2
votes
2
answers
384
views
How to import Azure blob file into Sql Server 2008
Is there a way to import Blob files into sql server 2008 other than using CLR ?
The file size is around 300MB so CLR isn't efficient enough. Is there a possibility to use BULK INSERT or OPENROWSET in ...
3
votes
1
answer
2k
views
Error publishing SQLCLR C# Function using Visual Studio 2017
I'm trying to (learn) publish a SQLCLR function using Visual Studio 2017. (It's a simple function that sends an email.)
As a reference I used this articles on CodeProject and MSSQLTips:
Create, Run, ...
4
votes
2
answers
3k
views
Assembly deployment with permission UNSAFE or EXTERNAL_ACCESS using asymmetric key
When we are trying to deploy an assembly with PERMISSION_SET=UNSAFE or EXTERNAL_ACCESS, we are getting following error message by SQL Server:
CREATE ASSEMBLY for assembly 'System.ServiceModel....
6
votes
1
answer
277
views
Table with persisted computed CLR originated data marked with has_unchecked_assembly_data = 1, but DBCC CHECKTABLE does not unset this same flag
We have an OrderLines table with columns:
Quantity int not null
QtyCancelled int not null
QtyBackorder int not null
QtyPicking int not null
QtyPacking int not null
QtyShiped int not null
with ...
7
votes
4
answers
2k
views
Experiencing CLR error on SQL Azure DB
Out of nowhere we started seeing this error and it seems to occur fairly frequently when making calls to the database or any other database in our Elastic Pool. The DTUs aren't being maxed out and the ...
7
votes
1
answer
2k
views
Does lightweight pooling disable built-in CLR facilities?
Running SQL Server in fibre mode (lightweight pooling) disables the use of SQL CLR:
Common language runtime (CLR) execution is not supported under lightweight pooling. Disable one of two options: "...
1
vote
1
answer
4k
views
Why is my SQL Server reporting CLR_AUTO_EVENT waits when I don't even use SQL CLR?
When I run this query, I see high wait time for CLR_AUTO_EVENT:
SELECT
*
FROM
sys.dm_os_wait_stats
WHERE
wait_type IN
(
'CLR_AUTO_EVENT',
'CLR_CRST',
'CLR_JOIN'...
1
vote
1
answer
2k
views
SQL Server CLR method failing due to TLS 1.0 shutdown
I have an old CLR assembly that was using .Net 2 and when our TLS 1.0 connections were shut down for security reasons, the calls I was making out of the assembly (rest posts to https end point) we ...
1
vote
1
answer
201
views
Creating SQL Assembly error Method parent has circular class type parameter constraints
I'm trying to add an assembly to SQL server 2012 but I'm getting the following errors. I've tested the dll and it works fine from C# so don't think it's a code issue. Any suggestions?
Msg 6218, ...
3
votes
1
answer
4k
views
SQL Parallel Stored Procedure execution using CLR - Performance
We have a main analytics SP that calls 100 other sub SPs, all of which act upon the same set of data (Claims), check it for some business rules, and output discrepancies.
The SPs need not all be run ...
3
votes
1
answer
531
views
How to enable CLR on a remote SQL Server?
I have been created a dll for SQL Server 2014 to add some custom functions for my stored procedures for my asp.net websites.
I don't have any problem in the local server but can't enable the CLR ...