Skip to content

Commit 452bbe0

Browse files
committed
Use lowercase sa for SQL Server username
Otherwise the selected collation might cause issues.
1 parent a9959f6 commit 452bbe0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extensions/devservices/mssql/src/main/java/io/quarkus/devservices/mssql/deployment/MSSQLDevServicesProcessor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public class MSSQLDevServicesProcessor {
2727

2828
private static final Logger LOG = Logger.getLogger(MSSQLDevServicesProcessor.class);
2929

30+
/**
31+
* Using SA doesn't work with all collations so let's use the lowercase version instead.
32+
*/
33+
private static final String DEFAULT_USERNAME = "sa";
34+
3035
@BuildStep
3136
DevServicesDatasourceProviderBuildItem setupMSSQL(
3237
List<DevServicesSharedNetworkBuildItem> devServicesSharedNetworkBuildItem) {
@@ -63,7 +68,7 @@ public RunningDevServicesDatasource startDatabase(Optional<String> username, Opt
6368
return new RunningDevServicesDatasource(container.getContainerId(),
6469
container.getEffectiveJdbcUrl(),
6570
container.getReactiveUrl(),
66-
container.getUsername(),
71+
DEFAULT_USERNAME,
6772
container.getPassword(),
6873
new ContainerShutdownCloseable(container, "Microsoft SQL Server"));
6974
}

0 commit comments

Comments
 (0)