MSSQL Connection Properties

My TC instance has a database.properties file that contains the following

connectionProperties.user=dbuser
connectionUrl=jdbc\:sqlserver\://servername.rds.amazonaws.com\\tcserver\:1433;databaseName\=Teamcity_Build
connectionProperties.password=XXXXXXXXX
	

I need to encrypt this connection but I dont know how to specify that in the properties file.  Is it just adding connectionProperties.encrypt=true to the file?  

0
3 comments

Hi Bkinney,

The main database connection settings can be defined by setting environment variables in the TeamCity server's environment. Environment variables can be used instead of (or in addition to) the properties in the `database.properties` file. For more detailed information, please refer to https://www.jetbrains.com/help/teamcity/set-up-external-database.html#Environment+Variables.

Note that environment variables take precedence over the corresponding properties in the database.properties file:

TEAMCITY_DB_URL overrides connectionUrl

TEAMCITY_DB_USER overrides connectionProperties.user

TEAMCITY_DB_PASSWORD overrides connectionProperties.password

Best Regards,
Tom

0

Yes, I had seen that article and it doesn't answer my question.  What is the proper way to include encryption on the database connection?  Do I just add encrypt=true;at the end of the connectionURL?

0

Hi Bkinney,

Sorry for any misunderstanding.

Encrypting the connection string for MS SQL ensures that sensitive information such as the username and password is not exposed in plaintext. The connection string format remains the same as a common connection string.

You can add Encrypt=true in the connection URL.

connectionUrl=jdbc:sqlserver://<host>:1433;databaseName=<database name>;Encrypt=true;

Best Regards,

Tom

0

Please sign in to leave a comment.