Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:adm:mssql_database_support [2020/06/24 14:59] apeterova integrated authentication |
tutorial:adm:mssql_database_support [2021/03/30 12:13] (current) doischert [Develop CzechIdM with MsSQL and a docker] |
||
---|---|---|---|
Line 91: | Line 91: | ||
An example is valid for JDBC driver [[https:// | An example is valid for JDBC driver [[https:// | ||
- | FIXME Not fully tested. | + | If you need to use a domain user, set the property username like this: '' |
=== Windows Integrated Authentication === | === Windows Integrated Authentication === | ||
Line 121: | Line 121: | ||
The example is valid for SQL server running on the server " | The example is valid for SQL server running on the server " | ||
- | Finally, restart | + | 7. Add SQL server certificate to Java truststore (FIXME how?). Workaround: add property '' |
+ | </ | ||
+ | 8. Finally, restart the Apache Tomcat8 service so all changes take place. | ||
+ | |||
+ | === Windows Authentication with NTLM === | ||
+ | |||
+ | If you need to use Windows Authentication but can't use the integrated authentication as above (e.g. you are not running IdM on Windows), it's possible to use [[https:// | ||
+ | |||
+ | Example properties: | ||
+ | <code properties> | ||
+ | spring.datasource.url=jdbc: | ||
+ | spring.datasource.username=someserviceuser | ||
+ | spring.datasource.password=somepassword | ||
+ | spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver | ||
+ | spring.datasource.test-on-borrow=true | ||
+ | spring.datasource.validationQuery=SELECT 1 | ||
+ | </ | ||
+ | |||
+ | The example is valid for SQL server running on the server " | ||
==== Scheduler setup (quartz.properties) ==== | ==== Scheduler setup (quartz.properties) ==== | ||
Line 162: | Line 180: | ||
$ docker exec test-mssql / | $ docker exec test-mssql / | ||
+ | ==== Use docker-compose ==== | ||
+ | You can also use the following docker-compose.yml file. The advantage is that it uses persistent volumes and docker-compose cleans after itself better. Copy and edit (if needed) the code below to a file called ' | ||
+ | < | ||
+ | version: " | ||
+ | services: | ||
+ | sql-server-db: | ||
+ | container_name: | ||
+ | image: microsoft/ | ||
+ | ports: | ||
+ | - " | ||
+ | environment: | ||
+ | SA_PASSWORD: | ||
+ | ACCEPT_EULA: | ||
+ | MSSQL_BACKUP_DIR: | ||
+ | MSSQL_DATA_DIR: | ||
+ | MSSQL_LOG_DIR: | ||
+ | volumes: | ||
+ | - ' | ||
+ | - ' | ||
+ | volumes: | ||
+ | systemdbs: | ||
+ | userdbs: | ||
+ | </ | ||
+ | |||
+ | Then, in the same directory, use the command `docker-compose up` to start the database. | ||
===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
Line 184: | Line 227: | ||
* which type of authentication is used - e.g. if you use a domain account ("NT account" | * which type of authentication is used - e.g. if you use a domain account ("NT account" | ||
+ | ==== Instances and ports ==== | ||
+ | |||
+ | Usually, you don't need to specify the port when connecting to SQL Server. By default the driver calls built-in [[https:// | ||
+ | |||
+ | The default SQL Server port (1433) doesn' | ||