Tables [dbo].[al_product_maintenance_info]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count29
Created10:33:07 PM Thursday, February 10, 2011
Last Modified6:56:22 PM Tuesday, April 26, 2011
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key pk_al_product_maintenance_info: license_idForeign Keys AL_PRODUCT_MAINTENANCE_INFO_FK: [dbo].[al_license].license_idForeign Keys al_product_maintenance_info_fk01: [dbo].[al_license].license_idlicense_idint4
No
includesmallint2
Yes
term_begin_datedatetime8
Yes
term_end_datedatetime8
Yes
termint4
Yes
Foreign Keys al_product_maintenance_info_fk02: [dbo].[al_time_unit].term_unitForeign Keys PRODUCT_MAINTENANCE_INFO_FK02: [dbo].[al_time_unit].term_unitIndexes xif2al_product_maintenance_inf: term_unitterm_unitsmallint2
Yes
payablesmallint2
Yes
Foreign Keys al_product_maintenance_info_fk03: [dbo].[al_time_unit].payable_unitForeign Keys PRODUCT_MAINTENANCE_INFO_FK03: [dbo].[al_time_unit].payable_unitIndexes xif3al_product_maintenance_inf: payable_unitpayable_unitsmallint2
Yes
forward_coveragesmallint2
Yes
backward_coveragesmallint2
Yes
Foreign Keys al_product_maintenance_info_fk04: [dbo].[al_upgrade_path].upgrade_path_idForeign Keys PRODUCT_MAINTENANCE_INFO_FK04: [dbo].[al_upgrade_path].upgrade_path_idIndexes xif4al_product_maintenance_inf: upgrade_path_idupgrade_path_idint4
Yes
creation_usernvarchar(255)510
Yes
creation_dateint4
Yes
last_update_usernvarchar(255)510
Yes
last_update_dateint4
Yes
version_numberint4
Yes
('0 ')
Indexes Indexes
NameColumnsUnique
Cluster Primary Key pk_al_product_maintenance_info: license_idpk_al_product_maintenance_infolicense_id
Yes
xif2al_product_maintenance_infterm_unit
xif3al_product_maintenance_infpayable_unit
xif4al_product_maintenance_infupgrade_path_id
Triggers Triggers
NameANSI Nulls OnQuoted Identifier OnOn
al_u_prod_main_info
Yes
Yes
After Update
Foreign Keys Foreign Keys
NameColumns
AL_PRODUCT_MAINTENANCE_INFO_FKlicense_id->[dbo].[al_license].[license_id]
al_product_maintenance_info_fk01license_id->[dbo].[al_license].[license_id]
al_product_maintenance_info_fk02term_unit->[dbo].[al_time_unit].[time_unit_id]
al_product_maintenance_info_fk03payable_unit->[dbo].[al_time_unit].[time_unit_id]
al_product_maintenance_info_fk04upgrade_path_id->[dbo].[al_upgrade_path].[upgrade_path_id]
PRODUCT_MAINTENANCE_INFO_FK02term_unit->[dbo].[al_time_unit].[time_unit_id]
PRODUCT_MAINTENANCE_INFO_FK03payable_unit->[dbo].[al_time_unit].[time_unit_id]
PRODUCT_MAINTENANCE_INFO_FK04upgrade_path_id->[dbo].[al_upgrade_path].[upgrade_path_id]
Permissions
TypeActionOwning Principal
GrantDeleteuapmadmin_group
GrantInsertuapmadmin_group
GrantDeleteuapmbatch_group
GrantInsertuapmbatch_group
GrantDeleteswcmadmin
GrantInsertswcmadmin
GrantSelectuapmadmin_group
GrantUpdateuapmadmin_group
GrantSelectuapmbatch_group
GrantUpdateuapmbatch_group
GrantSelectuapmreporting_group
GrantSelectswcmadmin
GrantUpdateswcmadmin
SQL Script
CREATE TABLE [dbo].[al_product_maintenance_info]
(
[license_id] [int] NOT NULL,
[include] [smallint] NULL,
[term_begin_date] [datetime] NULL,
[term_end_date] [datetime] NULL,
[term] [int] NULL,
[term_unit] [smallint] NULL,
[payable] [smallint] NULL,
[payable_unit] [smallint] NULL,
[forward_coverage] [smallint] NULL,
[backward_coverage] [smallint] NULL,
[upgrade_path_id] [int] NULL,
[creation_user] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[creation_date] [int] NULL,
[last_update_user] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[last_update_date] [int] NULL,
[version_number] [int] NULL CONSTRAINT [DF__AL_PRODUC__VERSI__4AB81AF0] DEFAULT ('0 ')
) ON [PRIMARY]

