Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The use and opening foundation of SQLCLR

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Summary

I don't quite understand SQLCLR either. I won't say it.

Here I use VS TOOLS to develop one for starters

You need to know something about his configuration when using SQLCLR. He has a lightweight pool with advanced settings that are somewhat relevant.

He doesn't support sqlclr.

We don't have to worry about it in order to study.

When clr is enabled, it does not support UI. This is a sql statement, as follows

EXEC sp_configure "clr enabled", 1

Go

RECONFIGURE

To turn off is to change the value to 0.

Start building clr applications

1. Open VS-- > View-> Sql server object Explorer; 2. Connect to a sql server instance 3. Now a data, right-click-> create a new project 4. In the open configuration page, configure information-- > start 5. Solution object Explorer Select Project right-> add New item-- > Select Sqlclr C# stored procedure using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server Public partial class StoredProcedures {[Microsoft.SqlServer.Server.SqlProcedure] public static void SqlStoredProcedure1 (out string text) {/ / place the code SqlContext.Pipe.Send ("Hello Suhe" + Environment.NewLine) here; text = "my first SqlClr assembly";}} modify code 6. Project right-> release configuration target database connection and database release 1-2 minutes 7. Select publish data Deposit process Click programmability-> Storage course

Right-click-> execute stored procedure OK

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report