Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
127 views

In our system we are hashing passwords with the following method. public static string HashPassword(string password, byte[] salt) { if (salt == null) { throw new ArgumentNullException($...
2 votes
1 answer
1k views

I have a SQL CLR stored procedure that parses a TLVBER String, this CLR procedure is called each time a command is sent to the DB, there are 6 commands. The 6 commands represents a single transaction. ...
6 votes
1 answer
946 views

Preamble I have been investigating a concept and what I am posting below is a cut down version of what I have been trying. If you look at it and think "That doesn't make any sense to do it that way" ...
25 votes
4 answers
22k views

We've got a couple of on-premises dbs and we're seeing if we can migrate them to SQL Azure. Some of those dbs have a couple of user defined functions written in C# in an assembly (SAFE). After running ...
0 votes
0 answers
57 views

I have a SQLCLR scalar function that uses the context connection to read data. Sometimes, the SQL statement being run by the CLR deadlocks. The scalar function itself is being run in a standard stored ...
1 vote
1 answer
107 views

I want to do something simple, Create a SQL CLR that converts data to XLS. I've tried Using OpenXML, but it keeps installing windowbase as a dependency, which uses system.XAML, which SQL server (2019) ...
43 votes
7 answers
66k views

Question: In SQL Server 2005, how can I list all SQL CLR-functions/procedures that use assembly xy (e.g. MyFirstUdp) ? For example a function that lists HelloWorld for query parameter MyFirstUdp ...
0 votes
3 answers
978 views

Have a clr assembly that references System.Text.Json (.net 4.8 with SQL Server 14), when I try to load it into SQL Server (CREATE ASSEMBLY) I get: Assembly 'my assembly' references assembly 'system....
5 votes
3 answers
17k views

I'm using threading in my SQLCLR Project and I'm getting the following error when I try to run my user defined function. What can I do to enable threading things such as the Parallel library and await/...
1 vote
1 answer
241 views

I'm trying to create my first CLR assembly. I have created a dll in VS and now I am trying to use it in SQL Server. I try to create assembly with this code: CREATE ASSEMBLY SQLCLRroy FROM '...\...
0 votes
1 answer
1k views

I have implemented this article to call rabbitmq inside SQL Server: [https://nielsberglund.com/2017/02/11/rabbitmq---sql-server/][1] But when I try to send a message using the CLR I get this error: ...
2 votes
1 answer
104 views

I have a stored procedure with some CLR functions inside it. I need to check how many times these functions are being called during one stored procedure execution. I have found this select at ...
1 vote
2 answers
2k views

I am trying to create an UNSAFE assembly in SQL Server without having to alter any global database or server permissions such as EXEC sp_configure 'clr strict security', 0 or ALTER DATABASE MyDatabase ...
48 votes
2 answers
25k views

Assume the assembly dll: using Microsoft.SqlServer.Server; using System.Data.SqlClient; using System.Data.SqlTypes; using System; using System.Text; namespace CLRFunctions { public class T { ...
2 votes
1 answer
837 views

I'm trying to write a log into another database inside a transaction so that the log will survive even if the transaction is rolled back. I've read this answer which says: One possibility is to use ...
1 vote
1 answer
284 views

I have created a SQLCLR UDF and am deploying it (using SSDT) to SQL Server 2019 on Linux. When I try to execute the function it returns the following error: Request for the permission of type 'System....
1 vote
1 answer
1k views

I try to sign the CLR assembly in Visual Studio database project (SSDT) so that I can publish the assembly into the SQL Server but with no success. What I have done manually and it works Created ...
8 votes
4 answers
15k views

For this xml (in a SQL 2005 XML column): <doc> <a>1</a> <b ba="1" bb="2" bc="3" /> <c bd="3"/> </doc> I'd like to be ...
13 votes
3 answers
8k views

I'm a .NET developer and new to mac (m1 pro). I use docker and pull the azure-sql-edge image. When I try to create a table with a geometry column or insert a value in the geometry type column that was ...
1 vote
1 answer
358 views

How can I stop SQL CLR projects from generating DROP DATABASE in some deployment scripts? I have been using SQL Server SQL CLR for 10+ years for scalar functions, aggregates and User-Defined Types. ...
24 votes
6 answers
24k views

During a recent restart of our development server the SQL Server started using .NET 4.0 for the SQLCLR. This means that nothing using the CLR in SQL works, or at least that's my understanding by ...
0 votes
1 answer
606 views

Alright so using C# I am creating a DLL that I am using in SSMS and attaching it as an assembly to perform a few tasks, I can create/use the DLL fine but I am having trouble access the DB from the DLL ...
43 votes
7 answers
104k views

When I try to create assembly in SQL 2008 from .Net assembly (.Net 3.5) I am getting the below error, error says that I have to set either of the below properties as true, how can I do that? The ...
0 votes
0 answers
162 views

I have a SQL server C# CLR function that streams results. because of that I open a new connection inside the CLR and because of that I need to create the CLR unsafe. Now I want to move to sql ...
4 votes
2 answers
2k views

I'm having issue registering referenced assemblies that I used in my SQL CLR assembly. For example I have SQL CLR assembly named Something.dll. This Something.dll references Newtonsoft.dll. I sign ...

1
2 3 4 5
21