Skip to content

Commit

Permalink
Use lowercase sa for SQL Server username
Browse files Browse the repository at this point in the history
Otherwise the selected collation might cause issues.
  • Loading branch information
gsmet committed Jun 22, 2023
1 parent a9959f6 commit 452bbe0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public class MSSQLDevServicesProcessor {

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

/**
* Using SA doesn't work with all collations so let's use the lowercase version instead.
*/
private static final String DEFAULT_USERNAME = "sa";

@BuildStep
DevServicesDatasourceProviderBuildItem setupMSSQL(
List<DevServicesSharedNetworkBuildItem> devServicesSharedNetworkBuildItem) {
Expand Down Expand Up @@ -63,7 +68,7 @@ public RunningDevServicesDatasource startDatabase(Optional<String> username, Opt
return new RunningDevServicesDatasource(container.getContainerId(),
container.getEffectiveJdbcUrl(),
container.getReactiveUrl(),
container.getUsername(),
DEFAULT_USERNAME,
container.getPassword(),
new ContainerShutdownCloseable(container, "Microsoft SQL Server"));
}
Expand Down

0 comments on commit 452bbe0

Please sign in to comment.