MSSQL Creation Statement

Hi, I Build a MSSQL database in Azure and i am trying to get the credentials to work, but when i click on generate credentials i get the following error .

mssql "Cannot find the schema “dbo”

vault write database/roles/my-role
creation_statements=“CREATE LOGIN [{{name}}] WITH PASSWORD = ‘{{password}}’;
CREATE USER [{{name}}] FOR LOGIN [{{name}}];
GRANT SELECT ON SCHEMA::dbo TO [{{name}}];”
Success! Data written to: database/roles/my-role

Try dropping the GRANT line from your connection string as a test and re-test the role read. My guess is that you’re actually not connecting to the database and this is a secondary error that is being hidden.

HI @aram thanks i removed the GRANT SELECT ON SCHEMA::dbo TO [{{name}}];"

and i was able to generate credentials

Do you have access to everything you need?

If not, login as the vault root user you used and issue a grant to the user that it just created and see what/if any messages/errors get generated.

P.S. I don’t know MSSQL at all, so the error maybe something simple. I’m just going with what I know from other databases.