TFS4JIRA Self-Hosted | Empty SQL express database creation and usage
This instruction will only work with TFS4JIRA Self-Hosted 10 or higher.
When TFS4JIRA Self-hosted is newly setup, users may choose to use SQL express database instead of the default SQL Compact Edition database. This article explains how to setup and start using SQL express database with TFS4JIRA.
Prerequisites:
Install SQL Express (steps below)
(optional) Install SQL Server Management Studio (SMSS)
empty_db_t4j_10.sql
SQL EXPRESS 2019 installation
Download the installer for your system: SQL Express
Start CUSTOM installation
Choose: New SQL Server stand-alone installation or add features to an existing installation
(optional) - do not install Machine Learning Services
Named instance: TFS4JIRA
Collation: SQL_Latin1_General_CP1_CI_AS
Authentication mode: Mixed mode
SA password: <password>
please setup a custom, strong password
some Windows systems require strong passwords via Group PolicyÂ
MIGRATION
This manual operates on the default user credentials used in TFS4JIRA (provided out of the box). Users may choose to setup different user credentials, especially password that will be used by the application. Here are the password locations that must be corrected:
empty_db.sql script
web.config, <connectionString> section for "SyncProfileContextExpressConnection"Â
Â
Users may choose to run the scripts provided below using SQL Server Management Studio (SMSS) instead of SQLCMD commands.
Stop TFS4JIRA Synchronizer application pool in IIS using IIS Manager (cmd: inetmgr)
Create new DB in SQLExpress
Download the script file: empty_db.sql
In the folder containing above script please create a BAT file or run this command:
sqlcmd -S localhost\tfs4jira -d MASTER -i empty_db.sql -E -e -x > empty_db.txt
Empty_db.txt will be created in the same folder with script result.
Update connection string in web.config (default location: C:\inetpub\wwwroot\tfs-jira-synchronizer)
Update "forceDbType" application setting by changing its value to "SyncProfileContextExpressConnection".
Search for: <add key="forceDbType" value="SyncProfileContextConnection" />
Replace with: <add key="forceDbType" value="SyncProfileContextExpressConnection" />
Start TFS4Jira Synchronizer application pool in IIS
MIGRATION VALIDATION
In order to validate that TFS4JIRA Synchronizer uses SQL Express you can add a new profile or rename one of the existing ones. After that please query "SyncProfiles" using below command
sqlcmd -S localhost\TFS4JIRA -d TFS4JIRA -q "select * from SyncProfiles" -E -e > DB_migration_validation.txt |
You should see your changes in DB_migration_validation.txt. Example content:
Â