Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.39 KB

sql-2014.md

File metadata and controls

41 lines (27 loc) · 1.39 KB

Install onto SQL Server 2014

SQL Regex Logo

To install sql-server-regex, you need to:

  1. Download or fork this code.
  2. Enable CLR
  3. Install the sql-server-regex assembly
  4. Create the T-SQL functions

Note: this requires sysadmin privileges on your SQL Server instance.

Enable CLR

You need to enable CLR on SQL Server before you do anything else.

exec sp_configure 'clr enabled', 1
go
reconfigure
go

Install the Assembly

  1. Download the load-assembly.sql file.
  2. Download the sql-server-regex 2014 DLL.
  3. Copy both to the server you want to install sql-server-regex onto.
  4. Open load-assembly.sql, and set the value of @AssemblyLocation to the location of the sql-server-regex-2014.dll.
  5. Run the script.

Note: if you want to compile the assembly yourself from code, go ahead. Make sure your target platform is the version of SQL Server you want (e.g. SQL Server 2014), and that you copy the DLL that's created to the install location in step 3, above.

Create the T-SQL Functions

The final step is to create the scalar and table-valued functions that you can query using T-SQL.

  1. Run scalar-functions.sql
  2. Run table-valued-functions.sql