-1

After I provision a SQL Azure Single DB - with a Global Admin login/password - can it be changed after the initial deployement via SQL Scripts?

Can the passwords for the SQL logins/user created by the above Global Admin - be changed/reset after the initial deployment or setup via SQL Scripts?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
GilliVilla
  • 4,998
  • 11
  • 55
  • 96

1 Answers1

1

RESET PASSWORD FOR SERVER ADMIN

You can do this after initial deployment through any of these - Azure Portal, AZURE CLI, PowerShell or SQL Scripts

SQL

-- You should be connected to Master Database for this Server
ALTER LOGIN [AdminAccountName] WITH Password='New_Password';

Azure PORTAL

Go to Azure portal, click SQL Servers, select the server from the list, and then click Reset Password.

enter image description here


RESET PASSWORD FOR OTHER USERS/LOGIN

Yes, You can do this after initial deployment through SQL Scripts.

Traditional model users

-- You should be connected to Master Database for this Server
ALTER LOGIN login_name WITH PASSWORD = 'New_Password';

Contained Database model users

-- You should be connected to User Database itself
ALTER USER user_name WITH PASSWORD = 'New_Password';

See these links for more details:

Contained and Traditional Model Users Syntax Differences

Azure SQL Logins and Users

Rohit Saigal
  • 9,317
  • 2
  • 20
  • 32