When I log in to azure portal select my SQL Database -> Tools -> QueryEditor and enter:
ALTER USER MyUser WITH Password = '**********'
I get the error:
Failed to execute query. Error: The parameter PASSWORD cannot be provided for users that cannot authenticate in a database.
I've created the user in Visual Studio Database Project in MyUser.sql (Build Action=Build):
CREATE USER [My_User] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo];
Why I'm getting the message?
Is it possible to create the User in Database Project so that I will specify the password later (not is source code)?
Connecting Through Windows AuthenticationSQL Server does not ask for the password, and does not perform the identity validation. Windows Authentication is the default authentication mode, and is much more secure than SQL Server Authentication.
To reset the password for the server admin, go to the Azure portal, click SQL Servers, select the server from the list, and then click Reset Password. To reset the password for the SQL Managed Instance, go to the Azure portal, click the instance, and click Reset password.
Instance_name is the SQL Server instance name. Username is the user name that is used to login to the SQL server. Password is the password of the user. This parameter is required if username is provided.
Your user is not a contained database user that can be authenticated by database. This is because you did not create it with syntax
CREATE USER user_name WITH PASSWORD = 'strong_password';
What you've created is a "traditional" user without login, in "traditional" model user
cannot have a password, only the corresponding login
can. But your user has no corresponding login as it was created without login
, so you cannot change a password at all.
Here you can find more detailes about contained database urers: Contained Database Users
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With