/****** HA leadership lease (used only when IS.HA=true) ******/ /* The connector creates this table and seed row automatically if its DB account has CREATE TABLE permission. */ /* Run this script manually when the connector account is not allowed to run DDL, */ /* together with AddRecoveryKeyToTCDProcessStatus.sql for the TCD cursor columns. */ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO IF OBJECT_ID('dbo.TCDLeaderLease', 'U') IS NULL CREATE TABLE [dbo].[TCDLeaderLease]( [Id] [int] NOT NULL, [OwnerId] [varchar](100) NULL, [HeartbeatTime] [datetime] NOT NULL, CONSTRAINT [PK_TCDLeaderLease] PRIMARY KEY CLUSTERED ( [Id] ASC )) ON [PRIMARY] GO IF NOT EXISTS (SELECT 1 FROM [dbo].[TCDLeaderLease] WHERE [Id] = 1) INSERT INTO [dbo].[TCDLeaderLease] ([Id], [OwnerId], [HeartbeatTime]) VALUES (1, NULL, '1900-01-01') GO