Tables [dbo].[SecProfileDetail]
Properties
PropertyValue
Row Count (~)12498
Created4:57:08 PM Thursday, September 7, 2006
Last Modified9:10:38 AM Friday, November 8, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_SecProfileDetail: SPDPriKeySPDPriKeyint4
No
1 - 1
Foreign Keys FK_SecProfileDetail_SecurityProfile: [dbo].[SecurityProfile].SecProfilePriKeyIndexes IX_SecProfileDetail_Module_Branch_Access_Manager: ManagerFlag\ModulePriKey\BranchPriKey\SecProfilePriKey\AccessPriKeyIndexes IX_SecProfileDetail_SecProfilePriKey_ModulePriKey: AccessPriKey\SecProfilePriKey\ModulePriKeyIndexes IX_Unique_SecProfilePriKey_ModulePriKey_BranchPriKey: SecProfilePriKey\ModulePriKey\BranchPriKeySecProfilePriKeyint4
No
Foreign Keys FK_SecProfileDetail_SecModules: [dbo].[SecModules].ModulePriKeyIndexes IX_SecProfileDetail_ModulePriKey: ModulePriKeyIndexes IX_SecProfileDetail_Module_Branch_Access_Manager: ManagerFlag\ModulePriKey\BranchPriKey\SecProfilePriKey\AccessPriKeyIndexes IX_SecProfileDetail_SecProfilePriKey_ModulePriKey: AccessPriKey\SecProfilePriKey\ModulePriKeyIndexes IX_Unique_SecProfilePriKey_ModulePriKey_BranchPriKey: SecProfilePriKey\ModulePriKey\BranchPriKeyModulePriKeyint4
No
Foreign Keys FK_SecProfileDetail_BRANCH: [dbo].[Branch].BranchPriKeyIndexes IX_SecProfileDetail_BranchPriKey: BranchPriKeyIndexes IX_SecProfileDetail_Module_Branch_Access_Manager: ManagerFlag\ModulePriKey\BranchPriKey\SecProfilePriKey\AccessPriKeyIndexes IX_Unique_SecProfilePriKey_ModulePriKey_BranchPriKey: SecProfilePriKey\ModulePriKey\BranchPriKeyBranchPriKeyint4
No
Foreign Keys FK_SecProfileDetail_SecAccessTypes: [dbo].[SecAccessTypes].AccessPriKeyIndexes IX_SecProfileDetail_AccessPriKey: AccessPriKeyIndexes IX_SecProfileDetail_Module_Branch_Access_Manager: ManagerFlag\ModulePriKey\BranchPriKey\SecProfilePriKey\AccessPriKeyIndexes IX_SecProfileDetail_SecProfilePriKey_ModulePriKey: AccessPriKey\SecProfilePriKey\ModulePriKeyAccessPriKeyint4
No
Indexes IX_SecProfileDetail_Module_Branch_Access_Manager: ManagerFlag\ModulePriKey\BranchPriKey\SecProfilePriKey\AccessPriKeyManagerFlagbit1
No
(0)
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_SecProfileDetail: SPDPriKeyPK_SecProfileDetailSPDPriKey
Yes
80
IX_Unique_SecProfilePriKey_ModulePriKey_BranchPriKeySecProfilePriKey, ModulePriKey, BranchPriKey
Yes
80
IX_SecProfileDetail_AccessPriKeyAccessPriKey80
IX_SecProfileDetail_BranchPriKeyBranchPriKey80
IX_SecProfileDetail_Module_Branch_Access_ManagerManagerFlag, ModulePriKey, BranchPriKey, SecProfilePriKey, AccessPriKey80
IX_SecProfileDetail_ModulePriKeyModulePriKey80
IX_SecProfileDetail_SecProfilePriKey_ModulePriKeyAccessPriKey, SecProfilePriKey, ModulePriKey
Check Constraints Check Constraints
NameConstraint
CK_SecProfileDetail_ModuleID_AccessID(NOT [dbo].[GetSecModuleName]([ModulePriKey])='AR Credit & Collections' OR [dbo].[GetSecurityAccessID]('Read Only')<>[AccessPriKey])
Foreign Keys Foreign Keys
NameColumns
FK_SecProfileDetail_SecAccessTypesAccessPriKey->[dbo].[SecAccessTypes].[AccessPriKey]
FK_SecProfileDetail_BRANCHBranchPriKey->[dbo].[Branch].[BranchPriKey]
FK_SecProfileDetail_SecModulesModulePriKey->[dbo].[SecModules].[ModulePriKey]
FK_SecProfileDetail_SecurityProfileSecProfilePriKey->[dbo].[SecurityProfile].[SecProfilePriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[SecProfileDetail]
(
[SPDPriKey] [int] NOT NULL IDENTITY(1, 1),
[SecProfilePriKey] [int] NOT NULL,
[ModulePriKey] [int] NOT NULL,
[BranchPriKey] [int] NOT NULL,
[AccessPriKey] [int] NOT NULL,
[ManagerFlag] [bit] NOT NULL CONSTRAINT [DF_ManagerFlag] DEFAULT (0)
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [CK_SecProfileDetail_ModuleID_AccessID] CHECK ((NOT [dbo].[GetSecModuleName]([ModulePriKey])='AR Credit & Collections' OR [dbo].[GetSecurityAccessID]('Read Only')<>[AccessPriKey]))
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [PK_SecProfileDetail] PRIMARY KEY CLUSTERED  ([SPDPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [IX_Unique_SecProfilePriKey_ModulePriKey_BranchPriKey] UNIQUE NONCLUSTERED  ([SecProfilePriKey], [ModulePriKey], [BranchPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SecProfileDetail_AccessPriKey] ON [dbo].[SecProfileDetail] ([AccessPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SecProfileDetail_BranchPriKey] ON [dbo].[SecProfileDetail] ([BranchPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SecProfileDetail_ModulePriKey] ON [dbo].[SecProfileDetail] ([ModulePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SecProfileDetail_Module_Branch_Access_Manager] ON [dbo].[SecProfileDetail] ([SecProfilePriKey], [AccessPriKey]) INCLUDE ([BranchPriKey], [ManagerFlag], [ModulePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_SecProfileDetail_SecProfilePriKey_ModulePriKey] ON [dbo].[SecProfileDetail] ([SecProfilePriKey], [ModulePriKey]) INCLUDE ([AccessPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [FK_SecProfileDetail_SecAccessTypes] FOREIGN KEY ([AccessPriKey]) REFERENCES [dbo].[SecAccessTypes] ([AccessPriKey])
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [FK_SecProfileDetail_BRANCH] FOREIGN KEY ([BranchPriKey]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [FK_SecProfileDetail_SecModules] FOREIGN KEY ([ModulePriKey]) REFERENCES [dbo].[SecModules] ([ModulePriKey])
GO
ALTER TABLE [dbo].[SecProfileDetail] ADD CONSTRAINT [FK_SecProfileDetail_SecurityProfile] FOREIGN KEY ([SecProfilePriKey]) REFERENCES [dbo].[SecurityProfile] ([SecProfilePriKey])
GO
GRANT SELECT ON  [dbo].[SecProfileDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[SecProfileDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[SecProfileDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[SecProfileDetail] TO [MssExec]
GO
Uses
Used By