betr-io / terraform-provider-mssql

Terraform provider for Microsoft SQL Server
https://registry.terraform.io/providers/betr-io/mssql/latest
MIT License
35 stars 28 forks source link

String_Split issue #31

Closed arouxAgicap closed 1 year ago

arouxAgicap commented 2 years ago

I'm currently using version 0.2.4 of the provider and I encounter issues creating multiple users for the same database. The error message is the following : Error: unable to create user USER: mssql: There is already an object named 'String_Split' in the database

Looking at the previous issues and PRs, I saw that race condition can occurs if trying to create multiple users & login on the same database and it was supposedly fixed with #24.

Rolling back to 0.2.3 solved the problem

alxy commented 2 years ago

May I ask on which compatibility level for the SQL database you are? You can find that out by running select name, compatibility_level FROM sys.databases on your database.