GO
CREATE TRIGGER al_u_prod_main_info
   ON  al_product_maintenance_info
   AFTER UPDATE
    as
    Begin
        declare @license_id int
        declare @maintenance_terminated smallint
        declare @license_metric_id int
        declare @enabled smallint
        declare @maintenance_future smallint
        declare @includes smallint
        declare @maintenance_effective_future smallint
        declare @old_include smallint
        declare @include smallint
        
        set nocount on
        select @license_id = license_id, @include = include from inserted
        
        select @old_include = include from deleted
        
        exec al_sp_set_main_terminated @license_id
        
        --Removed any references to updating the blocking.  Allow the trigger
        --on the al_license_flags table to do this work.

    end
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [pk_al_product_maintenance_info] PRIMARY KEY CLUSTERED ([license_id]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif3al_product_maintenance_inf] ON [dbo].[al_product_maintenance_info] ([payable_unit]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif2al_product_maintenance_inf] ON [dbo].[al_product_maintenance_info] ([term_unit]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif4al_product_maintenance_inf] ON [dbo].[al_product_maintenance_info] ([upgrade_path_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [AL_PRODUCT_MAINTENANCE_INFO_FK] FOREIGN KEY ([license_id]) REFERENCES [dbo].[al_license] ([license_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [al_product_maintenance_info_fk01] FOREIGN KEY ([license_id]) REFERENCES [dbo].[al_license] ([license_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [al_product_maintenance_info_fk02] FOREIGN KEY ([term_unit]) REFERENCES [dbo].[al_time_unit] ([time_unit_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [al_product_maintenance_info_fk03] FOREIGN KEY ([payable_unit]) REFERENCES [dbo].[al_time_unit] ([time_unit_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [al_product_maintenance_info_fk04] FOREIGN KEY ([upgrade_path_id]) REFERENCES [dbo].[al_upgrade_path] ([upgrade_path_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [PRODUCT_MAINTENANCE_INFO_FK02] FOREIGN KEY ([term_unit]) REFERENCES [dbo].[al_time_unit] ([time_unit_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [PRODUCT_MAINTENANCE_INFO_FK03] FOREIGN KEY ([payable_unit]) REFERENCES [dbo].[al_time_unit] ([time_unit_id])
GO
ALTER TABLE [dbo].[al_product_maintenance_info] ADD CONSTRAINT [PRODUCT_MAINTENANCE_INFO_FK04] FOREIGN KEY ([upgrade_path_id]) REFERENCES [dbo].[al_upgrade_path] ([upgrade_path_id])
GO
GRANT SELECT ON  [dbo].[al_product_maintenance_info] TO [swcmadmin]
GRANT INSERT ON  [dbo].[al_product_maintenance_info] TO [swcmadmin]
GRANT DELETE ON  [dbo].[al_product_maintenance_info] TO [swcmadmin]
GRANT UPDATE ON  [dbo].[al_product_maintenance_info] TO [swcmadmin]
GRANT SELECT ON  [dbo].[al_product_maintenance_info] TO [uapmadmin_group]
GRANT INSERT ON  [dbo].[al_product_maintenance_info] TO [uapmadmin_group]
GRANT DELETE ON  [dbo].[al_product_maintenance_info] TO [uapmadmin_group]
GRANT UPDATE ON  [dbo].[al_product_maintenance_info] TO [uapmadmin_group]
GRANT SELECT ON  [dbo].[al_product_maintenance_info] TO [uapmbatch_group]
GRANT INSERT ON  [dbo].[al_product_maintenance_info] TO [uapmbatch_group]
GRANT DELETE ON  [dbo].[al_product_maintenance_info] TO [uapmbatch_group]
GRANT UPDATE ON  [dbo].[al_product_maintenance_info] TO [uapmbatch_group]
GRANT SELECT ON  [dbo].[al_product_maintenance_info] TO [uapmreporting_group]
GO
Uses
Used By