개정판 40ac2242
issue #0000 markus 저장 수정
Change-Id: Ibd70045cc30ae2c350355bf14f0cbbb8f58a47d0
ID2.Manager/MarkusSQL/InsertAss.SQL | ||
---|---|---|
1 |
-- test |
|
1 |
|
|
2 |
USE markus_SEC; |
|
3 |
GO |
|
2 | 4 |
exec sp_configure |
3 | 5 |
|
4 | 6 |
exec sp_configure 'clr enabled',1 |
... | ... | |
12 | 14 |
exec sp_configure 'clr strict security',0; |
13 | 15 |
reconfigure with override |
14 | 16 |
|
17 |
ALTER DATABASE markus_SEC |
|
18 |
SET TRUSTWORTHY ON; |
|
19 |
|
|
15 | 20 |
|
16 |
USE master; |
|
17 |
GO |
|
18 | 21 |
|
19 |
CREATE ASSEMBLY MarkupDataParse |
|
22 |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataCompress]')) |
|
23 |
drop FUNCTION [dbo].[MarkupDataCompress] |
|
24 |
|
|
25 |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataDeCompress]')) |
|
26 |
drop FUNCTION [dbo].[MarkupDataDecompress] |
|
27 |
|
|
28 |
|
|
29 |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataText]')) |
|
30 |
drop FUNCTION [dbo].[MarkupDataText] |
|
31 |
|
|
32 |
IF EXISTS (select * from sys.assemblies where name = 'MarkupDataParse') |
|
33 |
drop ASSEMBLY MarkupDataParse |
|
34 |
|
|
35 |
IF EXISTS (select * from sys.assemblies where name = 'System.Runtime.Serialization') |
|
36 |
drop ASSEMBLY [System.Runtime.Serialization] |
|
37 |
|
|
38 |
CREATE ASSEMBLY [System.Runtime.Serialization] |
|
39 |
FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Runtime.Serialization.dll' |
|
40 |
WITH PERMISSION_SET = UNSAFE; |
|
41 |
|
|
42 |
create ASSEMBLY MarkupDataParse |
|
20 | 43 |
FROM 'D:\Markus_V3\dbFunctions\MarkupDataParse.dll' |
21 |
WITH PERMISSION_SET = SAFE; |
|
44 |
WITH PERMISSION_SET = UNSAFE;
|
|
22 | 45 |
|
46 |
go |
|
23 | 47 |
|
24 | 48 |
select * from sys.assemblies |
25 | 49 |
|
26 |
USE markus_SEC; |
|
27 |
GO |
|
28 | 50 |
|
29 |
CREATE FUNCTION MarkupDataCompress(@inputString NVARCHAR(MAX)) |
|
30 |
RETURNS NVARCHAR(MAX) |
|
31 |
AS EXTERNAL NAME MarkupDataParse.[MarkupDataParse.MarkupDataFunctions].CompressString; |
|
51 |
/****** Object: UserDefinedTableType [dbo].[VARCHAR_TABLE] Script Date: 2023-05-30 오전 10:22:07 ******/ |
|
52 |
IF NOT EXISTS (SELECT * FROM sys.types st JOIN sys.schemas ss ON st.schema_id = ss.schema_id WHERE st.name = N'VARCHAR_TABLE' AND ss.name = N'dbo') |
|
53 |
CREATE TYPE [dbo].[VARCHAR_TABLE] AS TABLE( |
|
54 |
[ITEM] [varchar](max) NULL |
|
55 |
) |
|
56 |
GO |
|
57 |
/****** Object: UserDefinedFunction [dbo].[MarkupDataCompress] Script Date: 2023-05-30 오전 10:22:07 ******/ |
|
58 |
SET ANSI_NULLS OFF |
|
59 |
GO |
|
60 |
SET QUOTED_IDENTIFIER OFF |
|
61 |
GO |
|
62 |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataCompress]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) |
|
63 |
BEGIN |
|
64 |
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[MarkupDataCompress](@inputString [nvarchar](max)) |
|
65 |
RETURNS [nvarchar](max) WITH EXECUTE AS CALLER |
|
66 |
AS |
|
67 |
EXTERNAL NAME [MarkupDataParse].[MarkupDataParse.MarkupDataFunctions].[CompressString]' |
|
68 |
END |
|
69 |
GO |
|
70 |
/****** Object: UserDefinedFunction [dbo].[MarkupDataDecompress] Script Date: 2023-05-30 오전 10:22:07 ******/ |
|
71 |
SET ANSI_NULLS OFF |
|
72 |
GO |
|
73 |
SET QUOTED_IDENTIFIER OFF |
|
74 |
GO |
|
75 |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataDecompress]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) |
|
76 |
BEGIN |
|
77 |
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[MarkupDataDecompress](@inputString [nvarchar](max)) |
|
78 |
RETURNS [nvarchar](max) WITH EXECUTE AS CALLER |
|
79 |
AS |
|
80 |
EXTERNAL NAME [MarkupDataParse].[MarkupDataParse.MarkupDataFunctions].[DecompressString]' |
|
81 |
END |
|
82 |
GO |
|
83 |
/****** Object: UserDefinedFunction [dbo].[MarkupDataText] Script Date: 2023-05-30 오전 10:22:07 ******/ |
|
84 |
SET ANSI_NULLS OFF |
|
85 |
GO |
|
86 |
SET QUOTED_IDENTIFIER OFF |
|
87 |
GO |
|
88 |
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MarkupDataText]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) |
|
89 |
BEGIN |
|
90 |
execute dbo.sp_executesql @statement = N'CREATE FUNCTION [dbo].[MarkupDataText](@inputString [nvarchar](max)) |
|
91 |
RETURNS [nvarchar](max) WITH EXECUTE AS CALLER |
|
92 |
AS |
|
93 |
EXTERNAL NAME [MarkupDataParse].[MarkupDataParse.MarkupDataFunctions].[GetMarkupText]' |
|
94 |
END |
|
95 |
GO |
|
96 |
/****** Object: Table [dbo].[ControlType] Script Date: 2023-05-30 오전 10:22:07 ******/ |
|
97 |
SET ANSI_NULLS ON |
|
98 |
GO |
|
99 |
SET QUOTED_IDENTIFIER ON |
내보내기 Unified diff