Closed marcingminski closed 1 year ago
@marcingminski I am using the following command to install on SQL Server 2017 Standard
Install-DbaSqlWatch -SqlInstance MyInstance -Database SQLWATCH
Getting:
Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 7738, Level 16, State 2, Line 1 Cannot enable
compression for object 'sqlwatch_logger_agent_job_history'. Only SQL Server Enterprise Edition supports compression.
Error SQL72045: Script execution error. The executed script:
CREATE TABLE [dbo].[sqlwatch_logger_agent_job_history] (
[sql_instance] VARCHAR (32) NOT NULL,
[sqlwatch_job_id] SMALLINT NOT NULL,
[sqlwatch_job_step_id] INT NOT NULL,
[sysjobhistory_instance_id] INT NOT NULL,
[sysjobhistory_step_id] INT NOT NULL,
[run_duration_s] REAL NOT NULL,
[run_date] DATETIME NOT NULL,
[run_status] TINYINT NOT NULL,
[snapshot_time] DATETIME2 (0) NOT NULL,
[snapshot_type_id] TINYINT NOT NULL,
[run_date_utc] DATETIME NOT NULL,
CONSTRAINT [pk_sqlwatch_logger_agent_job_history] PRIMARY KEY CLUSTERED ([sql_instance] ASC, [snapshot_time] ASC,
[sqlwatch_job_id] ASC, [sqlwatch_job_step_id] ASC, [sysjobhistory_instance_id] ASC, [snapshot_type_id] ASC) WITH
(DATA_COMPRESSION = PAGE)
);
I think it's related to this PR. Happy to open an issue.
When data compression is enabled post-deployment, the next DACPAC deployment will remove compression unless manual overrides are specified. This complicates deployments in large environments or in cases where the SQLWATCH database is large. From now on, all logger tables are now compressed by default. (If you have no compression enabled and are upgrading to this version, the upgrade can take a while whilst logger data is compressed)