> For the complete documentation index, see [llms.txt](https://academy.any2info.com/any2info-academy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.any2info.com/any2info-academy/faq/installer-update-fails-database-compatibility-level-too-low.md).

# Installer/update fails: Database compatibility level too low

**Category:** FAQ

**Version:** 1.0

**Last updated:** August 12, 2026

**Author:** Any2Info

***

### Issue

While running the Any2Info installer/update tool, the update may fail with the following message:

```
Database compatibility level too low, is 120 and should be 130
```

This issue can occur when updating a relatively old Any2Info instance. Databases for older instances may have been created using an older SQL Server database compatibility level.

The issue occurs during **update 220**.

> **Note:** Although the error message states that the compatibility level should be `130`, the recommended compatibility level when update 220 was introduced is `150`. Therefore, the databases should currently be changed to compatibility level `150`. A higher compatibility level may be recommended for future Any2Info versions.

***

### Cause

Update 220 requires functionality that is not available with the older database compatibility level.

The update is also partially executed before the compatibility-level error occurs. This means some database changes from update 220 have already been applied when the installer stops.

Because of this, **changing only the compatibility level and rerunning the installer will not resolve the problem**.

Doing so can result in a new error indicating that `ADI001` already exists. This happens because `ADI001` was created before the compatibility-level error occurred, and the installer attempts to execute that part of update 220 again.

The remaining part of update 220 must therefore be executed manually before rerunning the installer.

***

### Solution

#### 1. Change the database compatibility level

Run the following statements directly on the SQL Server:

```sql
ALTER DATABASE [Any2Info] SET COMPATIBILITY_LEVEL = 150;
ALTER DATABASE [Any2Info_Documents] SET COMPATIBILITY_LEVEL = 150;
ALTER DATABASE [Any2Info_Engine] SET COMPATIBILITY_LEVEL = 150;
ALTER DATABASE [Any2Info_log] SET COMPATIBILITY_LEVEL = 150;
```

The database names shown above are examples. **Database names are instance-specific**, so use the actual database names for the Any2Info instance being updated.

#### 2. Complete update 220 manually

Run the following script directly on the Any2Info database. This executes the remaining portion of update 220 that could not be completed because of the compatibility-level error.

```sql
WITH unwrappedArray AS (
    SELECT
        id AS PropertyId,
        REPLACE(REPLACE(Value, '[', ''), ']', '') AS result
    FROM AIA002
    WHERE name = 'DataclipSources'
      AND Value != '[]'
),
splitValues AS (
    SELECT
        PropertyId,
        value
    FROM unwrappedArray
    CROSS APPLY string_split(result, ',')
),
correctedArrayValues AS (
    SELECT
        PropertyId,
        '[' + STUFF((
            SELECT '},{“ClipId”: ' + [value]
            FROM splitValues
            WHERE PropertyId = Results.PropertyId
            FOR XML PATH(''), TYPE
        ).value('(./text())[1]', 'VARCHAR(MAX)'), 1, 2, '') + '}]'
        AS CorrectedClipIds
    FROM splitValues Results
    GROUP BY PropertyId
)
UPDATE AIA002
SET value = CorrectedClipIds
FROM correctedArrayValues
WHERE id = PropertyId;

-- Create table for conversations
CREATE TABLE [DBO].[AIA005] (
    [Id] INT NOT NULL IDENTITY CONSTRAINT PK_AIA005_AIA005_ID PRIMARY KEY,
    [Guid] UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID(),
    [UserId] INT NOT NULL CONSTRAINT FK_AIA005_AUT001 REFERENCES [DBO].[AUT001],
    [AgentId] INT NOT NULL CONSTRAINT FK_AIA005_AIA001 REFERENCES [DBO].[AIA001],
    [Name] NVARCHAR(512) NOT NULL,
    [Source] NVARCHAR(512) NOT NULL,
    [Created] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [CreatedBy] INT NOT NULL CONSTRAINT FK_AIA005_AUT001_CREATED REFERENCES [DBO].[AUT001],
    [Updated] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [UpdatedBy] INT NOT NULL CONSTRAINT FK_AIA005_AUT001_UPDATED REFERENCES [DBO].[AUT001],
    [Deleted] DATETIME2 NULL,
    [DeletedBy] INT NULL CONSTRAINT FK_AIA005_AUT001_DELETED REFERENCES [DBO].[AUT001]
);
GO

-- Create table for conversation properties
CREATE TABLE [DBO].[AIA006] (
    [Id] INT NOT NULL IDENTITY CONSTRAINT PK_AIA006_AIA006_ID PRIMARY KEY,
    [ConversationId] INT NOT NULL CONSTRAINT FK_AIA006_AIA005 REFERENCES [DBO].[AIA005],
    [Name] NVARCHAR(4000) NOT NULL,
    [ValueType] INT NOT NULL,
    [Value] NVARCHAR(MAX) DEFAULT NULL,
    [Created] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [CreatedBy] INT NOT NULL CONSTRAINT FK_AIA006_AUT001_CREATED REFERENCES [DBO].[AUT001],
    [Updated] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [UpdatedBy] INT NOT NULL CONSTRAINT FK_AIA006_AUT001_UPDATED REFERENCES [DBO].[AUT001],
    [Deleted] DATETIME2 NULL,
    [DeletedBy] INT NULL CONSTRAINT FK_AIA006_AUT001_DELETED REFERENCES [DBO].[AUT001]
);
GO

-- Create table for conversation messages
CREATE TABLE [DBO].[AIA007] (
    [Id] INT NOT NULL IDENTITY CONSTRAINT PK_AIA007_AIA007_ID PRIMARY KEY,
    [ConversationId] INT NOT NULL CONSTRAINT FK_AIA007_AIA005 REFERENCES [DBO].[AIA005],
    [Message] NVARCHAR(MAX) DEFAULT NULL,
    [Type] INT NOT NULL,
    [Created] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [CreatedBy] INT NOT NULL CONSTRAINT FK_AIA007_AUT001_CREATED REFERENCES [DBO].[AUT001],
    [Updated] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [UpdatedBy] INT NOT NULL CONSTRAINT FK_AIA007_AUT001_UPDATED REFERENCES [DBO].[AUT001],
    [Deleted] DATETIME2 NULL,
    [DeletedBy] INT NULL CONSTRAINT FK_AIA007_AUT001_DELETED REFERENCES [DBO].[AUT001]
);
GO

-- Create table for conversation message properties
CREATE TABLE [DBO].[AIA008] (
    [Id] INT NOT NULL IDENTITY CONSTRAINT PK_AIA008_AIA008_ID PRIMARY KEY,
    [ConversationMessageId] INT NOT NULL CONSTRAINT FK_AIA008_AIA007 REFERENCES [DBO].[AIA007],
    [Name] NVARCHAR(4000) NOT NULL,
    [ValueType] INT NOT NULL,
    [Value] NVARCHAR(MAX) DEFAULT NULL,
    [Created] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [CreatedBy] INT NOT NULL CONSTRAINT FK_AIA008_AUT001_CREATED REFERENCES [DBO].[AUT001],
    [Updated] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [UpdatedBy] INT NOT NULL CONSTRAINT FK_AIA008_AUT001_UPDATED REFERENCES [DBO].[AUT001],
    [Deleted] DATETIME2 NULL,
    [DeletedBy] INT NULL CONSTRAINT FK_AIA008_AUT001_DELETED REFERENCES [DBO].[AUT001]
);
GO

-- Create table for conversation message input/output tables
CREATE TABLE [DBO].[AIA009] (
    [Id] INT NOT NULL IDENTITY CONSTRAINT PK_AIA009_AIA009_ID PRIMARY KEY,
    [ConversationMessageId] INT NOT NULL CONSTRAINT FK_AIA009_AIA007 REFERENCES [DBO].[AIA007],
    [Column] NVARCHAR(254) NOT NULL,
    [Row] INT NOT NULL,
    [ValueType] INT NOT NULL,
    [Value] NVARCHAR(MAX) DEFAULT NULL,
    [Created] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [CreatedBy] INT NOT NULL CONSTRAINT FK_AIA009_AUT001_CREATED REFERENCES [DBO].[AUT001],
    [Updated] DATETIME2 NOT NULL DEFAULT GETUTCDATE(),
    [UpdatedBy] INT NOT NULL CONSTRAINT FK_AIA009_AUT001_UPDATED REFERENCES [DBO].[AUT001],
    [Deleted] DATETIME2 NULL,
    [DeletedBy] INT NULL CONSTRAINT FK_AIA009_AUT001_DELETED REFERENCES [DBO].[AUT001]
);
GO

WITH agentsAllowingChat AS (
    SELECT Id
    FROM AIA001
    WHERE AgentConfigId IN (
        -- responses
        'ddf498a7-99cc-4b00-86e9-27d25c2c4513',
        -- gpt 5
        'd9b0dd2f-8bdd-4fbe-88a4-22a797cefd88',
        -- azure gpt 5
        '49b5116c-a199-450e-83f6-197ffa55c505'
    )
)
INSERT INTO AIA002 (
    AgentId,
    Name,
    ValueType,
    Value,
    Created,
    CreatedBy,
    Updated,
    UpdatedBy
)
SELECT Id, 'IsChat', 3, 'false', GETUTCDATE(), 1, GETUTCDATE(), 1
FROM agentsAllowingChat

UNION ALL

SELECT Id, 'EnableHistory', 3, 'false', GETUTCDATE(), 1, GETUTCDATE(), 1
FROM agentsAllowingChat

UNION ALL

SELECT Id, 'MaxConversationCount', 1, NULL, GETUTCDATE(), 1, GETUTCDATE(), 1
FROM agentsAllowingChat

UNION ALL

SELECT Id, 'MaxConversationDuration', 1, '14', GETUTCDATE(), 1, GETUTCDATE(), 1
FROM agentsAllowingChat;

INSERT INTO SYS001
VALUES (
    1,
    220,
    'Added addin tables, Added conversation tables, Added new chat properties Corrected dataclip sources property',
    GETUTCDATE()
);
```

#### 3. Rerun the installer

After both scripts have completed successfully, rerun the Any2Info installer/update tool.

Update 220 has now been completed manually and registered in `SYS001`, allowing the installer to continue with the remaining updates normally.

***

### Changelog

| Version | Date            | Change                           |
| ------- | --------------- | -------------------------------- |
| 1.0     | August 12, 2026 | Initial FAQ documentation added. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://academy.any2info.com/any2info-academy/faq/installer-update-fails-database-compatibility-level-too-low.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
