Metadata service was introduced in Artifactory 7.x, its purpose is to store metadata information from JFrog services such as Artifactory and Xray.
While Artifactory was written in Java and uses JDBC to connect to the database, the Metadata service is written in Go, and would require a Go connection string when connecting Artifactory to MSSQL database with dynamic ports. This is due to the fact that the default connection string would attempt to connect the Metadata service to MSSQL default port (1433).
To connect Metadata service to MSSQL dynamic ports we will update the system.yaml configuration file located at '$JFROG_HOME/artifactory/etc/system.yaml' with the following information:
metadata: database: type: mssql url: go:sqlserver://${shared.database.username}:${shared.database.password}@{database URL/IP}/{instance name}?database={database name}
For example:
metadata: database: type: mssql url: go:sqlserver://user:password@127.0.0.1/MSSQLSERVER?database=artifactorydb