You may encounter the following error logs when trying to install TMCM 6.0 SP2:
- When a primary key already exists on table'dbo.tb_CustomViews', you cannot add a new primary key:
[2014-11-19 10:14:22.997] Exception occurs!
System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__tb_CustomViews__41B8C09B'. Cannot insert duplicate key in object 'dbo.tb_CustomViews'.
Violation of PRIMARY KEY constraint 'PK__tb_CustomViews__41B8C09B'. Cannot insert duplicate key in object 'dbo.tb_CustomViews' - When your database (DB) misses the table tb_TreeRecountDebugLog during installation:
System.Data.SqlClient.SqlException: Cannot find the object "tb_TreeRecountDebugLog" because it does not exist or you do not have permissions
- When table tb_UserInfo is set to “Default” or “Binding”:
UPDATE tb_UserInfo set [LoginFailedTimes] = 0, [LoginBlockedTime] = ''
Alter table tb_UserInfo ADD DEFAULT((0)) FOR [LoginFailedTimes], DEFAULT(('')) FOR [LoginBlockedTime]
[2014-11-27 20:27:13.216] SQLServer = (local), DBName = db_ControlManager, UserID = sa
[2014-11-27 20:27:13.434] Exception occurs!
System.Data.SqlClient.SqlException: Column already has a DEFAULT bound to it.
Could not create constraint. See previous errors.
To resolve any of the issues listed, you may perform the indicated steps:
Go to db_ControlManager in the SQL Server Management Studio and execute the following SQL commands:
drop function [dbo].[fn_ACL_GetMinAccessibleNodesFilterOSCEClient] drop function [dbo].[fn_ACL_GetMinProductTreeNodesFilterOSCEClient] update tb_SendSysLogNotification set Message='%CNC_EVENTID% TMCM server="%cmserver%" Industry="%CNC_INDUSTRY%" Security product="%CNC_PD_NAME%" Security product version="%CNC_PD_VERSION%" Security product node="%CNC_PD_NODE%" Security product ip="%CNC_PD_IP%" Event time="%CNC_EVTTIME%" Security agent name="%CNC_AGENTNAME%" Security agent ip="%CNC_AGENTIP%" Security agent domain="%CNC_AGENTDOMAIN%" Policy rule="%CNC_POLICY_RULE%" Action taken="%CNC_ACTION%" Email sender="%CNC_EMAIL_SENDER%" Email subject="%CNC_EMAIL_SUBJECT%" C&C risk level="%CNC_RISKLEVEL%" C&C list source="%CNC_DETECT_SOURCE%" C&C channel="%C\ NC_CHANNEL%" C&C url="%CNC_URL%" C&C url category="%CNC_URL_CATEGORY%" C&C ip port="%CNC_IP_PORT%" C&C email recipient="%CNC_EMAIL_REPT%" C&C address first monitored="%CNC_FIRST_SEEN%" C&C address last activity="%CNC_LAST_SEEN%" C&C server location="%CNC_LOCATION%" Malware families="%CNC_MALEWARE_FAMILY%" Targeted attack group="%CNC_ATTACK_GROUP%"' where event_id='SLF_INCIDENT_EVT_CCCA'
Delete from tb_CustomViews where cv_id is in
('4a3ec825-269a-489d-9f0e-0c9ac857ab77',
'3351ea9b-0fa6-42c5-8a0e-6ecae2914c98',
'd4d4f2df-1827-4eec-8e1d-dbc7e219654f',
'f86b824b-b35a-4d58-a791-bb96b57ca2ca',
'af379dc3-6abc-4dc3-a3e0-788816064836',
'4bed279d-061e-49e3-bd41-e2bb530a7fa4',
'f5f4068f-bc75-42ef-9cce-41239bf0d589',
'fb3c9105-c6e6-45bf-b2c1-b0d97630f662',
'bf8aac1b-e569-4610-a636-60afc0249c17')
Delete from tb_ResourceACL where ResourceGuid is in
('4a3ec825-269a-489d-9f0e-0c9ac857ab77',
'3351ea9b-0fa6-42c5-8a0e-6ecae2914c98',
'd4d4f2df-1827-4eec-8e1d-dbc7e219654f',
'f86b824b-b35a-4d58-a791-bb96b57ca2ca',
'af379dc3-6abc-4dc3-a3e0-788816064836',
'4bed279d-061e-49e3-bd41-e2bb530a7fa4',
'f5f4068f-bc75-42ef-9cce-41239bf0d589',
'fb3c9105-c6e6-45bf-b2c1-b0d97630f662',
'bf8aac1b-e569-4610-a636-60afc0249c17')
Alter table tb_LogGeneral drop column
[ThreatType],
[IsBlocked],
[InterestedGroupName],
[DetectionType],
[EventTotalCount],
[EventAggregatedCount],
[ECE_SeverityCode],
[AttackPhase],
[DetectedByVA],
[LogNativeID],
[DCEHash1],
[DCEHash2],
[Remarks],
[CC_Server],
[CC_ServerType],
[MalwareType],
[Event_Class],
[Event_SubClass],
[HeurFlag],
[CommonThreatFamily]
Alter table tb_LogFile drop column
[SHA1],
[SHA1inArc],
[FileTypeInArc]
Alter table tb_LogIP drop column
[SrcUserName],
[DestUserName],
[SrcHostname],
[DestHostname],
[ProtocolHostname],
[CategoryIDList],
[SrcUserName2],
[SrcUserName3],
[SrcUserLoginTime1],
[SrcUserLoginTime2],
[SrcUserLoginTime3],
[DestUsername2],
[DestUsername3], [
DestUserLoginTime1],
[DestUserLoginTime2],
[DestUserLoginTime3],
[SrcOS],
[DestOS]
Alter table tb_LogMail drop column
[AttachmentFileName],
[AttachmentFileSize],
[AttachmentFileType],
[AttachmentSHA1]
Go to db_ControlManager in the SQL Server Management Studio and execute the following SQL commands:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_TreeRecountDebugLog](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Time] [datetime] NULL,
[Message] [varchar](512) NULL,
PRIMARY KEY CLUSTERED
(
[ID] ASC )
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO
To address the issue:
- Go to the SQL Server Management Studio and locate tb_UserInfo.
- Click LoginFailedTimes and disable Default or Binding.
- Select LoginBlockedTime and remove Default or Binding.