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

SIM does not delete databases from SQL Server that was actually used during installation #661

Open
SC-IDO opened this issue Feb 16, 2022 · 2 comments
Assignees
Labels

Comments

@SC-IDO
Copy link

SC-IDO commented Feb 16, 2022

Description:
SIM does not delete databases from SQL Server that was actually used during installation

Scenario:

  1. Install at least two SQL Server engines, for example SQL Server 2017 and 2019
  2. In SIM (v1.13.0) settings, set connection string to use SQL Server 2017
  3. Install Sitecore XP 9.x+
  4. In SIM settings, set connection string to use SQL Server 2019
  5. Delete instance from step (3)

Expected result: databases are deleted from SQL Server 2017
Actual result: SIM did not delete databases

Issue is actual
I hereby confirm the issue is new:

Valid for QA/DEV
Haven't checked in the latest QA/DEV version

Screenshots:
n/a

Attachments:
n/a

@AndreyFilchenkov
Copy link
Collaborator

AndreyFilchenkov commented Jan 18, 2023

The solution could be:

  1. Add the ability to have a list of SQL servers available for installation/uninstallation of Sitecore

option#1: during uninstallation check, if the connection string points to the database server that is in the SIMs SQL server list. In case the database is not hosted on the SQL server in the list, it must not be deleted.
option#2: check a database name on all SQL servers known by SIM, once the database is found we can safely remove it.

@DmitryKolinchuk
Copy link
Collaborator

While developing, I found that the existing "Profile.ConnectionString" property that represents the existing connection string is widely used through code in the following places:

SIM.Tool.Base.EnvironmentHelper.CheckSqlServer
SIM.Tool.Windows.Pipelines.Setup.SetupProcessor.Execute
SIM.Tool.Windows.Pipelines.Setup.SetupWizardArgs.SetupWizardArgs
SIM.Tool.Base.Profiles.ProfileManager.GetConnectionString

The 'SIM.Tool.Base.EnvironmentHelper.CheckSqlServer' method is used in too many places to check if the defined SQL server is running.
Based on this, introducing a possibility to add more SQL servers is a breaking change that requires overriding of significant part of the existing functionality.

@DmitryKolinchuk DmitryKolinchuk modified the milestone: 2023Q1 Feb 10, 2023
@DmitryKolinchuk DmitryKolinchuk modified the milestones: 2023Q1, 2023Q2 Mar 31, 2023
@DmitryKolinchuk DmitryKolinchuk removed this from the 2023Q2 milestone May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants