Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vendors:cisco:uc:ucce:baselinereskiller [2023/06/23 09:30] – [Database] gerardorourkevendors:cisco:uc:ucce:baselinereskiller [2023/07/31 10:05] (current) – [Python Scripts] gerardorourke
Line 177: Line 177:
 ===== Database ===== ===== Database =====
  
 +==== Database Views ====
   *Add UCCE AW SQL Server as a linked server   *Add UCCE AW SQL Server as a linked server
   *When adding - on the security tab, set "Be made using this security context" and enter the sql read only username / password you have already setup on the AW database (with read access only to the ucce_awdb).   *When adding - on the security tab, set "Be made using this security context" and enter the sql read only username / password you have already setup on the AW database (with read access only to the ucce_awdb).
Line 255: Line 256:
 FROM FROM [ucce-hds-a.example.com].[ucce_awdb].[dbo].[t_Agent_Team_Member] t FROM FROM [ucce-hds-a.example.com].[ucce_awdb].[dbo].[t_Agent_Team_Member] t
 </code> </code>
 +
 +==== Database Tables ====
 +<code sql>
 +USE [reskiller_db]
 +GO
 +
 +/****** Object:  Table [dbo].[Department]    Script Date: 23/06/2023 09:31:02 ******/
 +SET ANSI_NULLS ON
 +GO
 +
 +SET QUOTED_IDENTIFIER ON
 +GO
 +
 +CREATE TABLE [dbo].[Department](
 + [DepartmentID] [int] NOT NULL,
 + [DepartmentName] [varchar](50) NOT NULL,
 + [Supervisor] [varchar](50) NOT NULL,
 + [Password] [varchar](50) NOT NULL,
 + [ScheduleID] [int] NULL,
 + [Active] [char](1) NOT NULL
 +) ON [PRIMARY]
 +GO
 +
 +ALTER TABLE [dbo].[Department] ADD  CONSTRAINT [DF_Department_Active]  DEFAULT ('Y') FOR [Active]
 +GO
 +</code>
 +
 +<code sql>
 +USE [reskiller_db]
 +GO
 +
 +/****** Object:  Table [dbo].[Agent_Team_Department]    Script Date: 23/06/2023 09:32:08 ******/
 +SET ANSI_NULLS ON
 +GO
 +
 +SET QUOTED_IDENTIFIER ON
 +GO
 +
 +CREATE TABLE [dbo].[Agent_Team_Department](
 + [AgentTeamID] [int] NOT NULL,
 + [DepartmentID] [int] NOT NULL,
 + [Active] [char](1) NOT NULL,
 + CONSTRAINT [PK_AgentTeam_Department] PRIMARY KEY CLUSTERED 
 +(
 + [AgentTeamID] 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
 +
 +ALTER TABLE [dbo].[Agent_Team_Department] ADD  CONSTRAINT [DF_Agent_Team_Department_Active]  DEFAULT ('Y') FOR [Active]
 +GO
 +</code>
 +
 +<code sql>
 +USE [reskiller_db]
 +GO
 +
 +/****** Object:  Table [dbo].[Agent_Team_Skill_Group]    Script Date: 23/06/2023 09:36:02 ******/
 +SET ANSI_NULLS ON
 +GO
 +
 +SET QUOTED_IDENTIFIER ON
 +GO
 +
 +CREATE TABLE [dbo].[Agent_Team_Skill_Group](
 + [AgentTeamID] [int] NOT NULL,
 + [SkillTargetID] [int] NOT NULL
 +) ON [PRIMARY]
 +GO
 +</code>
 +
 +<code sql>
 +USE [reskiller_db]
 +GO
 +
 +/****** Object:  Table [dbo].[Log]    Script Date: 23/06/2023 09:36:19 ******/
 +SET ANSI_NULLS ON
 +GO
 +
 +SET QUOTED_IDENTIFIER ON
 +GO
 +
 +CREATE TABLE [dbo].[Log](
 + [ID] [int] IDENTITY(1,1) NOT NULL,
 + [DateTime] [datetime] NOT NULL,
 + [SevLevel] [int] NOT NULL,
 + [Data] [nvarchar](max) NOT NULL,
 + CONSTRAINT [PK_Log] 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] TEXTIMAGE_ON [PRIMARY]
 +GO
 +
 +ALTER TABLE [dbo].[Log] ADD  CONSTRAINT [DF_Log_DateTime]  DEFAULT (getdate()) FOR [DateTime]
 +GO
 +</code>
 +
 +
 +
 +
 +
 +
 +
  
  
Line 526: Line 631:
 print("End TimeStamp:", current_datetime) print("End TimeStamp:", current_datetime)
 </code> </code>
 +
 +===== Troubleshooting =====
 +
 +If the script works OK as but not when running as a sheduled script - run the script under the same account and see if the issue occur.
 +
 +{{:vendors:cisco:uc:ucce:run-as-a-different-user.png?600|}}
 +
  
  • vendors/cisco/uc/ucce/baselinereskiller.1687509033.txt.gz
  • Last modified: 2023/06/23 09:30
  • by gerardorourke