-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0018 OPS_Rpt_Type_Sections.sql
53 lines (51 loc) · 3.6 KB
/
0018 OPS_Rpt_Type_Sections.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
Tuesday, 1 April 20147:47:34 PM
User:
Server: MALH-PC\MSSQLSERVER2012
Database: KG-IMS
Application:
*/
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.OPS_Rpt_Type_Sections
(
RPT_Type_SectionGUID uniqueidentifier NOT NULL,
ParetnGUID uniqueidentifier NOT NULL,
SectionNumber int NULL,
Title nvarchar(MAX) NOT NULL,
EntryTypeGUID uniqueidentifier NOT NULL,
Active bit NOT NULL,
ChangedBy nvarchar(50) NOT NULL,
ChangedOn datetime NOT NULL
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE dbo.OPS_Rpt_Type_Sections ADD CONSTRAINT
DF_Table_2_ProjGUID DEFAULT (newid()) FOR RPT_Type_SectionGUID
GO
ALTER TABLE dbo.OPS_Rpt_Type_Sections ADD CONSTRAINT
DF_OPS_Rpt_Type_Sections_Active DEFAULT ((1)) FOR Active
GO
ALTER TABLE dbo.OPS_Rpt_Type_Sections ADD CONSTRAINT
DF_OPS_Rpt_Type_Sections_ChangedOn DEFAULT (getdate()) FOR ChangedOn
GO
ALTER TABLE dbo.OPS_Rpt_Type_Sections ADD CONSTRAINT
PK_OPS_Rpt_Type_Sections PRIMARY KEY CLUSTERED
(
RPT_Type_SectionGUID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE dbo.OPS_Rpt_Type_Sections SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
select Has_Perms_By_Name(N'dbo.OPS_Rpt_Type_Sections', 'Object', 'ALTER') as ALT_Per, Has_Perms_By_Name(N'dbo.OPS_Rpt_Type_Sections', 'Object', 'VIEW DEFINITION') as View_def_Per, Has_Perms_By_Name(N'dbo.OPS_Rpt_Type_Sections', 'Object', 'CONTROL') as Contr_Per