[RTFACT-18657] Upgrade fails with MSSQL due to database name validation Created: 03/Mar/19  Updated: 10/Aug/20

Status: Will Not Implement
Project: Artifactory Binary Repository
Component/s: Database
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Ariel Kabov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Trigger
Regression:
Yes

 Description   

Environment:
Artifactory using Microsoft SQL server

Problem:
Upgrade to version 6.6.1 and above fails with the following error:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of the current database.

Cause:
The database name in the configuration doesn't match the actual DB name.
Typically, this would happen due to case-sensitivity mismatch.
The case-sensitivity validation was added in version 6.6.1.

Resolution:
Update the DB name in the $ARTIFACTORY_HOME/etc/db.properties.

You should be able to retrieve the actual name by running:

SELECT name, database_id, create_date  
FROM sys.databases;  

Steps to reproduce:
1. Install Artifactory 6.5.13 with MSSQL. Setup the DB name as "artifactory".
2. In the db.properties configuration file, setup the DB using the name "Artifactory" (here with capital case). It works.
3. Upgrade to version 6.6.1 or above, upgrade will fail as Artifactory isn't able to connect to the DB with the error above.


Generated at Tue Sep 22 18:41:38 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.