Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Issue #1040

Closed
Jhn007 opened this issue Oct 2, 2024 · 6 comments
Closed

Upgrade Issue #1040

Jhn007 opened this issue Oct 2, 2024 · 6 comments

Comments

@Jhn007
Copy link

Jhn007 commented Oct 2, 2024

Morning David,

Firstly would like to say that have been using DBADash for approx 1 yer now and think it is fantastic.

I have attempted to upgrade from 3.0.1.0 to 3.11.0.0 today (admittedly I am behind on the version updates!) but have encountered an issue during the DB upgrade. Which I guess could be because I am behind in updating our version of the app.

The DB Repository is on SQL Server 2019
The DBADash application is running on Windows Server 2019

The error I get in the logs is below if you could let me know how to get past this then it would be much appreciated

Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 4922, Level 16, State 9, Line 1 ALTER TABLE DROP COLUMN InstanceDisplayName failed because one or more objects access this column.
Error SQL72045: Script execution error. The executed script:
ALTER TABLE [dbo].[Instances] DROP COLUMN [InstanceDisplayName], COLUMN [InstanceGroupName], COLUMN [LastMemoryDumpUTC];

@DavidWiseman
Copy link
Collaborator

Hi,

How did you upgrade the database - did you generate a script and run it in SSMS or did you let it run the deployment using the Deploy button or just run automatically on startup? If you generated a script, try letting it deploy automatically instead.

Hope this helps,

David

@Jhn007
Copy link
Author

Jhn007 commented Oct 2, 2024

That was a quick response!

Deployed using the the ServiceConfigTool and letting it run automatically on startup of the service. Is an offline upgrade so I had manually downloaded the latest release, copied and extracted to the serverr, keeping a copy of the original ServiceConfig.json file as per the manual upgrade instructions

@DavidWiseman
Copy link
Collaborator

Run this on the repository database first:

DROP INDEX IX_Instances_InstanceDisplayName ON dbo.Instances

@Jhn007
Copy link
Author

Jhn007 commented Oct 2, 2024

That has worked many thanks

@DavidWiseman
Copy link
Collaborator

Some more info:

The issue occurs when upgrading from version 3.3.0 or lower to version 3.11.0. Version 3.4.0 and later will upgrade to 3.11.0 without issues.
The easiest option is to drop the index that is preventing the upgrade. Or upgrading to version 3.4-3.10 then to 3.11 should work.

DROP INDEX IX_Instances_InstanceDisplayName ON dbo.Instances

It should get handled automatically by the dacpac deployment but it's not generating the upgrade script correctly for some reason.

I've put a notice on the release notes.

DavidWiseman added a commit to DavidWiseman/dba-dash that referenced this issue Oct 2, 2024
Fix issue upgrading from 3.3 or lower. trimble-oss#1040
DavidWiseman added a commit that referenced this issue Oct 2, 2024
Fix issue upgrading from 3.3 or lower. #1040
@DavidWiseman
Copy link
Collaborator

3.11.1 fixes this issue for people upgrading from older versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants